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 #2
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 #3
0
    private void _displayValuesOnGUI()
    {
        foreach (SensorAndValue obj in tripodSensors.SensorAndValueList)
        {
            //TODO: Switch statement for displaying text of each sensor (its value)
            switch (obj.sensor._dataID)
            {
            case 1:
                statusText.ProgramUpdate("Odczytano: " + obj.sensor.sensorName + " ID: " + obj.sensor._dataID + " value: " + obj.value);
                break;

            case 2:
                statusText.TripodStateUpdate("Odczytano: " + obj.sensor.sensorName + " ID: " + obj.sensor._dataID + " value: " + obj.value);
                break;

            case 3:
                statusText.CameraUpdate("Odczytano: " + obj.sensor.sensorName + " ID: " + obj.sensor._dataID + " value: " + obj.value);
                break;

            case 10:
                statusText.PosXUpdate("Odczytano: " + obj.sensor.sensorName + " ID: " + obj.sensor._dataID + " value: " + obj.value);
                break;

            case 11:
                statusText.PosYUpdate("Odczytano: " + obj.sensor.sensorName + " ID: " + obj.sensor._dataID + " value: " + obj.value);
                break;

            case 12:
                statusText.PosZUpdate("Odczytano: " + obj.sensor.sensorName + " ID: " + obj.sensor._dataID + " value: " + obj.value);
                break;

            case 20:
                statusText.VelocityUpdate((float)(obj.value) / 10000);
                VelocityGauge.ShowSpeed(obj.value, 0, 1000000);
                break;

            case 21:
                statusText.AccelerationUpdate((float)(obj.value) / 10000000);
                AccelerationGauge.ShowSpeed(obj.value, 0, 90000000);
                break;

            case 30:
                statusText.AirSupplyUpdate((float)(obj.value) / 10);
                AirSupplyGauge.ShowSpeed(obj.value, 0, 70);
                break;
            }
        }
    }
Example #4
0
 // Use this for initialization
 void Start()
 {
     _vGauge = this;
 }