예제 #1
0
파일: Game1.cs 프로젝트: wico-/Code
 /// <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);
 }