示例#1
0
 /// <summary>
 /// Subscribes the monsters moving ai if an
 /// character appears.
 /// </summary>
 /// <param name="character"></param>
 public override void Appears(Character character)
 {
     //ENABLE THE AI
     if (!LifespanAI.IsSubscribed(this))
     {
         Lifespan.lasttick = Environment.TickCount;
         LifespanAI.Subscribe(this);
     }
 }
示例#2
0
        /// <summary>
        /// Subscribes the monsters ai if an the monster is summoned in a crowded
        /// area.
        /// </summary>
        public override void OnRegister()
        {
            //First register the mob
            base.OnRegister();

            //Check if start moving the mob
            if (Regiontree.GetCharacterCount(this) > 0)
            {
                LifespanAI.Subscribe(this);
            }
        }
示例#3
0
        public override void OnRegister()
        {
            this.currentzone.Regiontree.Subscribe(this);
            string filename = Server.SecurePath("~/ships/{0}.xml", this.ModelId);

            aipath = Path.FromFile(filename, this);
            if (aipath != null)
            {
                aipath.Start(this);
                LifespanAI.Subscribe(this);
            }
        }