Пример #1
0
        public override void EnterState(PawnMovement machine)
        {
            PawnAI ai = machine.GetComponent <PawnAI>();

            ai.paused = true;
            machine.OnAirborn.Invoke();
        }
Пример #2
0
        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);
        }
Пример #3
0
        public override void ExitState(PawnMovement machine)
        {
            PawnAI ai = machine.GetComponent <PawnAI>();

            ai.paused = false;
        }
Пример #4
0
 private void Awake()
 {
     pawn     = GetComponentInParent <Pawn>();
     pawnAI   = GetComponentInParent <PawnAI>();
     animator = GetComponent <Animator>();
 }
Пример #5
0
 public void ReleasePawn(PawnAI pawn)
 {
     availablePawns[pawn.type].Push(pawn);
     pawn.gameObject.SetActive(false);
 }