コード例 #1
0
ファイル: CKeyboard.cs プロジェクト: ProjectSciFy/ZeldaRemake
 public CKeyboard(ZeldaGame game)
 {
     linkState = game.linkStateMachine;
     bombState = game.bombStateMachine;
     this.game = game;
     keyBinds.Add(Keys.Up, new MoveLink(linkState, LinkStateMachine.Direction.up));
     keyBinds.Add(Keys.W, new MoveLink(linkState, LinkStateMachine.Direction.up));
     keyBinds.Add(Keys.Left, new MoveLink(linkState, LinkStateMachine.Direction.left));
     keyBinds.Add(Keys.A, new MoveLink(linkState, LinkStateMachine.Direction.left));
     keyBinds.Add(Keys.Down, new MoveLink(linkState, LinkStateMachine.Direction.down));
     keyBinds.Add(Keys.S, new MoveLink(linkState, LinkStateMachine.Direction.down));
     keyBinds.Add(Keys.Right, new MoveLink(linkState, LinkStateMachine.Direction.right));
     keyBinds.Add(Keys.D, new MoveLink(linkState, LinkStateMachine.Direction.right));
     keyBinds.Add(Keys.LeftShift, new RollLink(linkState));
     keyBinds.Add(Keys.T, new TwoPlayer(game));
     keyBinds.Add(Keys.N, new PrimaryWeaponLink(linkState));
     keyBinds.Add(Keys.Z, new PrimaryWeaponLink(linkState));
     keyBinds.Add(Keys.X, new SecondaryWeaponLink(linkState));
     keyBinds.Add(Keys.M, new SecondaryWeaponLink(linkState));
     keyBinds.Add(Keys.C, new PortalGunLink(game, linkState));
     keyBinds.Add(Keys.D2, new SecondaryWeaponSelect(linkState, LinkStateMachine.Weapon.bomb));
     keyBinds.Add(Keys.NumPad2, new SecondaryWeaponSelect(linkState, LinkStateMachine.Weapon.bomb));
     keyBinds.Add(Keys.D3, new SecondaryWeaponSelect(linkState, LinkStateMachine.Weapon.arrow));
     keyBinds.Add(Keys.NumPad3, new SecondaryWeaponSelect(linkState, LinkStateMachine.Weapon.arrow));
     keyBinds.Add(Keys.D4, new SecondaryWeaponSelect(linkState, LinkStateMachine.Weapon.boomerang));
     keyBinds.Add(Keys.NumPad4, new SecondaryWeaponSelect(linkState, LinkStateMachine.Weapon.boomerang));
     keyBinds.Add(Keys.Q, new ShutDownGame(game));
     keyBinds.Add(Keys.R, new Reset(game));
     keyBinds.Add(Keys.P, new Pause(game));
     keyBinds.Add(Keys.I, new Select(game));
     keyBinds.Add(Keys.K, new GiveKeys(game));
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: ProjectSciFy/ZeldaRemake
 static void Main()
 {
     using (var game = new ZeldaGame())
         game.Run();
 }