Exemplo n.º 1
0
        public void Add(NumberVariable v)
        {
            if (v is FloatVariable)
            {
                FloatVariable f = (FloatVariable)v;
                value += f.value;
            }

            if (v is IntVariable)
            {
                IntVariable i = (IntVariable)v;
                value += i.value;
            }
        }
Exemplo n.º 2
0
        public void Add(NumberVariable v)
        {
            if (v is FloatVariable)
            {
                FloatVariable f = (FloatVariable)v;
                _value += Mathf.RoundToInt(f.value);
            }

            if (v is IntVariable)
            {
                IntVariable i = (IntVariable)v;
                _value += i.value;
            }

            if (gameEvent != null)
            {
                gameEvent.Raise();
            }
        }
Exemplo n.º 3
0
 public void Apply(IntVariable v)
 {
     value += v.value;
 }