public override void OnEnter() { _attacker = Agent.BlackBoard.Attacker; _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; _damageResultType = Agent.BlackBoard.damageResultType; SendEvent(); }
public override void OnEnter() { _injuryPhrase = 0; _attacker = Agent.BlackBoard.Attacker; _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; _damageResultType = Agent.BlackBoard.damageResultType; _startTrailTimer = 0; SendEvent(); }
public override void Reset() { base.Reset(); _eventInjury = null; _eventKnockDown = null; _eventDeath = null; _attacker = null; _attackerRepeatCount = 0; _damageResultType = DamageResultType.NONE; }
public override void Reset() { base.Reset(); _injuryPhrase = 0; _eventInjury = null; _eventDeath = null; _eventAttack = null; _attacker = null; _attackerRepeatCount = 0; _damageResultType = DamageResultType.NONE; _startTrailTimer = 0; }
public override void OnUpdate() { if (_damageResultType < Agent.BlackBoard.damageResultType) { _damageResultType = Agent.BlackBoard.damageResultType; _attacker = Agent.BlackBoard.Attacker; _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; SendEvent(); } else if (_damageResultType == Agent.BlackBoard.damageResultType) { if (_attacker != Agent.BlackBoard.Attacker) { _attacker = Agent.BlackBoard.Attacker; _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; SendEvent(); } else if (_attackerRepeatCount != Agent.BlackBoard.AttackerRepeatCount) { _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; SendEvent(); } } if (_eventInjury != null && _eventInjury.IsFinished && _injuryPhrase >= 3 && _eventAttack == null) { SendRevengeAttackEvent(); } if (_eventAttack != null) { if (_eventAttack.attackPhaseStart && _startTrailTimer == 0) { _startTrailTimer = Time.timeSinceLevelLoad + _startTrailDelay; } if (_startTrailTimer > 0 && Time.timeSinceLevelLoad > _startTrailTimer) { // 显示刀光(方案2:动态生成mesh,参见BossOrochi) Agent.PlayWeaponTrail(false); } if (_eventAttack.attackPhaseDone) { // 关闭刀光(方案2:动态生成mesh,参见BossOrochi) Agent.StopWeaponTrail(); } } }
public override void OnUpdate() { if (_damageResultType < Agent.BlackBoard.damageResultType) { _damageResultType = Agent.BlackBoard.damageResultType; _attacker = Agent.BlackBoard.Attacker; _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; SendEvent(); } else if (_damageResultType == Agent.BlackBoard.damageResultType) { if (_attacker != Agent.BlackBoard.Attacker) { _attacker = Agent.BlackBoard.Attacker; _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; SendEvent(); } else if (_attackerRepeatCount != Agent.BlackBoard.AttackerRepeatCount) { _attackerRepeatCount = Agent.BlackBoard.AttackerRepeatCount; SendEvent(); } } }
public DamageResult(GameObject target, DamageResultType result) { this.target = target; this.result = result; }