Exemple #1
0
        public GameMain()
        {
            this.LoadMap();

            //// Création Joueur + Carte
            MyMap = new Map(5100, 1000);
            statut_player = false;
            if (!FirstGame.checkpoint)
            {
                LocalJekyll = new Jekyll(115, 600);
                LocalHide = new Hide(115, 600);
            }
            else
            {
                LocalJekyll = new Jekyll(FirstGame.W/2 - 72, 386);
                LocalHide = new Hide(FirstGame.W - 72/2, 386);
            }
            MyMap.SlideY(1000-FirstGame.H+45);
            Status = "on";
            Message[0] = "Press BACK to show the next tips";
            Message[1] = "Use the Left Thumbstick to move your player";
            Message[2] = "Press Start to open Menu and check your skills";
            Message[3] = "If you have unlock it, press Right Shouder to activate your special vision";
            Message[4] = "Each vision help you to find interactive object, for each character";
            Message[5] = "Press Left Shoulder to transform yourself, in Scientist or Monster";
            Message[6] = "On Scientist, press B to hide you behind metal box, and avoids guards and cameras";
            Message[7] = "If you are spotted by cameras, the base is on alert and you restart";
            Message[8] = "Walk on a door an press A to open it";
            Message[9] = "On Monster, press B to attack guards or to destroy some blocks";
            Message[10] = "On Scientist, press X to aim and X again to launch an object who can disturb guards";
            Message[11] = "On Scientist, press A on a computer to try to hack it";
            Message[12] = "If you are spotted by guards, they will open fire !!!";
            Message[13] = "You can't pass through the Radioactive zone without your Mask (use Vision to find it)";
            Message[14] = "On Monster, press A to jump";
            Message[15] = "On Scientist, open you inventory with the Up Arrow";
            Message[16] = "In inventory, you can select your current object by press A on it";
            Message[17] = "On scientist, To use your current object, press Y, and Y again to retire it";
            Message[18] = "To use the Hoist, maybe must you destroy box on it first";
            Message[19] = "On Monster, press X to Grab and Launch an Box on ennemies, if you can";
            Message[20] = "On scientist, Walk on a wood box and Press A to climb on it";
        }
Exemple #2
0
        public void Update(GamePadState pad, Jekyll jekyll, Hide hide)
        {
            this._jbias = Jekyll._jskillsPoints;
            this._hbias = Hide._hskillPoints;

            if (pad.IsButtonDown(Buttons.Start) && oldPad.IsButtonUp(Buttons.Start))
            {
                if (GameMain.Status == "on")
                {
                    current = 1;
                    this.status = "home";
                    GameMain.Status = "menu";
                }
                else
                    GameMain.Status = "on";
            }
            if (pad.IsButtonDown(Buttons.B) && oldPad.IsButtonUp(Buttons.B))
            {
                if (GameMain.Status == "menu")
                {
                    if (this.status == "home")
                    {
                        GameMain.Status = "on";
                    }
                    else if (this.status == "competences")
                    {
                        current = 1;
                        this.status = "home";
                    }
                    else if (this.status == "controls")
                    {
                        current = 2;
                        this.status = "home";
                    }
                }
            }
            if (GameMain.Status == "menu")
            {
                if (this.status == "home")
                {
                    if (pad.IsButtonDown(Buttons.LeftThumbstickDown) && !oldPad.IsButtonDown(Buttons.LeftThumbstickDown))
                    {
                        if (current < 3)
                        {
                            current++;
                        }
                    }
                    if (pad.IsButtonDown(Buttons.LeftThumbstickUp) && !oldPad.IsButtonDown(Buttons.LeftThumbstickUp))
                    {
                        if (current > 1)
                        {
                            current--;
                        }
                    }
                    if (pad.IsButtonDown(Buttons.A) && oldPad.IsButtonUp(Buttons.A))
                    {
                        if (current == 1)
                            this.status = "competences";
                        else if (current == 2)
                        {
                            this.status = "controls";
                        }
                        else if (current == 3)
                            FirstGame.exit = true;
                    }
                }
                else if (this.status == "competences")
                {
                    if (pad.IsButtonDown(Buttons.LeftThumbstickDown) && !oldPad.IsButtonDown(Buttons.LeftThumbstickDown))
                    {
                        if (current < 4)
                        {
                            current++;
                        }
                    }
                    if (pad.IsButtonDown(Buttons.LeftThumbstickUp) && !oldPad.IsButtonDown(Buttons.LeftThumbstickUp))
                    {
                        if (current > 1)
                        {
                            current--;
                        }
                    }
                    if (pad.IsButtonDown(Buttons.LeftThumbstickRight) && !oldPad.IsButtonDown(Buttons.LeftThumbstickRight))
                    {
                        if (this.side == 0)
                        {
                            this.side = 1;
                        }
                    }
                    if (pad.IsButtonDown(Buttons.LeftThumbstickLeft) && !oldPad.IsButtonDown(Buttons.LeftThumbstickLeft))
                    {
                        if (this.side == 1)
                        {
                            this.side = 0;
                        }
                    }
                    if (pad.IsButtonDown(Buttons.A) && oldPad.IsButtonUp(Buttons.A))
                    {
                        if (side == 0)
                        {
                            switch (current)
                            {
                                case 1:
                                    if (!j_cmp1_status && (_jbias - j_cmp1_price >= 0))
                                    {
                                        Jekyll._jskillsPoints -= j_cmp1_price;
                                        j_cmp1_status = true;
                                        jekyll.CanClimb = true;
                                    }
                                    break;
                                case 2:
                                    if (!j_cmp2_status && (_jbias - j_cmp2_price >= 0))
                                    {
                                        Jekyll._jskillsPoints -= j_cmp2_price;
                                        j_cmp2_status = true;
                                        jekyll.CanJVision = true;
                                    }
                                    break;
                                case 3:
                                    if (!j_cmp3_status && (_jbias - j_cmp3_price >= 0))
                                    {
                                        Jekyll._jskillsPoints -= j_cmp3_price;
                                        j_cmp3_status = true;
                                        jekyll.CanHide = true;
                                    }
                                    break;
                                case 4:
                                    if (!j_cmp4_status && (_jbias - j_cmp4_price >= 0))
                                    {
                                        Jekyll._jskillsPoints -= j_cmp4_price;
                                        j_cmp4_status = true;
                                    }
                                    break;
                            }
                        }
                        else
                        {
                            switch (current)
                            {
                                case 1:
                                    if (!h_cmp1_status && (_hbias - h_cmp1_price >= 0))
                                    {
                                        Hide._hskillPoints -= h_cmp1_price;
                                        h_cmp1_status = true;
                                        hide.CanJump = true;
                                    }
                                    break;
                                case 2:
                                    if (!h_cmp2_status && (_hbias - h_cmp2_price >= 0))
                                    {
                                        Hide._hskillPoints -= h_cmp2_price;
                                        h_cmp2_status = true;
                                        hide.CanHVision = true;
                                    }
                                    break;
                                case 3:
                                    if (!h_cmp3_status && (_hbias - h_cmp3_price >= 0))
                                    {
                                        Hide._hskillPoints -= h_cmp3_price;
                                        h_cmp3_status = true;
                                    }
                                    break;
                                case 4:
                                    if (!h_cmp4_status && (_hbias - h_cmp4_price >= 0))
                                    {
                                        Hide._hskillPoints -= h_cmp4_price;
                                        h_cmp4_status = true;
                                        hide.Health = 120;
                                    }
                                    break;
                            }
                        }
                    }
                }
            }
            oldPad = pad;
        }