예제 #1
0
        public override void Update(GameTime time)
        {
            mousePosition.X = MouseInput.X;
            mousePosition.Y = MouseInput.Y;


            if (state == NIGDialogState.MovingIn)
            {
                showPrg += time.ElapsedGameTimeSeconds * 4;
                if (showPrg > 1)
                {
                    showPrg = 1;
                    state   = NIGDialogState.Showing;
                }
            }
            else if (state == NIGDialogState.MovingOut)
            {
                showPrg -= time.ElapsedGameTimeSeconds * 4;
                if (showPrg < 0)
                {
                    showPrg = 0;
                    state   = NIGDialogState.Hiding;
                    parent.Back();
                }
            }

            if (state == NIGDialogState.Showing)
            {
                nextButton.Update(time);
                prevButton.Update(time);
                exitButton.Update(time);
            }
        }
예제 #2
0
 void Exit_Click(object sender, MouseButtonFlags btn)
 {
     if (btn == MouseButtonFlags.Left)
     {
         state = NIGDialogState.MovingOut;
     }
 }
예제 #3
0
        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;
        }
예제 #4
0
 public override void Update(Apoc3D.GameTime time)
 {
     if (state == NIGDialogState.MovingOut)
     {
         showPrg -= time.ElapsedGameTimeSeconds * 8;
         if (showPrg < 0)
         {
             showPrg = 0;
             state   = NIGDialogState.Hiding;
         }
     }
     else if (state == NIGDialogState.MovingIn)
     {
         showPrg += time.ElapsedGameTimeSeconds * 8;
         if (showPrg > 1)
         {
             showPrg = 1;
             state   = NIGDialogState.Showing;
         }
     }
     if (state == NIGDialogState.Showing)
     {
         resumeButton.Update(time);
         restartButton.Update(time);
         exitButton.Update(time);
     }
 }
예제 #5
0
        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;
        }
예제 #6
0
        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;
        }
예제 #7
0
        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;
        }
예제 #8
0
        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;
        }
예제 #9
0
        public override void Update(Apoc3D.GameTime time)
        {
            if (state == NIGDialogState.MovingOut)
            {
                showPrg -= time.ElapsedGameTimeSeconds * 8;
                if (showPrg < 0)
                {
                    showPrg = 0;
                    state   = NIGDialogState.Hiding;
                }
            }
            else if (state == NIGDialogState.MovingIn)
            {
                showPrg += time.ElapsedGameTimeSeconds * 8;
                if (showPrg > 1)
                {
                    showPrg = 1;
                    state   = NIGDialogState.Showing;
                }
            }
            if (state == NIGDialogState.Showing)
            {
                float dt = (float)time.ElapsedGameTime.TotalSeconds;
                if (clearProgress > 0)
                {
                    clearProgress -= dt;
                }
                else
                {
                    clearProgress = 0;
                }

                replayButton.Update(time);
                backButton.Update(time);
                nextButton.Update(time);
            }
            if (state == NIGDialogState.Hiding)
            {
                clearProgress = 1.8f;
            }
        }
예제 #10
0
        public override void Update(GameTime time)
        {
            mousePosition.X = MouseInput.X;
            mousePosition.Y = MouseInput.Y;


            if (state == NIGDialogState.MovingIn)
            {
                showPrg += time.ElapsedGameTimeSeconds * 4;
                if (showPrg > 1)
                {
                    showPrg = 1;
                    state = NIGDialogState.Showing;
                }
            }
            else if (state == NIGDialogState.MovingOut)
            {
                showPrg -= time.ElapsedGameTimeSeconds * 4;
                if (showPrg < 0)
                {
                    showPrg = 0;
                    state = NIGDialogState.Hiding;
                    parent.Back();
                }
            }

            if (state == NIGDialogState.Showing)
            {
                nextButton.Update(time);
                prevButton.Update(time);
                exitButton.Update(time);
            }
            
        }
예제 #11
0
 public override void Update(Apoc3D.GameTime time)
 {
     if (state == NIGDialogState.MovingOut)
     {
         showPrg -= time.ElapsedGameTimeSeconds * 8;
         if (showPrg < 0)
         {
             showPrg = 0;
             state = NIGDialogState.Hiding;
         }
     }
     else if (state == NIGDialogState.MovingIn)
     {
         showPrg += time.ElapsedGameTimeSeconds * 8;
         if (showPrg > 1)
         {
             showPrg = 1;
             state = NIGDialogState.Showing;
         }
     }
     if (state == NIGDialogState.Showing)
     {
         resumeButton.Update(time);
         restartButton.Update(time);
         exitButton.Update(time);
     }
 }
예제 #12
0
 public void Show()
 {
     state = NIGDialogState.MovingIn;
 }
예제 #13
0
        public Tutorial(Menu parent)
        {
            this.parent = parent;
            help        = new Texture[TotalPages];

            for (int i = 0; i < TotalPages; i++)
            {
                FileLocation fl = FileSystem.Instance.Locate((i + 1).ToString() + ".tex", GameFileLocs.Help);
                help[i] = UITextureManager.Instance.CreateInstance(fl);
            }


            FileLocation fl2 = FileSystem.Instance.Locate("help_bg.tex", GameFileLocs.GUI);

            background = UITextureManager.Instance.CreateInstance(fl2);

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



            fl2     = FileSystem.Instance.Locate("help_next.tex", GameFileLocs.GUI);
            nextBtn = UITextureManager.Instance.CreateInstance(fl2);
            fl2     = FileSystem.Instance.Locate("help_back.tex", GameFileLocs.GUI);
            prevBtn = UITextureManager.Instance.CreateInstance(fl2);
            fl2     = FileSystem.Instance.Locate("nig_m_btn_back.tex", GameFileLocs.GUI);
            exitBtn = UITextureManager.Instance.CreateInstance(fl2);

            fl2   = FileSystem.Instance.Locate("help_panel.tex", GameFileLocs.GUI);
            panel = UITextureManager.Instance.CreateInstance(fl2);


            nextButton             = new Button();
            nextButton.Enabled     = true;
            nextButton.IsValid     = true;
            nextButton.X           = 655;
            nextButton.Y           = 535;
            nextButton.Width       = nextBtn.Width;
            nextButton.Height      = nextBtn.Height;
            nextButton.MouseClick += Continue_Click;
            nextButton.MouseEnter += Button_MouseIn;
            nextButton.MouseDown  += Button_DownSound;

            prevButton             = new Button();
            prevButton.Enabled     = true;
            prevButton.IsValid     = true;
            prevButton.X           = 498;
            prevButton.Y           = 540;
            prevButton.Width       = prevBtn.Width;
            prevButton.Height      = prevBtn.Height;
            prevButton.MouseClick += Prev_Click;
            prevButton.MouseEnter += Button_MouseIn;
            prevButton.MouseDown  += Button_DownSound;

            exitButton             = new Button();
            exitButton.Enabled     = true;
            exitButton.IsValid     = true;
            exitButton.X           = 980;
            exitButton.Y           = 555;
            exitButton.Width       = exitBtn.Width;
            exitButton.Height      = exitBtn.Height;
            exitButton.MouseClick += Exit_Click;
            exitButton.MouseEnter += Button_MouseIn;
            exitButton.MouseDown  += Button_DownSound;


            mouseHover = (NormalSoundObject)SoundManager.Instance.MakeSoundObjcet("buttonHover", null, 0);
            mouseDown  = (NormalSoundObject)SoundManager.Instance.MakeSoundObjcet("buttonDown", null, 0);

            state = NIGDialogState.Hiding;
        }
예제 #14
0
 public void Hide()
 {
     state = NIGDialogState.MovingOut;
 }
예제 #15
0
 void Close()
 {
     state = NIGDialogState.MovingOut;
 }
예제 #16
0
 public void NotifyShown() 
 {
     state = NIGDialogState.MovingIn;
 }
예제 #17
0
        public override void Update(Apoc3D.GameTime time)
        {
            if (state == NIGDialogState.MovingOut)
            {
                showPrg -= time.ElapsedGameTimeSeconds * 8;
                if (showPrg < 0)
                {
                    showPrg = 0;
                    state = NIGDialogState.Hiding;
                }
            }
            else if (state == NIGDialogState.MovingIn)
            {
                showPrg += time.ElapsedGameTimeSeconds * 8;
                if (showPrg > 1)
                {
                    showPrg = 1;
                    state = NIGDialogState.Showing;
                }
            }
            if (state == NIGDialogState.Showing)
            {
                replayButton.Update(time);
                backButton.Update(time);

                float dt = (float)time.ElapsedGameTime.TotalSeconds;
                if (clearProgress > 0)
                {
                    clearProgress -= dt;
                }
                else
                {
                    clearProgress = 0;
                }
            }
            if (state == NIGDialogState.Hiding)
            {
                clearProgress = 1.8f;
            }
        }
예제 #18
0
 public void Show()
 {
     state = NIGDialogState.MovingIn;
 }
예제 #19
0
 void Exit_Click(object sender, MouseButtonFlags btn)
 {
     if (btn == MouseButtonFlags.Left)
     {
         state = NIGDialogState.MovingOut;
     }
 }
예제 #20
0
        void Close() 
        {

            state = NIGDialogState.MovingOut;

        }
예제 #21
0
 public void Hide()
 {
     state = NIGDialogState.MovingOut;
 }
예제 #22
0
        public Tutorial(Menu parent)
        {
            this.parent = parent;
            help = new Texture[TotalPages];

            for (int i = 0; i < TotalPages; i++)
            {
                FileLocation fl = FileSystem.Instance.Locate((i + 1).ToString() + ".tex", GameFileLocs.Help);
                help[i] = UITextureManager.Instance.CreateInstance(fl);

            }


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

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



            fl2 = FileSystem.Instance.Locate("help_next.tex", GameFileLocs.GUI);
            nextBtn = UITextureManager.Instance.CreateInstance(fl2);
            fl2 = FileSystem.Instance.Locate("help_back.tex", GameFileLocs.GUI);
            prevBtn = UITextureManager.Instance.CreateInstance(fl2);
            fl2 = FileSystem.Instance.Locate("nig_m_btn_back.tex", GameFileLocs.GUI);
            exitBtn = UITextureManager.Instance.CreateInstance(fl2);

            fl2 = FileSystem.Instance.Locate("help_panel.tex", GameFileLocs.GUI);
            panel = UITextureManager.Instance.CreateInstance(fl2);


            nextButton = new Button();
            nextButton.Enabled = true;
            nextButton.IsValid = true;
            nextButton.X = 655;
            nextButton.Y = 535;
            nextButton.Width = nextBtn.Width;
            nextButton.Height = nextBtn.Height;
            nextButton.MouseClick += Continue_Click;
            nextButton.MouseEnter += Button_MouseIn;
            nextButton.MouseDown += Button_DownSound;

            prevButton = new Button();
            prevButton.Enabled = true;
            prevButton.IsValid = true;
            prevButton.X = 498;
            prevButton.Y = 540;
            prevButton.Width = prevBtn.Width;
            prevButton.Height = prevBtn.Height;
            prevButton.MouseClick += Prev_Click;
            prevButton.MouseEnter += Button_MouseIn;
            prevButton.MouseDown += Button_DownSound;

            exitButton = new Button();
            exitButton.Enabled = true;
            exitButton.IsValid = true;
            exitButton.X = 980;
            exitButton.Y = 555;
            exitButton.Width = exitBtn.Width;
            exitButton.Height = exitBtn.Height;
            exitButton.MouseClick += Exit_Click;
            exitButton.MouseEnter += Button_MouseIn;
            exitButton.MouseDown += Button_DownSound;


            mouseHover = (NormalSoundObject)SoundManager.Instance.MakeSoundObjcet("buttonHover", null, 0);
            mouseDown = (NormalSoundObject)SoundManager.Instance.MakeSoundObjcet("buttonDown", null, 0);

            state = NIGDialogState.Hiding;
        }
예제 #23
0
        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;

        }
예제 #24
0
 public void NotifyShown()
 {
     state = NIGDialogState.MovingIn;
 }