Exemple #1
0
 public void Copulate(AntBase mBase)
 {
     if(mBase.antType == AntType.Queen && !((AntQueen)mBase).isCopulated)
     {
         ((AntQueen)mBase).isCopulated = true;
         EntityManager.Singleton.entityList.Remove(entityBase);
     }
 }
Exemple #2
0
        public void spawnAnt(AntBase antBase, Vector2 position)
        {
            if (antWorld == null)
                throw new NullReferenceException("[antWorld] has not been initialized, yet.");

            antBase.origin = position;
            antBase.rotation = Randomizer.NextInt(0, 359);

            EntityManager.Singleton.entityList.Add(antBase);
        }
Exemple #3
0
        public void spawnAnt(AntBase antBase)
        {
            if (antWorld == null)
                throw new NullReferenceException("[antWorld] has not been initialized, yet.");

            int max_x = (int)antWorld.size.X;
            int max_y = (int)antWorld.size.Y;

            int random_x = Randomizer.NextInt(0, max_x);
            int random_y = Randomizer.NextInt(0, max_y);

            antBase.origin = new Vector2(random_x, random_y);
            antBase.rotation = Randomizer.NextInt(0, 359);

            EntityManager.Singleton.entityList.Add(antBase);
        }
Exemple #4
0
 public bool Smells(AntBase antBase)
 {
     return antBase.isSmelling && this.origin.DistanceTo(antBase.origin) <= antBase.smellStrength;
 }
Exemple #5
0
 public TaskWait(AntBase antBase)
 {
     this.antBase = antBase;
 }