Example #1
0
 /*
  *      ==========================================
  *      COMPARE TWO POINTS (MATRIX COORDINATES !)
  *      (RETURNS 1 IF EQUAL, 0 IF NOT):
  *      ==========================================
  */
 public int Compare(IsoPoint cmp)
 {
     if (PosXMatrix == cmp.PosXMatrix && PosYMatrix == cmp.PosYMatrix)
     {
         return(1);
     }
     return(0);
 }
Example #2
0
 public Unit()
 {
     pos = new IsoPoint();
     dest_pos = new IsoPoint();
     route = new Route();
     hasChangedTiles = false;
     route.routeActive = false;
 }
Example #3
0
 public Unit()
 {
     pos               = new IsoPoint();
     dest_pos          = new IsoPoint();
     route             = new Route();
     hasChangedTiles   = false;
     route.routeActive = false;
 }
Example #4
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            _gamemap = new Gmap(@"Content\gamefile.txt", @"Content\heightmap.txt");
            _cam     = new Camera();

            /*	THIS IS FOR THE CUSTOM CURSOR:	*/
            this.IsMouseVisible = true;
            Cursor myCursor = NativeMethods.LoadCustomCursor(@"Content\myCursor.cur");
            Form   winForm  = (Form)Form.FromHandle(this.Window.Handle);

            winForm.Cursor = myCursor;
            /*	CURSOR END.	*/

            /*	GET A FIRST KEYBOARD STATE:	*/
            KBstate_old = Keyboard.GetState();
            _cursor     = new IsoPoint();


            base.Initialize();
        }
Example #5
0
 /*
     ==========================================
     COMPARE TWO POINTS (MATRIX COORDINATES !)
     (RETURNS 1 IF EQUAL, 0 IF NOT):
     ==========================================
         */
 public int Compare(IsoPoint cmp)
 {
     if (PosXMatrix == cmp.PosXMatrix && PosYMatrix == cmp.PosYMatrix)
     {
         return 1;
     }
     return 0;
 }
Example #6
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            _gamemap = new Gmap(@"Content\gamefile.txt", @"Content\heightmap.txt");
            _cam = new Camera();

            /*	THIS IS FOR THE CUSTOM CURSOR:	*/
            this.IsMouseVisible = true;
            Cursor myCursor = NativeMethods.LoadCustomCursor(@"Content\myCursor.cur");
            Form winForm = (Form)Form.FromHandle(this.Window.Handle);
            winForm.Cursor = myCursor;
            /*	CURSOR END.	*/

            /*	GET A FIRST KEYBOARD STATE:	*/
            KBstate_old = Keyboard.GetState();
            _cursor = new IsoPoint();

            base.Initialize();
        }