public void Update(float Deltatime, EightWayPositions eightWayPositions) { if (this._currentDirection != eightWayPositions) { this._previousDirection = this._currentDirection; this._currentDirection = eightWayPositions; ActionToTake[this._currentDirection](); } }
public EightWayMovement(Dictionary <EightWayPositions, Action> Actions) { this._currentDirection = EightWayPositions.Dead; this._previousDirection = EightWayPositions.Dead; }