public override void PowerPillEaten(GhostFrightSession session) { base.PowerPillEaten(session); if (State == GhostState.Eyes) { return; } State = GhostState.Frightened; if (MovementMode == GhostMovementMode.Chase || MovementMode == GhostMovementMode.Scatter) { _whenInCenterOfNextTile = () => { DirectionInfo current = Direction; var c = switchDirectionForChaseOrScatter(current.Current); if (c != None) { Direction.Update(Down); } _mover = new GhostFrightenedMover(this, _maze); }; } }
public void SetFrightSession(GhostFrightSession value) { _frightSession = value ?? throw new ArgumentNullException(nameof(value)); }