public override bool ShouldPerform() { Being enemy = this.m_AI.m_EnemyModule.m_Enemy; if (!enemy) { return(false); } if (enemy.IsDead()) { return(false); } if (this.m_HumanAI.m_CurrentWeapon && (this.m_HumanAI.m_CurrentWeapon.m_Info.IsBow() || this.m_HumanAI.m_CurrentWeapon.m_Info.IsSpear())) { return(false); } if (this.m_Active) { return(true); } (this.m_AI.m_EnemyModule.m_Enemy.transform.position - this.m_HumanAI.transform.position).GetNormalized2D(); if (Mathf.Abs(this.m_AI.m_EnemyModule.m_Enemy.transform.position.y - this.m_HumanAI.transform.position.y) > 1.5f) { return(false); } float num = enemy.transform.position.Distance(this.m_AI.transform.position); return(num > this.m_AI.m_Params.m_AttackRange && num < this.m_AI.m_Params.m_JumpAttackRange); }
public override bool ShouldPerform() { Being enemy = this.m_AI.m_EnemyModule.m_Enemy; if (!enemy) { return(false); } if (enemy.IsDead()) { return(false); } if (this.m_Active) { return(true); } float num = enemy.transform.position.Distance(this.m_AI.transform.position); return(num <= this.m_AI.m_Params.m_AttackRange); }
public override bool ShouldPerform() { Being enemy = this.m_AI.m_EnemyModule.m_Enemy; if (!enemy) { return(false); } if (enemy.IsDead()) { return(false); } if (this.m_HumanAI.m_CurrentWeapon && (this.m_HumanAI.m_CurrentWeapon.m_Info.IsBow() || this.m_HumanAI.m_CurrentWeapon.m_Info.IsSpear())) { return(false); } if (this.m_Active) { return(true); } float num = enemy.transform.position.Distance(this.m_AI.transform.position); return(num <= this.m_AI.m_Params.m_AttackRange); }
public override bool ShouldPerform() { Being enemy = this.m_AI.m_EnemyModule.m_Enemy; return(enemy && !enemy.IsDead() && (this.m_Active || (enemy.GetHeadTransform().position.To2D().Distance(this.m_AI.GetHeadTransform().position.To2D()) <= (this.m_AI.IsSwimming() ? 1.3f : this.m_AI.m_Params.m_AttackRange) && (!this.m_AI.IsSwimming() || Vector3.Dot((this.m_AI.m_EnemyModule.m_Enemy.transform.position - this.m_AI.transform.position).GetNormalized2D(), this.m_AI.transform.forward.GetNormalized2D()) >= 0.5f)))); }
public override bool ShouldPerform() { Being enemy = this.m_AI.m_EnemyModule.m_Enemy; return(enemy && !enemy.IsDead() && (this.m_Active || enemy.transform.position.Distance(this.m_AI.transform.position) <= this.m_AI.m_Params.m_AttackRange)); }
public override bool ShouldPerform() { Being enemy = this.m_AI.m_EnemyModule.m_Enemy; return(enemy && !enemy.IsDead() && (!this.m_HumanAI.m_CurrentWeapon || !this.m_HumanAI.m_CurrentWeapon.m_Info.IsBow()) && (this.m_Active || enemy.transform.position.Distance(this.m_AI.transform.position) <= this.m_AI.m_Params.m_AttackRange)); }