Ejemplo n.º 1
0
        public ExitGame(Code2015 game, Game parent, GameScene scene, GameState gamelogic, NIGMenu nigMenu)
        {
            this.scene = scene;
            this.renderSys = game.RenderSystem;
            this.gameLogic = gamelogic;
            this.parent = parent;
            this.game = game;
            this.nigMenu = nigMenu;
            exitButton = new Button();

            FileLocation fl = FileSystem.Instance.Locate("nig_esc.tex", GameFileLocs.GUI);
            exitButton.Image = UITextureManager.Instance.CreateInstance(fl);
            exitButton.X = -13;
            exitButton.Y = 0;
            exitButton.Width = exitButton.Image.Width;
            exitButton.Height = exitButton.Image.Height;
            exitButton.Enabled = true;
            exitButton.IsValid = true;


            isButtonClicked = false;

            exitButton.MouseClick += ExitButton_Pressed;
            

        }
Ejemplo n.º 2
0
        public ExitGame(Code2015 game, Game parent, GameScene scene, GameState gamelogic, NIGMenu nigMenu)
        {
            this.scene     = scene;
            this.renderSys = game.RenderSystem;
            this.gameLogic = gamelogic;
            this.parent    = parent;
            this.game      = game;
            this.nigMenu   = nigMenu;
            exitButton     = new Button();

            FileLocation fl = FileSystem.Instance.Locate("nig_esc.tex", GameFileLocs.GUI);

            exitButton.Image   = UITextureManager.Instance.CreateInstance(fl);
            exitButton.X       = -13;
            exitButton.Y       = 0;
            exitButton.Width   = exitButton.Image.Width;
            exitButton.Height  = exitButton.Image.Height;
            exitButton.Enabled = true;
            exitButton.IsValid = true;


            isButtonClicked = false;

            exitButton.MouseClick += ExitButton_Pressed;
        }
Ejemplo n.º 3
0
        public InGameUI(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.parent = parent;
            this.logic = gamelogic;

            this.game = game;
            this.renderSys = game.RenderSystem;
            this.scene = scene;
        

            this.player = parent.HumanPlayer;


            picker = new Picker(game, parent, scene, gamelogic);
            AddElement(picker);


            //this.infoUI = new InfoUI(game, parent, scene, gamelogic);
            //AddElement(infoUI);

          
            this.miniMap = new MiniMap(game, parent, scene, gamelogic);
            AddElement(miniMap);
         

            //-----Ruan-----------


            cityStatusInfo = new CitySelectInfo(game, parent, scene, gamelogic);
            AddElement(cityStatusInfo);

            objectStatusInfo = new ObjectSelectInfo(game, parent, scene, gamelogic);
            AddElement(objectStatusInfo);

            sendBallSelect = new RBallTypeSelect(game, parent, scene, gamelogic);
            AddElement(sendBallSelect);



            nigMenu = new NIGMenu(game, parent, scene, gamelogic);
            AddElement(nigMenu);
            nigColor = new NIGColor(game, parent, scene, gamelogic);
            AddElement(nigColor);
            nigWin = new NIGWin(game, parent, scene, gamelogic);
            AddElement(nigWin);
            nigFail = new NIGFail(game, parent, scene, gamelogic);
            AddElement(nigFail);
            nigObjective = new NIGObjective(game, parent, scene, gamelogic);
            AddElement(nigObjective);
            nigColor = new NIGColor(game, parent, scene, gamelogic);
            AddElement(nigColor);

            rankInfo = new RankInfo(game, parent, scene, gamelogic);
            AddElement(rankInfo);

            selectionMarker = new SelectionMarker(renderSys, gamelogic.Field, player);
            scene.Scene.AddObjectToScene(selectionMarker);


            layeredCursor = new Cursor(game, parent, scene, gamelogic, picker, cityStatusInfo, objectStatusInfo,
                                           sendBallSelect,  miniMap, selectionMarker, rankInfo);
            AddElement(layeredCursor);


            exit = new ExitGame(game, parent, scene, gamelogic, nigMenu);
            AddElement(exit);

            quest = new Quest(game, parent, scene, gamelogic);
            AddElement(quest);

            
        }