public override void Initialize() { m_audioManager = AudioManager.GetInstance(); m_audioManager.LoadSound("SongOfWaterSpray",DataReader.Load<SoundEffect>("MusicAndSoundEffect/SoundEffect/SongOfWaterSpray")); m_audioManager.LoadSong("SongOfRunningGame", DataReader.Load<Song>("MusicAndSoundEffect/Song/MusicOfRunningGameState")); m_levels = MapManager.GetInstance(); m_world = WorldManager.GetInstance(); m_sence = SenceManager.GetInstance(); m_effect = GraphicsManager.GetInstance(); m_stateManager = StateManager.GetInstance(); //m_levels.Load( "Map6" ); m_levels.Goto( "Map0" ); //m_levels.Load("Map0"); player = m_world.Player; m_renderTarget2D = new RenderTarget2D( HealGame.Game.GraphicsDevice, 800, 600, false, HealGame.Game.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24Stencil8 ); m_resolveTarget = new RenderTarget2D( HealGame.Game.GraphicsDevice, 800, 600, false, HealGame.Game.GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24Stencil8); //DataReader.Load<Effect>("Effect/Blur"); }
private void Init() { m_audioManager = AudioManager.GetInstance(); m_audioManager.LoadSong("SongOfGameOver", DataReader.Load<Song>("MusicAndSoundEffect/Song/MusicOfGameOverState")); m_buttonPackaging = new GameOverButtonPackaging( SpriteManager.SpriteBatch ); m_buttonPackaging.Load(); m_texPackaging = new GameOverTexPackaging(); m_texPackaging.Initialize( m_insteadTex ); }
public override void Initialize() { m_audioManager = AudioManager.GetInstance(); m_audioManager.LoadSong( "SongOfMainMenuGameState", DataReader.Load<Song>( "MusicAndSoundEffect/Song/MusicOfMenuState" ) ); //m_audioManager.PlaySong( "SongOfMainMenuGameState", true ); //m_audioManager.LoadSound("def", DataReader.Load<SoundEffect>("")); //m_audioManager.PlaySong( "SongOfMainMenuGameState", true ); //m_audioManager.StopSong(); //m_audioManager.FadeSong(1,new TimeSpan(0,0,1)); m_curChildState = ChildState.BeginState; m_beginStateCollection = new List<ISprite>(); m_gameLogoDisappearStateCollection = new List<ISprite>(); m_startMenuShowStateCollection = new List<ISprite>(); m_zoomInBackgroundStateCollection = new List<ISprite>(); m_capsuleOnTargetStateCollection = new List<ISprite>(); m_distortionStateCollection = new List<ISprite>(); m_effect = GraphicsManager.GetInstance(); m_stateManager = StateManager.GetInstance(); #region Initialize the tv pictures m_tvPicture_1 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVPicture_1", SpriteManager.SpriteBatch, "TVPicture_1" ); m_tvPicture_2 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVMessy _3", SpriteManager.SpriteBatch, "TVPicture_2" ); m_tvPicture_3 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVPicture_3", SpriteManager.SpriteBatch, "TVPicture_3" ); m_tvPicture_4 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVMessy _2", SpriteManager.SpriteBatch, "TVPicture_4" ); m_tvPicture_5 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVMessy _1", SpriteManager.SpriteBatch, "TVPicture_5" ); m_tvPicture_6 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVPicture_6", SpriteManager.SpriteBatch, "TVPicture_6" ); m_tvPicture_7 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVPicture_7", SpriteManager.SpriteBatch, "TVPicture_7" ); m_tvMessey_1 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVMessy _1", SpriteManager.SpriteBatch, "TVMessy _1" ); m_tvMessey_2 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVMessy _2", SpriteManager.SpriteBatch, "TVMessy _2" ); m_tvMessey_3 = new DButton( DButton.DButtonState.Idle, "Texture/Menu/TVPicture/TVMessy _3", SpriteManager.SpriteBatch, "TVMessy _3" ); m_tvPictureList = new List<DButton>(); //m_tvMesseyList = new List<DButton>(); m_tvPictureList.Add( m_tvPicture_1 ); m_tvPictureList.Add( m_tvPicture_2 ); m_tvPictureList.Add( m_tvPicture_3 ); m_tvPictureList.Add( m_tvPicture_4 ); m_tvPictureList.Add( m_tvPicture_5 ); m_tvPictureList.Add( m_tvPicture_6 ); m_tvPictureList.Add( m_tvPicture_7 ); m_tvPictureList.Add( m_tvMessey_1 ); m_tvPictureList.Add( m_tvMessey_2 ); m_tvPictureList.Add( m_tvMessey_3 ); #endregion m_logo = new ScenceSprite(); m_logo.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/GameLogo" ); m_startString = new ScenceSprite(); m_startString.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/press_0" ); m_buttonPackaging = new MainMenuButtonPackaging( SpriteManager.SpriteBatch ); m_background = new ScenceSprite(); m_background.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/Background" ); m_foreground = new ScenceSprite(); m_foreground.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/Foreground" ); m_backgroundMist = new ScenceSprite(); m_backgroundMist.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/Mist" ); m_ufoLight = new ScenceSprite(); m_ufoLight.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/UFOLight" ); #region Initialize the statics player m_staticsDarkPlayer = new ScenceSprite(); m_staticsDarkPlayer.TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/DarkPlayer" ); #region Initial the glowing player m_staticsGlowingPlayer = new ScenceSprite() { TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/GlowingPlayer" ), TargetOffset = new Vector2( 2000, 3000 ), DestRect = new Rectangle( 0, 0, HealGame.Game.GraphicsDevice.Viewport.Width, HealGame.Game.GraphicsDevice.Viewport.Height ), Visible = true, TColor = Color.White }; m_staticsGlowingPlayer.SourceRect = new Rectangle( 0, 0, m_staticsGlowingPlayer.TextureImage.Width, m_staticsGlowingPlayer.TextureImage.Height ); #endregion #endregion #region Initialize the tips button "Enter" m_tipsButton = new ScenceSprite() { TextureImage = DataReader.Load<Texture2D>( "Texture/Menu/CommonScene/press_1" ), Position = new Vector2( 420, 125 ), Visible = true, TColor = Color.White }; m_tipsButton.DestRect = new Rectangle( (int)m_tipsButton.Position.X, (int)m_tipsButton.Position.Y, (int)( m_tipsButton.TextureImage.Width * 0.25 ), (int)( m_tipsButton.TextureImage.Height * 0.25 ) ); m_tipsButton.SourceRect = new Rectangle( 0, 0, m_tipsButton.TextureImage.Width, m_tipsButton.TextureImage.Height ); #endregion InitLogic(); #region Add the components to the m_beginStateCollection m_beginStateCollection.Add( m_background ); m_beginStateCollection.Add( m_foreground ); m_beginStateCollection.Add( m_backgroundMist ); m_beginStateCollection.Add( m_staticsDarkPlayer ); m_beginStateCollection.Add( m_logo ); m_beginStateCollection.Add( m_startString ); #endregion #region Add the components to the m_gameLogoDisappearStateCollection m_gameLogoDisappearStateCollection.Add( m_background ); m_gameLogoDisappearStateCollection.Add( m_foreground ); m_gameLogoDisappearStateCollection.Add( m_staticsDarkPlayer ); m_gameLogoDisappearStateCollection.Add( m_backgroundMist ); #endregion #region Add the components to the m_startMenuShowStateCollection m_startMenuShowStateCollection.Add( m_background ); m_startMenuShowStateCollection.Add( m_foreground ); m_startMenuShowStateCollection.Add( m_buttonPackaging ); m_startMenuShowStateCollection.Add( m_ufoLight ); m_startMenuShowStateCollection.Add( m_staticsDarkPlayer ); m_startMenuShowStateCollection.Add( m_backgroundMist ); #endregion #region Add the components to the m_zoomInBackgroundStateCollection m_zoomInBackgroundStateCollection.Add( m_background ); m_zoomInBackgroundStateCollection.Add( m_foreground ); m_zoomInBackgroundStateCollection.Add( m_ufoLight ); m_zoomInBackgroundStateCollection.Add( m_staticsDarkPlayer ); m_zoomInBackgroundStateCollection.Add( m_backgroundMist ); #endregion #region Add the components to the m_capsuleOnTargetStateCollection m_capsuleOnTargetStateCollection.Add( m_background ); foreach( var a in m_tvPictureList ) { m_capsuleOnTargetStateCollection.Add( a ); } m_capsuleOnTargetStateCollection.Add( m_foreground ); m_capsuleOnTargetStateCollection.Add( m_tipsButton ); m_capsuleOnTargetStateCollection.Add( m_ufoLight ); m_capsuleOnTargetStateCollection.Add( m_staticsGlowingPlayer ); m_capsuleOnTargetStateCollection.Add( m_backgroundMist ); #endregion #region Add the components to the m_distortionStateCollection m_distortionStateCollection.Add( m_background ); foreach( var a in m_tvPictureList ) { m_distortionStateCollection.Add( a ); } m_distortionStateCollection.Add( m_foreground ); m_distortionStateCollection.Add( m_backgroundMist ); m_distortionStateCollection.Add( m_staticsGlowingPlayer ); #endregion this.GameStateChanged += new GameStateEventHandler( MainMenuGameState_GameStateChanged ); }
static AIBase() { SenceManager = SenceManager.GetInstance(); AudioManager = AudioManager.GetInstance(); }
public AudioManager() { m_instance = this; }