Пример #1
0
    protected override void RanOutOfInstructions()
    {
        NestInstance potentialNest = nestManager.RandomNest();

        if (potentialNest != null)
        {
            Instructions.Push(new CreateNest(nestPrefab, potentialNest, protectionTimer, this));
            CurrentInstruction = new Goto(potentialNest.nestPosition + Vector3.forward, 0, this);
        }
        else
        {
            CurrentInstruction = new Goto(homeNest.transform.position + Vector3.forward, 0, this);
            Instructions.Push(new Goto(nestManager.OccupiedNests().nestPosition, protectionTimer, this));
        }
    }