示例#1
0
 protected override void Initialize()
 {
     Tween.Initialize(7000);
     InputManager.Initialize();
     InputManager.InitializeDXManager(Services, Window);
     Buttons[] buttonList =
     {
         Buttons.X,
         Buttons.A,
         Buttons.B,
         Buttons.Y,
         Buttons.LeftShoulder,
         Buttons.RightShoulder,
         Buttons.LeftTrigger,
         Buttons.RightTrigger,
         Buttons.Back,
         Buttons.Start,
         Buttons.LeftStick,
         Buttons.RightStick
     };
     InputManager.RemapDXPad(buttonList);
     SpriteLibrary.Init();
     DialogueManager.Initialize();
     if (!LevelEV.CREATE_RETAIL_VERSION)
     {
         DialogueManager.LoadLanguageDocument(Content, "Languages\\Text_En");
         DialogueManager.LoadLanguageDocument(Content, "Languages\\Diary_En");
     }
     else
     {
         DialogueManager.LoadLanguageBinFile("Content\\Languages\\Text_En.bin");
         DialogueManager.LoadLanguageBinFile("Content\\Languages\\Diary_En.bin");
     }
     DialogueManager.SetLanguage("English");
     SaveManager.Initialize();
     PhysicsManager.Initialize(ScreenManager.Camera);
     PhysicsManager.TerminalVelocity = 2000;
     InitializeNameArray();
     InitializeFemaleNameArray();
     ScreenManager.Initialize();
     InitializeGlobalInput();
     LoadConfig();
     InitializeScreenConfig();
     if (LevelEV.SHOW_FPS)
     {
         var frameRateCounter = new FrameRateCounter(this);
         Components.Add(frameRateCounter);
         frameRateCounter.Initialize();
     }
     m_forcedGameTime1 = new GameTime(default(TimeSpan), new TimeSpan(0, 0, 0, 0, (int)(m_frameLimit * 1000f)));
     m_forcedGameTime2 = new GameTime(default(TimeSpan), new TimeSpan(0, 0, 0, 0, (int)(m_frameLimit * 1050f)));
     base.Initialize();
     if (!LevelEV.CREATE_RETAIL_VERSION)
     {
         XMLCompiler.CompileEnemies(new List <EnemyEditorData>
         {
             new EnemyEditorData(15),
             new EnemyEditorData(12),
             new EnemyEditorData(8),
             new EnemyEditorData(7),
             new EnemyEditorData(17),
             new EnemyEditorData(13),
             new EnemyEditorData(10),
             new EnemyEditorData(20),
             new EnemyEditorData(19),
             new EnemyEditorData(1),
             new EnemyEditorData(6),
             new EnemyEditorData(2),
             new EnemyEditorData(16),
             new EnemyEditorData(4),
             new EnemyEditorData(14),
             new EnemyEditorData(9),
             new EnemyEditorData(11),
             new EnemyEditorData(5),
             new EnemyEditorData(3),
             new EnemyEditorData(21),
             new EnemyEditorData(22),
             new EnemyEditorData(23),
             new EnemyEditorData(24),
             new EnemyEditorData(25),
             new EnemyEditorData(26),
             new EnemyEditorData(27),
             new EnemyEditorData(28),
             new EnemyEditorData(29),
             new EnemyEditorData(30),
             new EnemyEditorData(31),
             new EnemyEditorData(32),
             new EnemyEditorData(33)
         }, Directory.GetCurrentDirectory());
     }
 }