Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseMob"/> class.
        /// </summary>
        public BaseMob()
        {
            Items      = new List <IItem>();
            Stats      = new List <IStat>();
            Appearance = new List <IAppearanceAttribute>();

            // Setup the character event handlers.
            OnLeaveEvent += new OnLeaveHandler(OnLeave);
            OnEnterEvent += new OnEnterHandler(OnEnter);

            // Following event methods are stubs in the event they are ever called
            // without the user having attached its own methods to them.
            OnAttackTargetEvent  += new OnAttackTargetHandler(OnAttackTarget);
            OnDealDamageEvent    += new OnDealDamageHandler(OnDealDamage);
            OnRecieveDamageEvent += new OnRecieveDamageHandler(OnReceiveDamage);
            OnHealEvent          += new OnHealHandler(OnHeal);
            OnRestoreManaEvent   += new OnRestoreManaHandler(OnRestoreMana);
            OnConsumeManaEvent   += new OnConsumeManaHandler(OnConsumeMana);
            OnDeathEvent         += new OnDeathHandler(OnDeath);

            OnEquipEvent      += new OnEquipHandler(OnEquip);
            OnUnequipEvent    += new OnUnequipHandler(OnUnequip);
            OnUseItemEvent    += new OnUseItemHandler(OnUseItem);
            OnRemoveItemEvent += new OnRemoveItemHandler(OnRemoveItem);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseMob"/> class.
        /// </summary>
        public BaseMob()
        {
            Items = new List<IItem>();
            Stats = new List<IStat>();
            Appearance = new List<IAppearanceAttribute>();

            // Setup the character event handlers.
            OnLeaveEvent += new OnLeaveHandler(OnLeave);
            OnEnterEvent += new OnEnterHandler(OnEnter);

            // Following event methods are stubs in the event they are ever called
            // without the user having attached its own methods to them.
            OnAttackTargetEvent += new OnAttackTargetHandler(OnAttackTarget);
            OnDealDamageEvent += new OnDealDamageHandler(OnDealDamage);
            OnRecieveDamageEvent += new OnRecieveDamageHandler(OnReceiveDamage);
            OnHealEvent += new OnHealHandler(OnHeal);
            OnRestoreManaEvent += new OnRestoreManaHandler(OnRestoreMana);
            OnConsumeManaEvent += new OnConsumeManaHandler(OnConsumeMana);
            OnDeathEvent += new OnDeathHandler(OnDeath);

            OnEquipEvent += new OnEquipHandler(OnEquip);
            OnUnequipEvent += new OnUnequipHandler(OnUnequip);
            OnUseItemEvent += new OnUseItemHandler(OnUseItem);
            OnRemoveItemEvent += new OnRemoveItemHandler(OnRemoveItem);
        }