Exemple #1
0
 private void Awake()
 {
     _distancer = new Distancer(_distanceToKill);
     _movier    = new Movier(_speed);
     _spawner   = new Spawner(_spawnPostion, _rootSpawn, _cubePrefab);
     _destroyer = new Destroyer(_distancer);
 }
Exemple #2
0
        void SomebodyWhantToSpawn(Movier obj)
        {
            var child = obj.MakeChild();

            if (child == null)
            {
                return;
            }
            objects.Add(child);
        }
Exemple #3
0
        public override void Touch(Movier other)
        {
            if (other is Food)
            {
                DoDamage(other);
                busy = true;
            }

            if (other is Queen)
            {
                busy = false;
            }

            // else if (other is Queen && this.hp > 10)
            //     other.DoDamage(this);
            // else if (other is Beetle)
            //     DoDamage(other);
        }