예제 #1
0
        public override void Notify()
        {
            this.pSoundEngine = SoundEngineMan.Find(SoundEngine.Name.Invaderkilled);
            Debug.Assert(pSoundEngine != null);

            this.pSoundEngine.PlaySound();
        }
        public override void Notify()
        {
            this.pSoundEngine = SoundEngineMan.Find(SoundEngine.Name.Explosion);
            Debug.Assert(pSoundEngine != null);

            this.pSoundEngine.PlaySound();
        }
예제 #3
0
        public void SetActive(bool state)
        {
            this.enable = state;

            SoundEngine pSoundEngine = SoundEngineMan.Find(SoundEngine.Name.Shoot);

            Debug.Assert(pSoundEngine != null);

            pSoundEngine.PlaySound();
        }
        public void Attach(SoundEngine.Name soundName)
        {
            // Get the Sound
            SoundEngine pSound = SoundEngineMan.Find(soundName);

            Debug.Assert(pSound != null);

            // Create a new holder
            SoundHolder pSoundHolder = new SoundHolder(pSound);

            Debug.Assert(pSoundHolder != null);

            // Attach it to the Animation Sprite ( Push to front )
            DLink.AddToEnd(ref this.poFirstSound, pSoundHolder);

            // Set the first one to this Sound
            this.pCurrSound = pSoundHolder;
        }
예제 #5
0
        override public void Execute(float deltaTime)
        {
            // Get random Bomb pos
            if (this.pGameObj.name == GameObject.Name.AlienGrid)
            {
                this.pGrid      = (AlienGrid)this.pGameObj;
                this.pAlienBomb = this.pGrid.GetRandomAlienBombPos();
            }
            else if (this.pGameObj.name == GameObject.Name.UFO)
            {
                this.pUFO       = (UFO)this.pGameObj;
                this.pAlienBomb = this.pUFO.GetGameObject();
            }

            if (pGameObj.onScreen == true)
            {
                // Create Bomb
                this.SetRandomBomb();

                Debug.Assert(this.pBomb != null);
                pBomb.ActivateCollisionSprite(this.pSB_Boxes);
                pBomb.ActivateGameSprite(this.pSB_Aliens);

                // Attach the missile to the Bomb root
                GameObject pBombRoot = GameObjectMan.Find(GameObject.Name.BombRoot);
                Debug.Assert(pBombRoot != null);

                // Add to GameObject Tree - {update and collisions}
                pBombRoot.Add(pBomb);


                SoundEngine pSoundEngine = SoundEngineMan.Find(SoundEngine.Name.Shoot);
                Debug.Assert(pSoundEngine != null);

                pSoundEngine.PlaySound();

                // Add timer event
                TimerMan.Add(TimeEvent.Name.BombRandom, this, time);
            }
        }