示例#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;
            }
        }
示例#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();
            }
        }
示例#3
0
 public void Apply(IntVariable v)
 {
     value += v.value;
 }