本文整理汇总了C#中System.Media.SoundPlayer.DisposePlayer方法的典型用法代码示例。如果您正苦于以下问题:C# SoundPlayer.DisposePlayer方法的具体用法?C# SoundPlayer.DisposePlayer怎么用?C# SoundPlayer.DisposePlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Media.SoundPlayer
的用法示例。
在下文中一共展示了SoundPlayer.DisposePlayer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Bot_Inhib
public static void Bot_Inhib()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_structures_bot_inhib_enemy);
player.Play();
player.DisposePlayer(Resource.glados_structures_bot_inhib_enemy);
}
catch (Exception)
{
// ignored
}
}
示例2: Nexus_Tower
public static void Nexus_Tower()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_structures_mid_tower_enemy);
player.Play();
player.DisposePlayer(Resource.glados_structures_mid_tower_enemy);
}
catch (Exception)
{
// ignored
}
}
示例3: Win
public static void Win()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_notify_victory);
player.Play();
player.DisposePlayer(Resource.glados_notify_victory);
}
catch (Exception)
{
// ignored
}
}
示例4: Top_T3
public static void Top_T3()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_structures_top_tower);
player.Play();
player.DisposePlayer(Resource.glados_structures_top_tower);
}
catch (Exception)
{
// ignored
}
}
示例5: MinionSpawn
public static void MinionSpawn()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_notify_minion_spawn);
player.Play();
player.DisposePlayer(Resource.glados_notify_minion_spawn);
}
catch (Exception)
{
// ignored
}
}
示例6: Welcome
public static void Welcome()
{
try
{
int index = Manage.Rand.Next(1, Manage.Sounds.Portal2.Notify.Welcome);
switch (index)
{
case 1:
SoundPlayer player1 = new SoundPlayer(Resource.glados_welcome_1);
player1.Play();
player1.DisposePlayer(Resource.glados_welcome_1);
break;
case 2:
SoundPlayer player2 = new SoundPlayer(Resource.glados_welcome_2);
player2.Play();
player2.DisposePlayer(Resource.glados_welcome_2);
break;
case 3:
SoundPlayer player3 = new SoundPlayer(Resource.glados_welcome_3);
player3.Play();
player3.DisposePlayer(Resource.glados_welcome_3);
break;
case 4:
SoundPlayer player4 = new SoundPlayer(Resource.glados_welcome_4);
player4.Play();
player4.DisposePlayer(Resource.glados_welcome_4);
break;
case 5:
SoundPlayer player5 = new SoundPlayer(Resource.glados_welcome_5);
player5.Play();
player5.DisposePlayer(Resource.glados_welcome_5);
break;
case 6:
SoundPlayer player6 = new SoundPlayer(Resource.glados_welcome_6);
player6.Play();
player6.DisposePlayer(Resource.glados_welcome_6);
break;
case 7:
SoundPlayer player7 = new SoundPlayer(Resource.glados_welcome_7);
player7.Play();
player7.DisposePlayer(Resource.glados_welcome_7);
break;
}
}
catch (Exception)
{
// ignored
}
}
示例7: EnemyKill
public static void EnemyKill()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_notify_death_1);
player.Play();
player.DisposePlayer(Resource.glados_notify_death_1);
}
catch (Exception)
{
// ignored
}
}
示例8: EnemyTriple
public static void EnemyTriple()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_kills_triple);
player.Play();
player.DisposePlayer(Resource.glados_kills_triple);
}
catch (Exception)
{
// ignored
}
}
示例9: AllyQuadra
public static void AllyQuadra()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_kills_quadra);
player.Play();
player.DisposePlayer(Resource.glados_kills_quadra);
}
catch (Exception)
{
// ignored
}
}
示例10: EnemyFirstblood
public static void EnemyFirstblood()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.glados_notify_first_blood);
player.Play();
player.DisposePlayer(Resource.glados_notify_first_blood);
}
catch (Exception)
{
// ignored
}
}
示例11: Game_OnInput
public static void Game_OnInput(GameInputEventArgs args)
{
if (args.Input.StartsWith(".")) args.Process = false;
/*
.kill TEAM
.double TEAM
.triple TEAM
.quadra TEAM
.penta TEAM
TEAM can be 0 == enemy, 1 == ally
.welcome
.minions
.win
.loss
.tower TEAM LANE TIER
TEAM can be 0 == enemy, 1 == ally
LANE can be top/mid/bot
TIER can be 1,2,3, 4 == inhibs
*/
switch (args.Input)
{
case ".degrec":
SoundPlayer degreced = new SoundPlayer(Resource.Degrec);
degreced.Play();
degreced.DisposePlayer(Resource.Degrec);
break;
case ".fb 0":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.EnemyFirstblood);
break;
case ".kill 0":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.EnemyKill);
break;
case ".double 0":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.EnemyDouble);
break;
case ".triple 0":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.EnemyTriple);
break;
case ".quadra 0":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.EnemyQuadra);
break;
case ".penta 0":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.EnemyPenta);
break;
case ".fb 1":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.AllyFirstblood);
break;
case ".kill 1":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.AllyKill);
break;
case ".double 1":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.AllyDouble);
break;
case ".triple 1":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.AllyTriple);
break;
case ".quadra 1":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.AllyQuadra);
break;
case ".penta 1":
PlayAbstractingLayer.Kill(Enumerations.Events.Kills.AllyPenta);
break;
case ".welcome":
PlayAbstractingLayer.Notify(Enumerations.Events.Notify.Welcome);
break;
case ".minions":
PlayAbstractingLayer.Notify(Enumerations.Events.Notify.MinionSpawn);
break;
case ".win":
PlayAbstractingLayer.Notify(Enumerations.Events.Notify.Win);
break;
case ".loss":
PlayAbstractingLayer.Notify(Enumerations.Events.Notify.Defeat);
break;
case ".tower 0 top 1":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyTop_T1);
break;
case ".tower 0 top 2":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyTop_T2);
break;
case ".tower 0 top 3":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyTop_T3);
break;
case ".tower 0 top 4":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyTop_InHib);
break;
case ".tower 0 mid 1":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyMid_T1);
break;
case ".tower 0 mid 2":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyMid_T2);
break;
case ".tower 0 mid 3":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyMid_T3);
break;
case ".tower 0 mid 4":
PlayAbstractingLayer.Structure(Enumerations.Events.Structures.EnemyMid_InHib);
break;
case ".tower 0 bot 1":
//.........这里部分代码省略.........
示例12: Bot_T3
public static void Bot_T3()
{
try
{
int index = Manage.Rand.Next(1, Manage.Sounds.StanleyParable.Structures.Enemy.Bot_T3);
switch (index)
{
case 1:
SoundPlayer player1 = new SoundPlayer(Resource.stanleyparable_structures_bot_tower_enemy_1);
player1.Play();
player1.DisposePlayer(Resource.stanleyparable_structures_bot_tower_enemy_1);
break;
case 2:
SoundPlayer player2 = new SoundPlayer(Resource.stanleyparable_structures_bot_tower_enemy_2);
player2.Play();
player2.DisposePlayer(Resource.stanleyparable_structures_bot_tower_enemy_2);
break;
case 3:
SoundPlayer player3 = new SoundPlayer(Resource.stanleyparable_structures_bot_tower_enemy_3);
player3.Play();
player3.DisposePlayer(Resource.stanleyparable_structures_bot_tower_enemy_3);
break;
}
}
catch (Exception)
{
// ignored
}
}
示例13: Mid_Inhib
public static void Mid_Inhib()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.stanleyparable_structures_mid_inhib);
player.Play();
player.DisposePlayer(Resource.stanleyparable_structures_mid_inhib);
}
catch (Exception)
{
// ignored
}
}
示例14: Defeat
public static void Defeat()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.stanleyparable_notify_defeat);
player.Play();
player.DisposePlayer(Resource.stanleyparable_notify_defeat);
}
catch (Exception)
{
// ignored
}
}
示例15: AllyFirstblood
public static void AllyFirstblood()
{
try
{
SoundPlayer player = new SoundPlayer(Resource.stanleyparable_notify_first_blood);
player.Play();
player.DisposePlayer(Resource.stanleyparable_notify_first_blood);
}
catch (Exception)
{
// ignored
}
}