Esempio n. 1
0
    public void slowDisappear(AntQueen queen)
    {
        //TODO UI notify
        queen.addToSan(mySanBoost);

        StartCoroutine(slowlyDisappear());
    }
Esempio n. 2
0
        public FactoryAnthill(Field[,] map, int widthWorld, int heightWorld, AntQueen queen)
        {
            _queen = queen;
            FactoryAntQueen   factoryQueen      = new FactoryAntQueen();
            FactoryAntPicker  factoryAntPicker  = new FactoryAntPicker();
            FactoryFood       factoryFood       = new FactoryFood();
            FactoryAntFighter factoryAntFighter = new FactoryAntFighter();

            _heightWorld = heightWorld;
            _widthWorld  = widthWorld;
            _map         = map;
            _stackObjet  = new Stack();
            _stackAnt    = new Stack();
            _stackAnt.Push(queen ?? factoryQueen.CreateCharacter());
            for (var i = 0; i < 5; i++)
            {
                _stackAnt.Push(factoryAntFighter.CreateCharacter());
            }
            for (var i = 0; i < 20; i++)
            {
                _stackAnt.Push(factoryAntPicker.CreateCharacter());
            }
            for (var i = 0; i < 450; i++)
            {
                _stackObjet.Push(factoryFood.CreateObject());
            }
        }
Esempio n. 3
0
    public void spawn(AntQueen q, GatherManager gather)
    {
        spawnLocation = transform.position;
        destination   = spawnLocation; //no need to move to
        queen         = q;
        gatherManager = gather;

        Vector3 randomDirection = new Vector3(0, 0, Random.Range(-180, 180));

        transform.Rotate(randomDirection);

        StartCoroutine(idle());
    }