void Start() { roomEntered = transform.root.GetComponent <RoomEntered>(); switch (direction) { case Directions.Up: { isGate = roomEntered.UpIsGate; break; } case Directions.Down: { isGate = roomEntered.DownIsGate; break; } case Directions.Left: { isGate = roomEntered.LeftIsGate; break; } case Directions.Rigth: { isGate = roomEntered.RigthIsGate; break; } default: break; } }
void Start() { roomEntered = transform.root.GetComponent <RoomEntered>(); }