// constructor public NormalBulletGenerator(GamePlayScene scene) { this.scene = scene; this.GenerationRate = 0.05; this.BulletSpeed = 1.0f; this.WarmingSpriteOffset = 10; }
// main procedures private void StartNewScene(Scene.SceneType scene, object data = null) { Scene s = null; switch (scene) { case Scene.SceneType.StartScreen: s = new StartScreenScene(this.ClientSize.Width, this.ClientSize.Height); break; case Scene.SceneType.GamePlay: s = new GamePlayScene(this.ClientSize.Width, this.ClientSize.Height, data); break; case Scene.SceneType.Intermission: s = new IntermissionScene(this.ClientSize.Width, this.ClientSize.Height, data); break; case Scene.SceneType.GameOver: s = new GameOverScene(this.ClientSize.Width, this.ClientSize.Height); break; } s.OnLeave += Scene_OnLeave; s.Init(); this.currentScene = s; }
// constructor public IntermissionScene(float width, float height, object data) : base("intermission") { this.lastGamePlayScene = data as GamePlayScene; bulletSpeed = lastGamePlayScene.NormalBulletGenerator.BulletSpeed; bulletRate = lastGamePlayScene.NormalBulletGenerator.GenerationRate; }
// constructor public BombGenerator(GamePlayScene scene) { this.scene = scene; this.GenerationRate = 0.001; this.runningGenerationRate = GenerationRate; }