Exemplo n.º 1
0
        protected override void OnLifeChange(gLifeChangeEventArgs e)
        {
            base.OnLifeChange(e);

            if (e.Value == 0)
            {
                if (this.m_effect == null)
                {
                    this.m_effect = new Effect();
                    this.m_effect.End += new EventHandler(this.effect_End);
                }

                this.m_effect.Start(this, EffectTypes.explosive, 5, false);
            }

            if (e.Value < 1)
            {
                if ((this.m_processThread != null) && ((this.m_processThread.ThreadState & ThreadState.Running) == ThreadState.Running))
                {
                    this.m_processThread.Abort();
                    this.m_processThread.Join();
                }
            }
        }
Exemplo n.º 2
0
        protected override void OnLifeChange(gLifeChangeEventArgs e)
        {
            base.OnLifeChange(e);

            if (e.Value == 0)
            {
                if (this.m_effect == null)
                {
                    this.m_effect = new Effect();
                    this.m_effect.End += new EventHandler(this.effect_End);
                }

                this.m_effect.Start(this, EffectTypes.explosive, 20, false);
            }
            else if ((e.Value < 0) && (this.m_canvas != null))
            {
                this.m_canvas.OnEnemyDead(this);
            }
        }
Exemplo n.º 3
0
        protected override void OnLifeChange(gLifeChangeEventArgs e)
        {
            base.OnLifeChange(e);

            //if (this.m_level != (e.Value - 1))
            //{
            //    this.Level = e.Value - 1;
            //    return;
            //}

            if (e.Value == 0)
            {
                if (this.m_effect == null)
                {
                    this.m_effect = new Effect();
                    this.m_effect.End += new EventHandler(this.effect_End);
                }

                this.m_effect.Start(this, EffectTypes.explosive, 20, false);
            }

            if ((e.Value < 0) && (this.m_canvas != null))
            {
                this.m_canvas.OnPlayerDead(this);
            }

            if (e.Value < 1)
            {
                if ((this.m_processThread != null) && ((this.m_processThread.ThreadState & ThreadState.Running) == ThreadState.Running))
                {
                    this.m_processThread.Abort();
                    this.m_processThread.Join();
                }
            }
        }