public void EnterScene(scene.SceneType sceneType, object arg = null)//map.Map map = null) { _prevSceneType = _currentScene.SceneType; scene.Scene s = null; if (sceneType == SceneType.GameStage) { map.Map map = null; if (arg != null) { map = arg as map.Map; } if (_prevMap != null && _prevMap != map) { _prevMap.Dispose(); } _prevMap = map; s = CreateScene(sceneType, this, map); } else if (sceneType == SceneType.Error) { s = CreateScene(sceneType, this, (string[])arg); } else { s = CreateScene(sceneType, this, null); } if (s != null) { _currentScene = s; } }
public PitchPitch() { #region Events初期化 Events.TargetFps = 60; Events.Tick += new EventHandler<TickEventArgs>(Tick); Events.Quit += new EventHandler<QuitEventArgs>(Quit); Events.KeyboardDown += new EventHandler<KeyboardEventArgs>(KeyboardDown); #endregion #region 画面初期化 Video.WindowCaption = Properties.Resources.WindowTitle; _screen = Video.SetVideoMode(Constants.ScreenWidth, Constants.ScreenHeight, false, false, false, true); _screen.AlphaBlending = true; #endregion _player = new gameobj.Player(); initAudio(); _currentScene = new scene.SceneTitle(); _currentScene.Init(this); }
public void EnterScene(scene.SceneType sceneType, object arg = null)//map.Map map = null) { _prevSceneType = _currentScene.SceneType; scene.Scene s = null; if (sceneType == SceneType.GameStage) { map.Map map = null; if (arg != null) map = arg as map.Map; if (_prevMap != null && _prevMap != map) _prevMap.Dispose(); _prevMap = map; s = CreateScene(sceneType, this, map); } else if (sceneType == SceneType.Error) { s = CreateScene(sceneType, this, (string[])arg); } else { s = CreateScene(sceneType, this, null); } if (s != null) _currentScene = s; }