|
|
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
-
- public class Traps : MonoBehaviour
- {
-
- public List<ConveyorBelt> ConveyorBelts;
- public List<CrushingBoulder> CrushingBoulders;
- public List<CubeWithCrystals> CubesWithCrystals;
- public List<FloatingOnWater> FloatingOnWater;
- public List<InGroundTrap> InGroundTraps;
- public List<ShootingCannon> ShootingCannons;
-
- public void environmentTurn()
- {
- for(int a = 0; a < ConveyorBelts.Count; a++)
- {
- ConveyorBelts[a].GetComponent<ConveyorBelt>().Animate();
- }
- for (int b = 0; b < CrushingBoulders.Count; b++)
- {
- CrushingBoulders[b].GetComponent<CrushingBoulder>().Animate();
- }
- for (int c = 0; c < CubesWithCrystals.Count; c++)
- {
- CubesWithCrystals[c].GetComponent<CubeWithCrystals>().Animate();
- }
- for (int d = 0; d < FloatingOnWater.Count; d++)
- {
- FloatingOnWater[d].GetComponent<FloatingOnWater>().Animate();
- }
- for (int e = 0; e < InGroundTraps.Count; e++)
- {
- InGroundTraps[e].GetComponent<InGroundTrap>().Animate();
- }
- for (int f = 0; f < ShootingCannons.Count; f++)
- {
- ShootingCannons[f].GetComponent<ShootingCannon>().Animate();
- }
- }
- }
|