示例#1
0
		public RogueRenderer(DmGame game)
		{
			this.Game = game;
			this.Game.ChangedLevel += this.Game_ChangedLevel;

			this.console = new DmConsole(80, 25)
			{
				IsCursorVisible = false
			};
		}
示例#2
0
		public InputHandler(DmGame game)
		{
			this.game = game;

			this.parameterSets = new Dictionary<string, InputActionParameterSet>();
			this.parameterSets.Add("move", new InputActionParameterSet());
			this.parameterSets.Add("dev", new InputActionParameterSet());
			this.parameterSets.Add("game", new InputActionParameterSet());

			this.characterActions = new Dictionary<string, ICharacterAction>();
			this.characterActions.Add("move:north",     new MovementAction(this.game, Coordinate.North));
			this.characterActions.Add("move:northeast", new MovementAction(this.game, Coordinate.NorthEast));
			this.characterActions.Add("move:east",      new MovementAction(this.game, Coordinate.East));
			this.characterActions.Add("move:southeast", new MovementAction(this.game, Coordinate.SouthEast));
			this.characterActions.Add("move:south",     new MovementAction(this.game, Coordinate.South));
			this.characterActions.Add("move:southwest", new MovementAction(this.game, Coordinate.SouthWest));
			this.characterActions.Add("move:west",      new MovementAction(this.game, Coordinate.West));
			this.characterActions.Add("move:northwest", new MovementAction(this.game, Coordinate.NorthWest));

			this.inputActions = new Dictionary<string, InputAction>();
			this.inputActions.Add("game:quit", new QuitAction(this.game));
			this.inputActions.Add("dev:generate-level", new DevAction(this.game, "generate-level"));
		}