示例#1
0
 public static void getAction(KeyboardState kState, ref ME_Element.ElemType actualType, ref Game1.ME_ActualAction action)
 {
     if (kState.IsKeyDown(Keys.T) && kState.IsKeyDown(Keys.LeftControl))
     {
         action = Game1.ME_ActualAction.Placing;
         actualType = ME_Element.ElemType.Tree;
     }
     else if (kState.IsKeyDown(Keys.W) && kState.IsKeyDown(Keys.LeftControl))
     {
         action = Game1.ME_ActualAction.Placing;
         actualType = ME_Element.ElemType.Water;
     }
     else if (kState.IsKeyDown(Keys.B) && kState.IsKeyDown(Keys.LeftControl))
     {
         action = Game1.ME_ActualAction.Placing;
         actualType = ME_Element.ElemType.Bridge;
     }
     else if (kState.IsKeyDown(Keys.S) && kState.IsKeyDown(Keys.LeftControl))
     {
         action = Game1.ME_ActualAction.Placing;
         actualType = ME_Element.ElemType.Stone;
     }
     else if (kState.IsKeyDown(Keys.N) && kState.IsKeyDown(Keys.LeftControl))
     {
         action = Game1.ME_ActualAction.Placing;
         actualType = ME_Element.ElemType.Null;
     }
     else if (kState.IsKeyDown(Keys.Enter))
     {
         action = Game1.ME_ActualAction.Texting;
         actualType = ME_Element.ElemType.Null;
     }
 }
示例#2
0
文件: Program.cs 项目: Jh87S/TLN
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }