public void AddScene(Scene scene) { m_ListScene.Add(scene); m_ListScene.Last().Init(m_game); this.OnSceneAdded(new SceneEventArgs(scene)); // for sound }
public void ReplaceScene(Scene scene) { if(m_ListScene.Count == 0) { AddScene(scene); } else { RemoveScene(); AddScene(scene); } }
public SceneEventArgs(Scene _scene) { this.Scene = _scene; }
/// <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() { // TODO: Add your initialization logic here base.Initialize(); ///////// //#if DEBUG // introScene = new PlayScene(ePlayerId.PLAYER); //#else introScene = new MenuScene(); //#endif SceneManager.GetInstance().AddScene(introScene); SceneManager.GetInstance().Init(this); //maindeck = new MainDeck(ePlayerId.PLAYER); //maindeck.CreateDeck(this.Content, "1"); //maindeck.Position = new Vector2(0, 300); //maindeck.Position = background.Position + GlobalSetting.Default.PlayerMain; //test0 = new Cards.Traps.Trap(this.Content, SpriteID.C3005); //test0.Postion = GlobalSetting.Default.PlayerSpellF + new Microsoft.Xna.Framework.Vector2(15, 8) + background.Position; }