Пример #1
0
        public SoundManajer()
        {
            soundActive = true;
            casetera    = new MainPlayer();
            netcm       = null;

            BaseElement._death += new Action <BaseElement>(BaseElement__death);
            BaseElement._ready += new Action <BaseElement>(BaseElement__ready);
            SCV.miningNow      += new Action <SCV>(SCV_miningNow);

            Fabrics.healtCompleted        += new Action <Fabrics>(Fabrics_healtCompleted);
            Fabrics.notHaveMineralToBuy   += new Action <Fabrics>(Fabrics_notHaveMineralToBuy);
            Fabrics.notHaveSpaceToMoreSCV += new Action <Fabrics>(Fabrics_notHaveSpaceToMoreSCV);
            Fabrics.upgradeCompleted      += new Action <Fabrics>(Fabrics_upgradeCompleted);
            Fabrics.mineralReseived       += new Action <Fabrics>(Fabrics_mineralReseived);
            Canon.weaponChanged           += new Action <Canon>(Canon_weaponChanged);
            Canon.notHaveWeapon           += new Action <Canon>(Canon_notHaveWeapon);
            Canon.weaponCharged           += new Action <Weapon>(Canon_weaponCharged);
            Canon.canonDeath             += new Action <Canon>(Canon_canonDeath);
            Weapon.shootNow              += new Action <Bullet, Weapon>(Weapon_shootNow);
            Bullet.bulletContact         += new Action <Bullet>(Bullet_bulletContact);
            GameTimer.levelUp            += new Action <GameTimer>(GameTimer_levelUp);
            Nave.shootNou                += new Action <Nave, Bullet>(Nave_shootNou);
            NuclearMisil.nuclearLaunch   += new Action <NuclearMisil>(NuclearMisil_nuclearLaunch);
            NuclearMisil.nuclearDetected += new Action <NuclearMisil>(NuclearMisil_nuclearDetected);
            NuclearMisil.nuclearImpact   += new Action <NuclearMisil>(NuclearMisil_nuclearImpact);
            MineralMine.mineFinished     += new Action <MineralMine>(MineralMine_mineFinished);
            Shield.reflector             += new Action <Bullet, Shield>(Shield_reflector);

            NetManajer.soundReseived += new Action <string>(NetManajer_soundReseived);
        }
Пример #2
0
        public static void simplePlay(string obj)
        {
            if (casetera == null)
            {
                casetera = new MainPlayer();
            }

            casetera.Play(obj);
        }