Exemple #1
0
        public virtual void OnOwnerMakeDamage(ObjRetinue _this, ObjCharacter target, int damage)
        {
            if (null == target)
            {
                return;
            }

            if (target.ObjId == _this.ObjId || target.ObjId == _this.Owner.ObjId)
            {
                return;
            }

            _this.AddEnemy(target.ObjId);
            _this.EnterState(BehaviorState.Combat);
        }
Exemple #2
0
        public virtual void OnOwnerReceiveDamage(ObjRetinue _this, ObjCharacter enemy, int damage)
        {
            if (null == enemy)
            {
                return;
            }

            if (enemy.ObjId == _this.ObjId || enemy.ObjId == _this.Owner.ObjId)
            {
                return;
            }

            _this.AddEnemy(enemy.ObjId);
            _this.EnterState(BehaviorState.Combat);
        }