Exemplo n.º 1
0
 void Awake()
 {
     enemyMoving = gameObject.GetComponent<EnemyMoving>();
     orbiting = gameObject.GetComponent<Orbiting>();
     chained = gameObject.GetComponent<Chained>();
     dead = gameObject.GetComponent<Dead>();
 }
Exemplo n.º 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);
 }