Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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))));
        }
Esempio n. 5
0
        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));
        }
Esempio n. 6
0
        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));
        }