public FleetShipManifest GenerateFleetShip()
    {
        FleetShipManifest ship = new FleetShipManifest();

        ship.race      = (Race)UnityEngine.Random.Range(0, maxRace - 1);
        ship.hullClass = (HullClass)UnityEngine.Random.Range(0, maxHullClass - 1);
        ship.position  = new Vector3(
            UnityEngine.Random.Range(-constellationSize / 2f + minStarGap, constellationSize / 2f - minStarGap),
            UnityEngine.Random.Range(-constellationSize / 2f + minStarGap, constellationSize / 2f - minStarGap)
            );
        return(ship);
    }
 public FleetShipManifest GenerateFleetShip()
 {
     FleetShipManifest ship = new FleetShipManifest();
     ship.race = (Race) UnityEngine.Random.Range(0, maxRace - 1);
     ship.hullClass = (HullClass) UnityEngine.Random.Range(0, maxHullClass - 1);
     ship.position = new Vector3(
         UnityEngine.Random.Range(-constellationSize / 2f + minStarGap, constellationSize / 2f - minStarGap),
         UnityEngine.Random.Range(-constellationSize / 2f + minStarGap, constellationSize / 2f - minStarGap)
     );
     return ship;
 }
Beispiel #3
0
 public FleetShip GetFleetShipPrefab(FleetShipManifest manifest)
 {
     return(fleetShipPrefabs[new Tuple <Race, HullClass>(manifest.race, manifest.hullClass)]);
 }
Beispiel #4
0
 public FleetShip GetFleetShipPrefab(FleetShipManifest manifest)
 {
     return fleetShipPrefabs[new Tuple<Race, HullClass>(manifest.race, manifest.hullClass)];
 }