void Awake()
 {
     enemyMoving = gameObject.GetComponent<EnemyMoving>();
     orbiting = gameObject.GetComponent<Orbiting>();
     chained = gameObject.GetComponent<Chained>();
     dead = gameObject.GetComponent<Dead>();
 }
Exemple #2
0
 public void AddOrbitingPlanet(OrbitingBody newPlanet)
 {
     newPlanet.Parent   = this;
     newPlanet.Distance = Distance + 1;
     foreach (var planet in newPlanet.Orbiting)
     {
         planet.IncreaseDistance(newPlanet.Distance + 1);
     }
     Orbiting.Add(newPlanet);
 }