public static TrapEntity enableTrapEntity(TrapBasis trap, Vector2 pos, bool isdetected = false, bool hastilesetter = false)
 {
     TrapEntity entity = GameController.TrapPool.GetChild(0).GetComponent<TrapEntity>();
     trap.Controller = entity;
     entity.Entity = trap;
     entity.gameObject.transform.position = pos;
     entity.setActive(true);
     entity.IsDetected = isdetected;
     entity.HasTileSetter = hastilesetter;
     entity.name = trap.Name;
     GameController.GameActionEvent.spawnObject(entity);
     return entity;
 }
Ejemplo n.º 2
0
 public TrapDamaged(TrapBasis trap, PlayerController player)
     : base(player)
 {
     Trap = trap;
 }