コード例 #1
0
    public PlanetManifest GeneratePlanet(int orbitIndex)
    {
        PlanetManifest planet = new PlanetManifest();

        planet.index         = orbitIndex;
        planet.size          = UnityEngine.Random.Range(minPlanetSize, maxPlanetSize);
        planet.type          = (PlanetType)UnityEngine.Random.Range(0, maxPlanetType);
        planet.orbitDistance = firstOrbit + orbitIndex * orbitGap;
        planet.orbitPosition = UnityEngine.Random.Range(0f, 360f);
        currentPlanetCount++;
        return(planet);
    }
コード例 #2
0
 public PlanetManifest GeneratePlanet(int orbitIndex)
 {
     PlanetManifest planet = new PlanetManifest();
     planet.index = orbitIndex;
     planet.size = UnityEngine.Random.Range(minPlanetSize, maxPlanetSize);
     planet.type = (PlanetType)UnityEngine.Random.Range(0, maxPlanetType);
     planet.orbitDistance = firstOrbit + orbitIndex * orbitGap;
     planet.orbitPosition = UnityEngine.Random.Range(0f, 360f);
     currentPlanetCount++;
     return planet;
 }