Beispiel #1
0
 void LandOnPlanet(Transform planet)
 {
     Debug.Log("Rocket landed on " + planet.name);
     transform.SetParent(planet, worldPositionStays: true);
     transform.SetPositionAndRotation(planet.position,
                                      Quaternion.identity);
     parentPlanet = planet.GetComponent <Planetoid>();
     parentPlanet.UpdateColors(myColor);
     parentPlanet.mySparks.Play();
     parentPlanet.myOutline.enabled = true;
     // attractableBodies.Remove(parentPlanet);
     parentPlanet.GetComponent <Collider2D>().enabled = false;
     TogglePhysics(false);
 }