public override void EnterState(PawnMovement machine) { PawnAI ai = machine.GetComponent <PawnAI>(); ai.paused = true; machine.OnAirborn.Invoke(); }
private void SpawnOne(int type) { PawnAI ai = Instantiate(aiToPool[type], Vector3.zero, Quaternion.identity); ai.gameObject.SetActive(false); ai.type = type; availablePawns[type].Push(ai); allPawns.Add(ai); }
public override void ExitState(PawnMovement machine) { PawnAI ai = machine.GetComponent <PawnAI>(); ai.paused = false; }
private void Awake() { pawn = GetComponentInParent <Pawn>(); pawnAI = GetComponentInParent <PawnAI>(); animator = GetComponent <Animator>(); }
public void ReleasePawn(PawnAI pawn) { availablePawns[pawn.type].Push(pawn); pawn.gameObject.SetActive(false); }