Ejemplo n.º 1
0
 //This is our update/Renderloop
 private void Run()
 {
     if (m_APILoaded)
     {
         //Run the GameEngine for one frame
         m_GameEngine.ProcessFrame();
     }
 }
Ejemplo n.º 2
0
        //This is our update / Renderloop
        private void Run()
        {
            // Run the GameEngine for one frame
            m_GameEngine.ProcessFrame();

            // Autosave
            if (filePathKnown && autoSaveWatch.ElapsedMilliseconds > 1000 * 60)
            {
                this.toolStripStatusLabel1.Text = "Saving!";
                Application.DoEvents();
                m_GameEngine.SaveWorld();
                UpdateSaveStatus();
                autoSaveWatch.Restart();
            }

            // Status
            string status = "";

            // Number of entities in current sector
            if (m_GameEngine != null)
            {
                int numEntities;
                m_GameEngine.CountEntitiesInSector(out numEntities);

                // Print Number of Entities
                status = "Number of entities: " + numEntities;
            }

            // Save Status
            if (!worldSavedAndNotEdited)
            {
                status = "Not Saved! " + status;
            }
            if (worldSavedAndNotEdited)
            {
                status = "Saved! " + status;
            }
            this.toolStripStatusLabel1.Text = status;
        }