Exemple #1
0
 public override void Cache()
 {
     if (ScaledSpace.Instance != null)
     {
         List <Transform> planets = ScaledSpace.Instance.scaledSpaceTransforms;
         foreach (Transform planetTfm in planets)
         {
             if (planetTfm.name == planet.name)
             {
                 scale = planetTfm.localScale;
                 break;
             }
         }
     }
     rotationPeriod = planet.rotationPeriod;
     radius         = planet.Radius;
     mass           = planet.Mass;
     density        = AstroUtils.CalculateDensity(mass, radius);
 }