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

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();
}
}
}