protected override void Initialize() { base.Initialize(); this.Window.MyGame = this; //Inputクラスの生成 input = new Input(this.Window); input.Load(); //Soundクラスの生成 sound = new Sound(this.Window); sound.Initialize(); keyConfigManager = new KeyConfigManager(); keyConfigManager.Load("keyconfig.ini"); var dirs = new[] { @"img\PPDEditor" }; foreach (var dir in dirs) { var spriteManager = new DirSpriteManager(dir); spriteManager.Pack(); } resourceManager = new PPDFramework.Resource.SpriteResourceManager(device, @"img\PPDEditor"); CreateResource(); sm = this.Window.SoundManager; sm.setSound(this.sound); this.Window.ResourceManager.SetSound(sound); mg = new MainGame(device, this, resourceManager, Window.Grid); mg.Dummy.Drawing += Dummy_Drawing; Utility.Device = device; Utility.ResourceManager = resourceManager; Utility.Eval = eval; Utility.CirclePoints = circlepoints; }
protected override void Initialize() { input = new Input(Form.MainForm); input.Load(); var dirs = new[] { @"img\PPD\home", @"img\PPD\main_game", @"img\PPD\single", @"img\PPD\multi", @"img\PPDEditor" }; foreach (var dir in dirs) { var spriteManager = new DirSpriteManager(dir); spriteManager.Pack(); } resourceManager = new PPDFramework.Resource.SpriteResourceManager(device, @"img\PPD\main_game"); sceneManager = new SceneManager(device) { GameHost = this }; testSceneManager = new TestSceneManager(sceneManager, device); testSceneManager.Add(typeof(TextScene)); testSceneManager.Add(typeof(ScissorScene)); testSceneManager.Add(typeof(ImageScene)); testSceneManager.Add(typeof(FilterScene)); testSceneManager.Add(typeof(NumberImageScene)); testSceneManager.Add(typeof(ScreenFilterScene)); testSceneManager.Add(typeof(MaskScene)); testSceneManager.Add(typeof(MovieScene)); var scene = testSceneManager.Initialize(); SetPropertyToScene(scene); scene.Load(); sceneManager.CurrentScene = scene; TextEditableControl.IMEStarted += control_IMEStarted; }
protected override void Initialize() { base.Initialize(); var dirs = new[] { @"img\PPD\home", @"img\PPD\main_game", @"img\PPD\single", @"img\PPD\multi" }; foreach (var dir in dirs) { var spriteManager = new DirSpriteManager(dir); spriteManager.Pack(); } homeResourceManager = new PPDFramework.Resource.SpriteResourceManager(device, @"img\PPD\home"); input = PPDSetting.Setting.EveryFramePollingDisabled ? new AccurateInput(Form.MainForm, PPDSetting.Setting.AccurateInputSleepTime) : new Input(Form.MainForm); input.Load(); sound = new Sound(Form.MainForm); sound.Initialize(); keyConfigManager = new KeyConfigManager(); keyConfigManager.Load("keyconfig.ini"); for (int i = 0; i < PPDSetting.DefaultSounds.Length; i++) { sound.AddSound(PPDSetting.DefaultSounds[i]); } Form.MainForm.ClientSize = new System.Drawing.Size(PPDSetting.Setting.Width, PPDSetting.Setting.Height); mouseManager = new MouseManager(Control, device.Offset, device.Scale); screenShotManager = new ScreenShotManager(device); sceneManager = new SceneManager(device) { GameHost = this }; sceneManager.Update(EmptyInputInfo.Instance, MouseInfo.Empty, sound); movieVolumeSprite = new MovieVolumeSprite(device, this); timerManager = new TimerManager(gameTimer); if (CheckExecuteMode(out string gamePath)) { LoadSpecial(gamePath); } else { InitOverray(); LoadNormal(); } LoadCommon(); TextEditableControl.IMEStarted += control_IMEStarted; TextEditableControl._EnabledChanged += control_EnabledChanged; }