示例#1
0
 public void Create(Zone zone)
 {
     Data = PlanetData.GetData(zone);
     PlanetValues();
     Visualize();
     DestroySatellites();
 }
示例#2
0
 public void Create()
 {
     if (Class == PlanetClass.Random)
     {
         Data = PlanetData.GetData();
     }
     else
     {
         Data = PlanetData.GetData(Class);
     }
     PlanetValues();
     Visualize();
     DestroySatellites();
 }
示例#3
0
    public void Create(float parentRadius)
    {
        PlanetClass satClass  = PlanetClass.Random;
        int         randClass = Random.Range(0, 3);

        if (randClass == 0)
        {
            satClass = PlanetClass.A;
        }
        if (randClass == 1)
        {
            satClass = PlanetClass.C;
        }
        if (randClass == 2)
        {
            satClass = PlanetClass.D;
        }
        Data             = PlanetData.GetData(satClass);
        Data.Radius.From = 10000f;
        if (parentRadius >= 15000000)
        {
            Data.Radius.To = 5000000f;
        }
        else if (parentRadius >= 5000000)
        {
            Data.Radius.To = 2000000f;
        }
        else
        {
            Data.Radius.To = 700000f;
        }
        float index = Random.Range(0.0f, 1f);

        Data.Radius.RandomValue(index, Mathf.Lerp);
        index = Random.Range(0.0f, 1f);
        Data.Density.RandomValue(index, Mathf.Lerp);
        Visualize();
    }