Esempio n. 1
0
 public bool Initialise(IPlayer player)
 {
     m_editMode = false;
     m_playerUI = player;
     GameLoader loader = new GameLoader(this, GameLoader.LoadMode.Play);
     bool result = InitialiseInternal(loader);
     if (result)
     {
         m_walkthroughs = new Walkthroughs(this);
     }
     return result;
 }
Esempio n. 2
0
 public bool InitialiseEdit()
 {
     m_editMode = true;
     GameLoader loader = new GameLoader(this, GameLoader.LoadMode.Edit);
     return InitialiseInternal(loader);
 }
Esempio n. 3
0
 private bool InitialiseInternal(GameLoader loader)
 {
     if (m_state != GameState.NotStarted)
     {
         throw new Exception("Game already initialised");
     }
     loader.FilenameUpdated += new GameLoader.FilenameUpdatedHandler(loader_FilenameUpdated);
     m_state = GameState.Loading;
     bool success = m_filename == null ? true : loader.Load(m_filename);
     ResourcesFolder = loader.ResourcesFolder;
     DebugEnabled = !loader.IsCompiledFile;
     m_state = success ? GameState.Running : GameState.Finished;
     m_errors = loader.Errors;
     return success;
 }