Example #1
0
 void Start()
 {
     playerShip  = FindObjectOfType(typeof(PlayerShip)) as Ship;
     crewGauge   = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
     fuelGauge   = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
     energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;
 }
Example #2
0
    void Start()
    {
        crewGauge   = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge   = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        // player ship
        playerShip = Instantiate(playerShipPrefab) as SolarSystemPlayerShip;
    }
    protected void Start()
    {
        hull = FindObjectOfType(typeof(Hull)) as Hull;
        inventory = FindObjectOfType(typeof(Inventory)) as Inventory;
        crewGauge = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        massGauge = FindObjectOfType(typeof(MassGauge)) as MassGauge;
        powerGauge = FindObjectOfType(typeof(PowerGauge)) as PowerGauge;
        accelerationGauge = FindObjectOfType(typeof(AccelerationGauge)) as AccelerationGauge;
        fuelConsumptionGauge = FindObjectOfType(typeof(FuelConsumptionGauge)) as FuelConsumptionGauge;
    }
Example #4
0
    protected void Start()
    {
        hull        = FindObjectOfType(typeof(Hull)) as Hull;
        inventory   = FindObjectOfType(typeof(Inventory)) as Inventory;
        crewGauge   = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge   = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        massGauge            = FindObjectOfType(typeof(MassGauge)) as MassGauge;
        powerGauge           = FindObjectOfType(typeof(PowerGauge)) as PowerGauge;
        accelerationGauge    = FindObjectOfType(typeof(AccelerationGauge)) as AccelerationGauge;
        fuelConsumptionGauge = FindObjectOfType(typeof(FuelConsumptionGauge)) as FuelConsumptionGauge;
    }
Example #5
0
    void Start()
    {
        rootObjects = new List <GameObject>();
        foreach (GameObject obj in UnityEngine.Object.FindObjectsOfType(typeof(GameObject)))
        {
            if (obj.transform.parent == null)
            {
                rootObjects.Add(obj);
            }
        }
        playerShip  = FindObjectOfType(typeof(PlayerShip)) as Ship;
        hotSeatShip = FindObjectOfType(typeof(HotSeatShip)) as Ship;
        enemyShip   = FindObjectOfType(typeof(AiShip)) as Ship;
        crewGauge   = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge   = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        playerShip.transform.position  = new Vector3(11f, 0f, 0f);
        hotSeatShip.transform.position = new Vector3(-11f, 0f, 0f);
    }
    void Start()
    {
        crewGauge = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        // player ship
        playerShip = Instantiate(playerShipPrefab) as SolarSystemPlayerShip;
    }
Example #7
0
    void Start()
    {
        rootObjects = new List<GameObject>();
        foreach (GameObject obj in UnityEngine.Object.FindObjectsOfType(typeof(GameObject))) {
            if (obj.transform.parent == null) {
                rootObjects.Add(obj);
            }
        }
        playerShip = FindObjectOfType(typeof(PlayerShip)) as Ship;
        hotSeatShip = FindObjectOfType(typeof(HotSeatShip)) as Ship;
        enemyShip = FindObjectOfType(typeof(AiShip)) as Ship;
        crewGauge = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
        fuelGauge = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
        energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;

        playerShip.transform.position = new Vector3(11f, 0f, 0f);
        hotSeatShip.transform.position = new Vector3(-11f, 0f, 0f);
    }
Example #8
0
 void Start()
 {
     playerShip = FindObjectOfType(typeof(PlayerShip)) as Ship;
     crewGauge = FindObjectOfType(typeof(CrewGauge)) as CrewGauge;
     fuelGauge = FindObjectOfType(typeof(FuelGauge)) as FuelGauge;
     energyGauge = FindObjectOfType(typeof(EnergyGauge)) as EnergyGauge;
 }