Пример #1
0
        private void TutorialUpdate()
        {
            switch (tutorialState)
            {
            case TutorialState.INTROGAME:

                if (storyTutorial == 0)
                {
                    if (openIntroGameY < 450)
                    {
                        openIntroGameY += 4;
                    }
                    else
                    {
                        storyTutorial++;
                    }
                }
                else
                {
                    if (currentSize < textTutorial.Length)
                    {
                        currentSize++;
                    }
                }
                break;

            case TutorialState.MEETreadonlyBOSS:
                if (storyTutorial == 0)
                {
                    if (openIntroGameY >= 450)
                    {
                        openIntroGameY -= 1;
                    }
                    if (camera.getPosX() < readonlyBossX)
                    {
                        camera.setPosX(camera.getPosX() + 2);
                    }

                    if (megaMan.getPosX() < readonlyBossX + 150)
                    {
                        megaMan.setDirection(ParticularObject.MainDir.RIGHT_DIR);
                        megaMan.run();
                        megaMan.Update(gameTime);
                    }
                    else
                    {
                        megaMan.stopRun();
                    }

                    if (openIntroGameY < 450 && camera.getPosX() >= readonlyBossX && megaMan.getPosX() >= readonlyBossX + 150)
                    {
                        camera.Lock();
                        storyTutorial++;
                        megaMan.stopRun();
                        physicalMap.phys_map[14, 120] = 1;
                        physicalMap.phys_map[15, 120] = 1;
                        physicalMap.phys_map[16, 120] = 1;
                        physicalMap.phys_map[17, 120] = 1;

                        backgroundMap.map[14, 120] = 17;
                        backgroundMap.map[15, 120] = 17;
                        backgroundMap.map[16, 120] = 17;
                        backgroundMap.map[17, 120] = 17;
                    }
                }
                else
                {
                    if (currentSize < textTutorial.Length)
                    {
                        currentSize++;
                    }
                }
                break;
            }
        }