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; } }
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(IntVariable v) { value += v.value; }