示例#1
0
        public fTetris()
        {
            InitializeComponent();

            t = new Juego();

            this.KeyPreview = true;

            sonidoGirar = new Sound(Tetris.Properties.Resources.girarPieza);
            sonidoMover = new Sound(Tetris.Properties.Resources.moverPieza);
        }
示例#2
0
 private void RenderSound(Sound sound)
 {
   switch (sound)
   {
     case Sound.Knock:
       if (m_pHost != null)
       {
         m_pHost.OnRenderSound("MyTetris.Knock.wav");
       }
       break;
     case Sound.Level:
       if (m_pHost != null)
       {
         m_pHost.OnRenderSound("MyTetris.Level.wav");
       }
       break;
     case Sound.Block:
       if (m_pHost != null)
       {
         m_pHost.OnRenderSound("MyTetris.Block.wav");
       }
       break;
     case Sound.Line:
       m_LinePlays++;
       break;
   }
 }
示例#3
0
文件: Game.cs 项目: Jrayp/Neztris
 public static void playSound(Sound sound)
 {
     _sounds[sound].Play( );
 }