Exemplo n.º 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);
        }
    }
Exemplo n.º 2
0
    public override bool Equals(object obj)
    {
        UpdatePressure o = obj as UpdatePressure;

        return(o != null && target.Equals(o.target) && changed.Equals(o.changed));
    }