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(); } }
public void Apply(FloatVariable v) { value += v.value; }