Beispiel #1
0
    public override void applyAction(BlockAction action)
    {
        UpdatePressure pu = action as UpdatePressure;

        if (pu != null)
        {
            Liquid liq = pu.changed as Liquid;
            if (liq != null)
            {
                float otherPressure = liq.getPressure();
                if (liq.getCoordinates().y > coords.y)
                {
                    otherPressure += liq.density;
                }
            }
        }
        else
        {
            Debug.LogError("Unknown action: " + action);
        }
    }