public override void Enter(IActor actor) { base.Enter(actor); if (ColorsMatch(actor)) { actor.ChangeSpeed(this); } enterDirection = actor.GetDirection(); }
public override void Exit(IActor actor) { base.Exit(actor); if (actor.GetDirection() == -enterDirection) { if (ColorsMatch(actor)) { actor.ChangeSpeed(this); } } }