public override float GetUtility(Character enemyCharacter, AICharacter ai) { if (AIMelee.IsEndState(ai.parent.state)) { return(0.0f); } switch (ai.parent.state) { case Character.State.Attack: return(0.0f); } if (enemyCharacter == null) { return(0.1f); } if (ai.parent.NextAttackOn() == true) { return(0.0f); } if (MagiUtil.IsInRange(enemyCharacter.transform.position - ai.parent.transform.position, ai.parent.keepDistance + enemyCharacter.radius) == false) { return(0.0f); } return(0.1f); }
public override void Process(AICharacter ai) { if (ai.parent.GetCountAttackComboID() != 0) { end = true; return; } if (AIMelee.IsEndState(ai.parent.state)) { end = true; return; } Character enemyPresent = ai.parent.EnemyPresent; if (enemyPresent == null) { end = true; return; } if (Time.time - checkTime_ > 2.0f) { checkTime_ = Time.time; float fLength = (lastChasePos_ - ai.parent.transform.position).magnitude; if (fLength < 1.0f) { end = true; return; } lastChasePos_ = ai.parent.transform.position; } if (MagiUtil.IsInRange(enemyPresent.transform.position - ai.parent.transform.position, ai.parent.keepDistance + enemyPresent.radius)) { end = true; return; } if (MagiUtil.IsInRange(enemyPresent.transform.position - ai.parent.transform.position, ai.parent.AttackRange)) { end = true; return; } if (MagiUtil.IsInRange(enemyPresent.transform.position - ai.parent.transform.position, ai.ChaseRange) == false) { end = true; return; } }
public override bool Init(AICharacter ai) { if (AIMelee.IsEndState(ai.parent.state)) { return(false); } if (ai.parent.EnemyPresent == null) { return(false); } SkillTableManager.CTable skillTable; if (ai.parent.GetAvailable_BestSkill(out skillTable) == true) { ai.parent.UseSkill(skillTable.id); } return(ai.parent.Attack()); }
public override float GetUtility(Character enemyCharacter, AICharacter ai) { if (AIMelee.IsEndState(ai.parent.state)) { return(0.0f); } if (ai.parent.AttackIncapacity) { return(0.0f); } if (enemyCharacter == null) { return(0.0f); } switch (enemyCharacter.state) { case Character.State.Death: return(0.0f); } if (ai.parent.NextAttackOn() == false) { return(0.0f); } if (ai.parent.SelectComboInAttackRange(enemyCharacter) == false) { return(0.0f); } if (ai.parent.CheckComboAttack(enemyCharacter)) { return(2.0f); } return(0.0f); }
public override float GetUtility(Character enemyCharacter, AICharacter ai) { if (AIMelee.IsEndState(ai.parent.state)) { return(0.0f); } if (enemyCharacter == null) { return(0.0f); } if (MagiUtil.IsInRange(enemyCharacter.transform.position - ai.parent.transform.position, ai.parent.keepDistance + enemyCharacter.radius)) { return(0.0f); } if (MagiUtil.IsInRange(enemyCharacter.transform.position - ai.parent.transform.position, ai.ChaseRange)) { return(0.6f); } return(0.0f); }