Пример #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()
 {
     this.IsMouseVisible = true;
     ground = GraphicsDevice.Viewport.TitleSafeArea.Height - 40;
     camera = new Camera(viewport);
     contentManager = eContentManager.getInstance(this.Content);
     Globals.contentManager = eContentManager.getInstance();
     Globals.viewport = viewport;
     Globals.font = contentManager.getSpriteFont("myFont");
     //level = new Level(Content.RootDirectory + "/Maps/serializeTest.xml");
     inputManager = new InputHandler.InputManager();
     mainMenu = new MainMenu(LevelManager.LevelManager.LEVEL_DIR);
     base.Initialize();
 }
Пример #2
0
 void Start()
 {
     _mainMenu = FindObjectOfType <MainMenu>();
     gameObject.SetActive(false);
 }