Ejemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (MainGame game = new MainGame())
     {
         game.Run();
     }
 }
Ejemplo n.º 2
0
 public void EditorOperate(MainGame.EditorOp op, int x, int y)
 {
     switch (op)
     {
         case MainGame.EditorOp.Move:
             if (_hostChunk != null)
             {
                 _hostChunk.Position = new Vector2(viewport.X + x, viewport.Y + y);
             }
             break;
         case MainGame.EditorOp.Scale:
             {
                 if (_hostChunk != null)
                 {
                     Vector2 s = _hostChunk.Size;
                     float f = Math.Max(x, y);
                     //Log.WriteLine(x.ToString());
                     s += new Vector2(f * 0.01f, f * 0.01f);
                     s.X = MathHelper.Clamp(s.X, 0.5f, 10.0f);
                     s.Y = MathHelper.Clamp(s.Y, 0.5f, 10.0f);
                     _hostChunk.Size = s;
                 }
             }
             break;
         case MainGame.EditorOp.Save:
             SaveHoverStones();
             break;
     }
 }