Ejemplo n.º 1
0
    public void DisconnectTank()
    {
        if (fuelTankConnected)
        {
            // Assign tank
            if (!fuelTank.IsActive())
            {
                fuelTank.uiFuelGuage.alpha = 0f;
            }
            fuelTank = null;

            // Fuel pad indicator lights
            foreach (MeshRenderer light in lights)
            {
                light.material = disconnectedMaterial;
            }
            foreach (Light light in glow)
            {
                light.color = disconnectedColour;
            }

            fuelTankConnected = false;
        }
    }