当前位置: 首页>>代码示例>>C#>>正文


C# MusicPlayer.NewSound方法代码示例

本文整理汇总了C#中MusicPlayer.NewSound方法的典型用法代码示例。如果您正苦于以下问题:C# MusicPlayer.NewSound方法的具体用法?C# MusicPlayer.NewSound怎么用?C# MusicPlayer.NewSound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MusicPlayer的用法示例。


在下文中一共展示了MusicPlayer.NewSound方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadContent

    /// <summary>
    /// Loading in all contents required
    /// </summary>
    protected override void LoadContent()
    {
        base.LoadContent();
        musicPlayer = new MusicPlayer();

        #region Sounds
        musicPlayer.NewSound("[email protected]@[email protected]");
        musicPlayer.NewSound("[email protected]@[email protected]");
        musicPlayer.NewSound("[email protected]@[email protected]", 8);
        musicPlayer.NewSound("mIn_Drums[email protected]@[email protected]", 8);
        musicPlayer.NewSound("[email protected]@[email protected]", 2, 7);

        musicPlayer.NewSound("SFX_paperrustle");
        musicPlayer.NewSound("SFX_paperrustle2");
        musicPlayer.NewSound("SFX_doorcreak");
        musicPlayer.NewSound("SFX_MouseClick");
        musicPlayer.NewSound("SFX_MouseOver");
        musicPlayer.NewSound("SFX_GunShot");
        musicPlayer.NewSound("SFX_GameOver");
        musicPlayer.NewSound("SFX_WindAmbience");
        musicPlayer.NewSound("SFX_Bell");
        musicPlayer.NewSound("SFX_Cave");
        musicPlayer.NewSound("SFX_Rocksfalling");

        musicPlayer.NewSound("[email protected]");
        musicPlayer.NewSound("[email protected]");

        musicPlayer.NewSound("3DS_Monster0");
        musicPlayer.NewSound("3DS_Monster1");
        musicPlayer.NewSound("3DS_Monster2");
        musicPlayer.NewSound("3DS_Monster3");
        musicPlayer.NewSound("3DS_Monster4");
        musicPlayer.NewSound("3DS_Monster5");
        musicPlayer.NewSound("3DS_Monster6");
        musicPlayer.NewSound("3DS_Monster7");
        musicPlayer.NewSound("3DS_Monster8");
        musicPlayer.NewSound("3DS_Monster9");
        musicPlayer.NewSound("3DS_MonsterScream0");
        musicPlayer.NewSound("3DS_MonsterScream1");
        musicPlayer.NewSound("3DS_MonsterScream2");
        musicPlayer.NewSound("3DS_MonsterScream3");
        musicPlayer.NewSound("3DS_MonsterScream4");
        musicPlayer.NewSound("3DS_MonsterScream5");
        musicPlayer.NewSound("3DS_MonsterScream6");
        musicPlayer.NewSound("3DS_MonsterScream7");
        musicPlayer.NewSound("3DS_MonsterScream8");

        musicPlayer.NewSound("mus_MainMenu");
        #endregion

        musicPlayer.timer.Enabled = true;
        GameState.GameVariable = this;
        gameStateManager.AddGameState("beginGameState", new BeginGameState());
        gameStateManager.AddGameState("controlsGameState", new ControlsGameState());
        gameStateManager.AddGameState("noteViewingState", new NoteViewingState());
        gameStateManager.AddGameState("playingState", new PlayingState());
        gameStateManager.AddGameState("pauseScreenState", new PauseScreenState());
        gameStateManager.AddGameState("gameOverState", new GameOverState());
        gameStateManager.AddGameState("endGameState", new EndGameState());
        gameStateManager.AddGameState("creditState", new CreditState());
        gameStateManager.AddGameState("titleScreenState", new TitleScreenState());
        SetFullscreen(true);
        gameStateManager.SwitchTo("beginGameState");
    }
开发者ID:FancyPandaSoftworks,项目名称:IntroProject,代码行数:67,代码来源:MainGame.cs


注:本文中的MusicPlayer.NewSound方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。