You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Traps : MonoBehaviour
  5. {
  6. public List<ConveyorBelt> ConveyorBelts;
  7. public List<CrushingBoulder> CrushingBoulders;
  8. public List<CubeWithCrystals> CubesWithCrystals;
  9. public List<FloatingOnWater> FloatingOnWater;
  10. public List<InGroundTrap> InGroundTraps;
  11. public List<ShootingCannon> ShootingCannons;
  12. public void environmentTurn()
  13. {
  14. for(int a = 0; a < ConveyorBelts.Count; a++)
  15. {
  16. ConveyorBelts[a].GetComponent<ConveyorBelt>().Animate();
  17. }
  18. for (int b = 0; b < CrushingBoulders.Count; b++)
  19. {
  20. CrushingBoulders[b].GetComponent<CrushingBoulder>().Animate();
  21. }
  22. for (int c = 0; c < CubesWithCrystals.Count; c++)
  23. {
  24. CubesWithCrystals[c].GetComponent<CubeWithCrystals>().Animate();
  25. }
  26. for (int d = 0; d < FloatingOnWater.Count; d++)
  27. {
  28. FloatingOnWater[d].GetComponent<FloatingOnWater>().Animate();
  29. }
  30. for (int e = 0; e < InGroundTraps.Count; e++)
  31. {
  32. InGroundTraps[e].GetComponent<InGroundTrap>().Animate();
  33. }
  34. for (int f = 0; f < ShootingCannons.Count; f++)
  35. {
  36. ShootingCannons[f].GetComponent<ShootingCannon>().Animate();
  37. }
  38. }
  39. }