Пример #1
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();
            }
        }
Пример #2
0
 public void Apply(FloatVariable v)
 {
     value += v.value;
 }