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; }
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; }
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() { 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); }