private void Awake() { _distancer = new Distancer(_distanceToKill); _movier = new Movier(_speed); _spawner = new Spawner(_spawnPostion, _rootSpawn, _cubePrefab); _destroyer = new Destroyer(_distancer); }
void SomebodyWhantToSpawn(Movier obj) { var child = obj.MakeChild(); if (child == null) { return; } objects.Add(child); }
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); }