コード例 #1
0
ファイル: RankInfo.cs プロジェクト: yuri410/lrvbsvnicg
        public RankInfo(Code2015 game, Game parent, GameScene scene, GameState logic)
        {
            this.game = game;
            this.parent = parent;
            this.scene = scene;
            this.gameLogic = logic;
            this.renderSys = game.RenderSystem;

          

            FileLocation fl = FileSystem.Instance.Locate("nig_rank_bk.tex", GameFileLocs.GUI);
            rankBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_home.tex", GameFileLocs.GUI);
            homeBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_rank_color.tex", GameFileLocs.GUI);
            rankColor = UITextureManager.Instance.CreateInstance(fl);

            f6 = GameFontManager.Instance.FRuanEdged4;
            f8 = GameFontManager.Instance.FRuanEdged6;

           
            //for (int i = 0; i < gameLogic.LocalPlayerCount; i++)
                //players.Add(gameLogic.GetLocalPlayer(i));
        }
コード例 #2
0
ファイル: NIGObjective.cs プロジェクト: yuri410/lrvbsvnicg
        public NIGObjective(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.parent = parent;
            this.game = game;
            this.renderSys = game.RenderSystem;
            this.scene = scene;
            this.gameLogic = gamelogic;

            FileLocation fl = FileSystem.Instance.Locate("nig_objective_bg.tex", GameFileLocs.GUI);
            background = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_objective_btn.tex", GameFileLocs.GUI);
            okButton = new Button();
            okButton.Image = UITextureManager.Instance.CreateInstance(fl);
            okButton.X = 748;
            okButton.Y = 337; 
            okButton.Width = okButton.Image.Width;
            okButton.Height = okButton.Image.Height;
            okButton.Enabled = true;
            okButton.IsValid = true;
            okButton.MouseClick += OkButton_Click;


            fl = FileSystem.Instance.Locate("bg_black.tex", GameFileLocs.GUI);
            overlay = UITextureManager.Instance.CreateInstance(fl);
            state = NIGDialogState.Hiding;
        }
コード例 #3
0
ファイル: ExitGame.cs プロジェクト: yuri410/lrvbsvnicg
        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;
            

        }
コード例 #4
0
ファイル: NIGFail.cs プロジェクト: yuri410/lrvbsvnicg
        public NIGFail(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.parent = parent;
            this.game = game;
            this.renderSys = game.RenderSystem;
            this.scene = scene;
            this.gameLogic = gamelogic;
         
            FileLocation fl = FileSystem.Instance.Locate("nig_fail_bg.tex", GameFileLocs.GUI);
            background = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_fail_fail.tex", GameFileLocs.GUI);
            failTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_result_back.tex", GameFileLocs.GUI);
            backButton = new Button();
            backButton.Image = UITextureManager.Instance.CreateInstance(fl);
            backButton.X = 450;
            backButton.Y = 530;
            backButton.Width = backButton.Image.Width;
            backButton.Height = backButton.Image.Height;
            backButton.Enabled = true;
            backButton.IsValid = true;
            backButton.MouseClick += BackButton_Click;

            fl = FileSystem.Instance.Locate("nig_result_replay.tex", GameFileLocs.GUI);
            replayButton = new Button();
            replayButton.Image = UITextureManager.Instance.CreateInstance(fl);
            replayButton.X = 738;
            replayButton.Y = 512;
            replayButton.Width = replayButton.Image.Width;
            replayButton.Height = replayButton.Image.Height;
            replayButton.Enabled = true;
            replayButton.IsValid = true;
            replayButton.MouseClick += ReplayButton_Click;

            fl = FileSystem.Instance.Locate("nig_rank_bk.tex", GameFileLocs.GUI);
            rankBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_home.tex", GameFileLocs.GUI);
            homeBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_rank_color.tex", GameFileLocs.GUI);
            rankColor = UITextureManager.Instance.CreateInstance(fl);

            f6 = GameFontManager.Instance.FRuanEdged4;
            f8 = GameFontManager.Instance.FRuanEdged6;


            
            fl = FileSystem.Instance.Locate("bg_black.tex", GameFileLocs.GUI);
            overlay = UITextureManager.Instance.CreateInstance(fl);
            state = NIGDialogState.Hiding;

        }
コード例 #5
0
ファイル: Quest.cs プロジェクト: yuri410/lrvbsvnicg
        public Quest(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.scene = scene;
            this.renderSys = game.RenderSystem;
            this.gameLogic = gamelogic;
            this.parent = parent;
            this.game = game;

            FileLocation fl = FileSystem.Instance.Locate("nig_quest.tex", GameFileLocs.GUI);
            background = UITextureManager.Instance.CreateInstance(fl);

            player = gamelogic.LocalHumanPlayer;

            fedge6 = GameFontManager.Instance.FRuanEdged8;
        }
コード例 #6
0
ファイル: NIGMenu.cs プロジェクト: yuri410/lrvbsvnicg
        public NIGMenu(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.parent = parent;
            this.game = game;
            this.renderSys = game.RenderSystem;
            this.scene = scene;
            this.gameLogic = gamelogic;
         
            FileLocation fl = FileSystem.Instance.Locate("nig_m_bg.tex", GameFileLocs.GUI);
            background = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("bg_black.tex", GameFileLocs.GUI);
            overlay = UITextureManager.Instance.CreateInstance(fl);
            state = NIGDialogState.Hiding;

            fl = FileSystem.Instance.Locate("nig_m_btn_resume.tex", GameFileLocs.GUI);
            resumeButton = new Button();
            resumeButton.Image = UITextureManager.Instance.CreateInstance(fl);
            resumeButton.X = 566;
            resumeButton.Y = 211;
            resumeButton.Width = resumeButton.Image.Width;
            resumeButton.Height = resumeButton.Image.Height;
            resumeButton.Enabled = true;
            resumeButton.IsValid = true;
            resumeButton.MouseClick += ResumeButton_Click;

            fl = FileSystem.Instance.Locate("nig_m_btn_restart.tex", GameFileLocs.GUI);
            restartButton = new Button();
            restartButton.Image = UITextureManager.Instance.CreateInstance(fl);
            restartButton.X = 560;
            restartButton.Y = 276;
            restartButton.Width = restartButton.Image.Width;
            restartButton.Height = restartButton.Image.Height;
            restartButton.Enabled = true;
            restartButton.IsValid = true;
            restartButton.MouseClick += RestartButton_Click;

            fl = FileSystem.Instance.Locate("nig_m_btn_back.tex", GameFileLocs.GUI);
            exitButton = new Button();
            exitButton.Image = UITextureManager.Instance.CreateInstance(fl);
            exitButton.X = 582;
            exitButton.Y = 339;
            exitButton.Width = exitButton.Image.Width;
            exitButton.Height = exitButton.Image.Height;
            exitButton.Enabled = true;
            exitButton.IsValid = true;
            exitButton.MouseClick += ExitButton_Click;
        }
コード例 #7
0
ファイル: MiniMap.cs プロジェクト: yuri410/lrvbsvnicg
        //float rot;

        public MiniMap(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.parent = parent;
            this.game = game;
            this.renderSys = game.RenderSystem;
            this.scene = scene;
            this.gameLogic = gamelogic;
            this.camera = scene.Camera;

            FileLocation fl = FileSystem.Instance.Locate("nig_minimap.tex", GameFileLocs.GUI);
            background = UITextureManager.Instance.CreateInstance(fl);


            #region 内容显示
            fl = FileSystem.Instance.Locate("ig_map_view.tex", GameFileLocs.GUI);
            cameraView = UITextureManager.Instance.CreateInstance(fl);


            //fl = FileSystem.Instance.Locate("ig_mp_redpoint.tex", GameFileLocs.GUI);
            //redDot = UITextureManager.Instance.CreateInstance(fl);
            //fl = FileSystem.Instance.Locate("ig_mp_greenpoint.tex", GameFileLocs.GUI);
            //greenDot = UITextureManager.Instance.CreateInstance(fl);
            //fl = FileSystem.Instance.Locate("ig_mp_yellowpoint.tex", GameFileLocs.GUI);
            //yellowDot = UITextureManager.Instance.CreateInstance(fl);
            //fl = FileSystem.Instance.Locate("ig_mp_bluepoint.tex", GameFileLocs.GUI);
            //blueDot = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("nig_mp_dot.tex", GameFileLocs.GUI);
            mapdot = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_mp_circle.tex", GameFileLocs.GUI);
            mapCircle = UITextureManager.Instance.CreateInstance(fl);


            //fl = FileSystem.Instance.Locate("ig_mp_red.tex", GameFileLocs.GUI);
            //redRing  = UITextureManager.Instance.CreateInstance(fl);
            //fl = FileSystem.Instance.Locate("ig_mp_green.tex", GameFileLocs.GUI);
            //greenRing = UITextureManager.Instance.CreateInstance(fl);
            //fl = FileSystem.Instance.Locate("ig_mp_yellow.tex", GameFileLocs.GUI);
            //yellowRing = UITextureManager.Instance.CreateInstance(fl);
            //fl = FileSystem.Instance.Locate("ig_mp_blue.tex", GameFileLocs.GUI);
            //blueRing = UITextureManager.Instance.CreateInstance(fl);

            #endregion

        }
コード例 #8
0
ファイル: RBallTypeSelect.cs プロジェクト: yuri410/lrvbsvnicg
        public RBallTypeSelect(Code2015 game, Game parent, GameScene scene, GameState logic)
        {
            this.game = game;
            this.parent = parent;
            this.scene = scene;
            this.gameLogic = logic;
            this.player = parent.HumanPlayer;
            this.renderSys = game.RenderSystem;

            FileLocation fl = FileSystem.Instance.Locate("nig_icon_green.tex", GameFileLocs.GUI);
            greenBallBtn = UITextureManager.Instance.CreateInstance(fl);


            fl = FileSystem.Instance.Locate("nig_icon_edu.tex", GameFileLocs.GUI);
            educationBallBtn = UITextureManager.Instance.CreateInstance(fl);


            fl = FileSystem.Instance.Locate("nig_icon_hospital.tex", GameFileLocs.GUI);
            healthBallBtn = UITextureManager.Instance.CreateInstance(fl);



            fl = FileSystem.Instance.Locate("nig_send_ball.tex", GameFileLocs.GUI);
            background = UITextureManager.Instance.CreateInstance(fl);

            backgroundSelected = new Texture[3];
            fl = FileSystem.Instance.Locate("nig_send_ball_s1.tex", GameFileLocs.GUI);
            backgroundSelected[0] = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("nig_send_ball_s2.tex", GameFileLocs.GUI);
            backgroundSelected[1] = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("nig_send_ball_s3.tex", GameFileLocs.GUI);
            backgroundSelected[2] = UITextureManager.Instance.CreateInstance(fl);


            f8 = GameFontManager.Instance.FRuanEdged8;

            resBallsCount[0].Type = RBallType.Green;
            resBallsCount[0].count = 0;

            resBallsCount[1].Type = RBallType.Education;
            resBallsCount[1].count = 0;

            resBallsCount[2].Type = RBallType.Health;
            resBallsCount[2].count = 0;


        }
コード例 #9
0
ファイル: CitySelectInfo.cs プロジェクト: yuri410/lrvbsvnicg
        public CitySelectInfo(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.scene = scene;
            this.renderSys = game.RenderSystem;
            this.player = parent.HumanPlayer;
            this.gameLogic = gamelogic;
            this.parent = parent;
            this.game = game;

            FileLocation fl = FileSystem.Instance.Locate("nig_status_bk.tex", GameFileLocs.GUI);
            statusBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_enemyCity.tex", GameFileLocs.GUI);
            statusEnemyBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_hp_group.tex", GameFileLocs.GUI);
            statusHPBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_exp_bk.tex", GameFileLocs.GUI);
            statusExpBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_hp.tex", GameFileLocs.GUI);
            statusHPTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_exp.tex", GameFileLocs.GUI);
            statusExpTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_exp_buff.tex", GameFileLocs.GUI);
            statusExpBuffTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_hp_buff.tex", GameFileLocs.GUI);
            statusHPBufferTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_expdown_buff.tex", GameFileLocs.GUI);
            statusExpdownBuff = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_city_hp_group.tex", GameFileLocs.GUI);
            onCityHPBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_city_hp.tex", GameFileLocs.GUI);
            onCityHPTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_city_hp_bk.tex", GameFileLocs.GUI);
            onCityHPBase = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_icon_green.tex", GameFileLocs.GUI);
            greenBallTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_icon_edu.tex", GameFileLocs.GUI);
            educationBallTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_icon_hospital.tex", GameFileLocs.GUI);
            healthBallTex = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_city_produceprg.tex", GameFileLocs.GUI);
            statusProducePrgTex = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("nig_max_balls.tex", GameFileLocs.GUI);
            statusMaxBalls = UITextureManager.Instance.CreateInstance(fl);

            resBallsCount[0].Type = RBallType.Green;
            resBallsCount[0].count = 0;

            resBallsCount[1].Type = RBallType.Education;
            resBallsCount[1].count = 0;

            resBallsCount[2].Type = RBallType.Health;
            resBallsCount[2].count = 0;

            f8 = GameFontManager.Instance.FRuanEdged8;
            f6 = GameFontManager.Instance.FRuanEdged6;

        }
コード例 #10
0
ファイル: Game.cs プロジェクト: yuri410/lrvbsvnicg
        public void Dispose()
        {
            if (!Disposed)
            {
                ingameUI.Dispose();
                ingameUI = null;


                scene = null;
                soundWorld = null;
                gameState = null;

                Disposed = true;
            }
            else 
            {
                throw new ObjectDisposedException(ToString());
            }
   
        }
コード例 #11
0
ファイル: Game.cs プロジェクト: yuri410/lrvbsvnicg
        public Game(Code2015 game, GameCreationParameters gcp)
        {
            this.game = game;
            this.renderSys = game.RenderSystem;
            this.parameters = gcp;
            this.soundWorld = new SoundObjectWorld();
            
            gameState = new GameState(GetLocalPlayers(gcp));

            BattleField field = gameState.Field;
            // 初始化场景
            this.scene = new GameScene(renderSys);
           

            
            field.ResourceBallChanged += Field_ResourceBallChanged;

            for (int i = 0; i < field.CityCount; i++)
            {
                City city = field.Cities[i];

                city.InitalizeGraphics(renderSys);
                city.CityVisible += scene.City_Visible;

                GatherCity gaCity = city as GatherCity;
                if (gaCity != null)
                {
                    gaCity.Harvester.InitializeGraphics(renderSys);
                    scene.Scene.AddObjectToScene(gaCity.Harvester);
                }
                scene.Scene.AddObjectToScene(city);
            }

            field.Fog.InitailizeGraphics(renderSys);

            AddResources(field);
            AddScenery(field);
            
            gameState.InitialStandards();
            {
                HumanPlayer = gameState.LocalHumanPlayer;
                City hstart = HumanPlayer.Area.RootCity;
                this.scene.Camera.Longitude = MathEx.Degree2Radian(hstart.Longitude);
                this.scene.Camera.Latitude = MathEx.Degree2Radian(hstart.Latitude);
            }
            this.ingameUI = new InGameUI(game, this, scene, gameState);
        }
コード例 #12
0
ファイル: InGameUI.cs プロジェクト: yuri410/lrvbsvnicg
        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);

            
        }
コード例 #13
0
ファイル: Cursor.cs プロジェクト: yuri410/lrvbsvnicg
        public Cursor(Code2015 game, Game parent, GameScene scene, GameState gamelogic, Picker picker,
             CitySelectInfo citySelectInfo, ObjectSelectInfo objSelectInfo, RBallTypeSelect sendBallSelect, MiniMap map, SelectionMarker marker, RankInfo rankInfo)
        {
            this.parent = parent;
            this.logic = gamelogic;
            this.player = gamelogic.LocalHumanPlayer;
            this.rankInfo = rankInfo;

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

            this.picker = picker;

            this.selectionMarker = marker;
            this.citySelectInfo = citySelectInfo;
            this.objSelectInfo = objSelectInfo;
            this.sendBallSelect = sendBallSelect;
            this.miniMap = map;

            FileLocation fl = FileSystem.Instance.Locate("cursor.tex", GameFileLocs.GUI);
            cursor = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("cursor_u.tex", GameFileLocs.GUI);
            cursor_up = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_l.tex", GameFileLocs.GUI);
            cursor_left = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_d.tex", GameFileLocs.GUI);
            cursor_down = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_r.tex", GameFileLocs.GUI);
            cursor_right = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("cursor_lu.tex", GameFileLocs.GUI);
            cursor_ul = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_ru.tex", GameFileLocs.GUI);
            cursor_ur = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_ld.tex", GameFileLocs.GUI);
            cursor_dl = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_rd.tex", GameFileLocs.GUI);
            cursor_dr = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("cursor_move.tex", GameFileLocs.GUI);
            cursor_move = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("cursor_stop.tex", GameFileLocs.GUI);
            cursor_stop = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("cursor_toofar.tex", GameFileLocs.GUI);
            cursor_toofar = UITextureManager.Instance.CreateInstance(fl);

            cursor_sel = new Texture[11];

            for (int i = 0; i < cursor_sel.Length; i++)
            {
                fl = FileSystem.Instance.Locate("selcursor" + (i + 13).ToString("D2") + ".tex", GameFileLocs.GUI);
                cursor_sel[i] = UITextureManager.Instance.CreateInstance(fl);
            }

            cursor_attack = new Texture[11];
            for (int i = 0; i < cursor_attack.Length; i++)
            {
                fl = FileSystem.Instance.Locate("selcursor" + (i + 1).ToString("D2") + ".tex", GameFileLocs.GUI);
                cursor_attack[i] = UITextureManager.Instance.CreateInstance(fl);
            }

            cursorState = MouseCursor.Normal;

        }
コード例 #14
0
ファイル: Picker.cs プロジェクト: yuri410/lrvbsvnicg
 public Picker(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
 {
     this.parent = parent;
     this.game = game;
     this.renderSys = game.RenderSystem;
     this.scene = scene;
     this.logic = gamelogic;
     this.camera = scene.Camera;
 }
コード例 #15
0
        public ObjectSelectInfo(Code2015 game, Game parent, GameScene scene, GameState gamelogic)
        {
            this.scene = scene;
            this.renderSys = game.RenderSystem;
            this.player = parent.HumanPlayer;
            this.gameLogic = gamelogic;
            this.parent = parent;
            this.game = game;


            #region Harv
            FileLocation fl = FileSystem.Instance.Locate("nig_status_harv_bk.tex", GameFileLocs.GUI);
            statusHarvBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_harv_hpbar_edge.tex", GameFileLocs.GUI);
            statusHPBarBarEdge = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_harv_hpbar_value.tex", GameFileLocs.GUI);
            statusHPBarBarValue = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_harv_stbar_edge.tex", GameFileLocs.GUI);
            statusSTBarBarEdge = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_harv_stbar_value.tex", GameFileLocs.GUI);
            statusSTBarBarValue = UITextureManager.Instance.CreateInstance(fl);

            #endregion


            fl = FileSystem.Instance.Locate("nig_status_empty.tex", GameFileLocs.GUI);
            statusEmptyBackground = UITextureManager.Instance.CreateInstance(fl);


            #region Green
            fl = FileSystem.Instance.Locate("nig_status_green_bk.tex", GameFileLocs.GUI);
            statusGreenBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_green_bar_edge.tex", GameFileLocs.GUI);
            statusGreenBarEdge = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_green_bar_value.tex", GameFileLocs.GUI);
            statusGreenBarValue = UITextureManager.Instance.CreateInstance(fl);
            #endregion

            #region Oil

            fl = FileSystem.Instance.Locate("nig_status_oil_bk.tex", GameFileLocs.GUI);
            statusOilBackground = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_oil_bar_edge.tex", GameFileLocs.GUI);
            statusOilBarEdge = UITextureManager.Instance.CreateInstance(fl);

            fl = FileSystem.Instance.Locate("nig_status_oil_bar_value.tex", GameFileLocs.GUI);
            statusOilBarValue = UITextureManager.Instance.CreateInstance(fl);

            #endregion

            fl = FileSystem.Instance.Locate("nig_harv_hp_edge.tex", GameFileLocs.GUI);
            harvHPBorader = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("nig_harv_hp_value.tex", GameFileLocs.GUI);
            harvHPValue = UITextureManager.Instance.CreateInstance(fl);
            fl = FileSystem.Instance.Locate("nig_harv_hp_bg.tex", GameFileLocs.GUI);
            harvHPBarBackground = UITextureManager.Instance.CreateInstance(fl);

            f8 = GameFontManager.Instance.FRuanEdged8;
            f6 = GameFontManager.Instance.FRuanEdged6;


        }