Ejemplo n.º 1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            int DesiredFrameRate = 60;

            Logger.CreateNewLogFile();

            world = new World();
            mouse = new GameMouse();
            pauseMenu = new GuiPause(this);

            TargetElapsedTime = new TimeSpan(TimeSpan.TicksPerSecond / DesiredFrameRate);

            base.Initialize();
        }
Ejemplo n.º 2
0
        public void Play(World world)
        {
            if (playingID == 0)
            {
                for (int i = 0; i < node.Length; i++)
                {
                    if (setPause)
                    {
                        pauseTimer--;
                        if (pauseTimer <= 0)
                        {
                            setPause = false;
                        }
                    }
                    else
                    {
                        if (node[i] == true)
                        {
                            bool isalreadyplaying = world.player.OpenDialogue(new Vector2(0, 720 - 128), "<intro_" + (i + 1) + ">");

                            if (!isalreadyplaying)
                            {
                                Pause(240);
                                CheckAndProceedCutscene(i, node.Length);
                                break;
                            }
                            firstPauseFrame = false;
                        }
                    }
                }
            }
        }