public override void OnDeregister()
        {
            if (LifespanAI.IsSubscribed(this))
            {
                LifespanAI.Unsubscribe(this);
            }

            base.OnDeregister();
        }
Exemple #2
0
        /// <summary>
        /// Unsubscribes the monsters moving ai if the region's player
        /// count is 0.
        /// </summary>
        /// <param name="character"></param>
        public override void Disappear(Character character)
        {
            //DISABLE THE AI
            if (Regiontree.GetCharacterCount(this) == 0)
            {
                LifespanAI.Unsubscribe(this);
                this.Position = this.DestPosition;
            }

            base.Disappear(character);
        }
        /// <summary>
        /// Occurs when the speciafiec character killed
        /// our monsters
        /// </summary>
        /// <param name="target"></param>
        /// <returns></returns>
        public override void OnDie(MapObject target)
        {
            //Stop movement
            lock (this)
            {
                LifespanAI.Unsubscribe(this);
                this.stance = 7;
            }

            base.OnDie(target);
        }
Exemple #4
0
 public override void OnDeregister()
 {
     LifespanAI.Unsubscribe(this);
     base.OnDeregister();
 }
Exemple #5
0
 /// <summary>
 /// Occurs when the speciafiec character killed
 /// our monsters
 /// </summary>
 /// <param name="target"></param>
 /// <returns></returns>
 public override void OnDie(MapObject target)
 {
     //Stop movement
     LifespanAI.Unsubscribe(this);
     base.OnDie(target);
 }