Ejemplo n.º 1
0
    public void CreateGas_PositiveAmountAndTemperature_GasOfTypeIncreasesByValue()
    {
        empty1.CreateGas("gas", 1.0f, 1.0f);
        notEmpty1.CreateGas("gas", 1.0f, 1.0f);

        Assert.AreEqual(1.0f, empty1.GetGasAmount("gas"));
        Assert.AreEqual(2.0f, notEmpty2.GetGasAmount("gas"));
    }
Ejemplo n.º 2
0
    public static void MovePercentageOfAtmosphere(AtmosphereComponent source, AtmosphereComponent destination, float ratio)
    {
        if (ratio < 0 || ratio > 1)
        {
            UnityDebugger.Debugger.Log("MovePercentageOfAtmosphere -- Ratio is out of bounds: " + ratio);
        }

        source.MoveGasTo(destination, ratio * source.GetGasAmount());
    }