Ejemplo n.º 1
0
        //interpret mouse click
        public Action interpretClick(Globals G, HudManager HM)
        {
            Action    A        = null;
            Point     P        = new Point(G.mouseX, G.mouseY);
            Point     size     = new Point(1, 1);
            Rectangle mousePos = new Rectangle(P, size);
            int       i        = 0;

            //first and foremost, did we click on a hud element???
            for (i = 0; i < HM.hudGraphicsCount(); i++)
            {
                if (HM.getGraphicAt(i).getClickBox().Intersects(mousePos))
                {
                    A = HM.getGraphicAt(i).getAction();
                    A.setIndex(i);
                }
            }

            return(A);
        }
Ejemplo n.º 2
0
        public void gameInit()
        {
            populateTextureManager();

            //defaultFont = Content.Load<SpriteFont>("Arial");
            DT                 = new DateTime();
            M                  = new map("no bias", TM.tileTextures);
            G                  = new Globals();
            HM                 = new HudManager(TM);
            AM                 = new ActionManager();
            A                  = null;
            newAction          = false;
            elapsedSeconds     = 0;
            G.graphicsWidth    = 1280;
            G.graphicsHeight   = 720;
            G.tileSize         = 20;
            G.timeStamp        = 0;
            G.movementCooldown = 100;
            G.mouseText        = "";
            G.mouseSubText     = "";
        }
Ejemplo n.º 3
0
 public override void doAction(TextureManager TM, HudManager HM)
 {
     return;
 }
Ejemplo n.º 4
0
 public virtual void doAction(TextureManager TM, HudManager HM)
 {
     return;
 }