Exemple #1
0
 public void Compose()
 {
     using (LoadingScreen loadingScreen = new LoadingScreen(m_console, "Loading Game..."))
     {
         // We need to add the ExecutingAssembly since it is an exe, it doesn't get added by the DirectoryCatalog
         m_container = new CompositionContainer(
             new AggregateCatalog(new AssemblyCatalog(System.Reflection.Assembly.GetExecutingAssembly()),
             new DirectoryCatalog(".")));
         m_container.ComposeParts(this);
     }
 }
Exemple #2
0
        private void LoadFromFile(string playerName)
        {
            string saveFilePath = playerName + ".sav";

            using (LoadingScreen loadingScreen = new LoadingScreen(m_console, "Loading..."))
            {
                m_engine.LoadSaveFile(saveFilePath);
            }

            SetupKeyboardHandlers();  // Requires game engine.
            SetHandlerName("Default");

            ShowWelcomeMessage(false);
        }
Exemple #3
0
        private void GenerateWorld(string playerName, string startingBackground)
        {
            using (LoadingScreen loadingScreen = new LoadingScreen(m_console, "Generating World..."))
            {
                m_engine.CreateNewWorld(playerName, startingBackground);
            }

            SetupKeyboardHandlers();  // Requires game engine.
            if (!Preferences.Instance.DebuggingMode)
                SetHandlerName("Welcome");
            else
                SetHandlerName("Default");

            ShowWelcomeMessage(true);
        }