public InuAI_UnitAttack(InuStructure _t, InuDefine.EInuAIType _aiType, InuFloat _range, InuFloat _sight) { mInuObj = _t; mTarget = null; mAIType = _aiType; mAttackRange = _range; mAttackRangeSqr = mAttackRange * mAttackRange; mSightRange = _sight; mSightRangeSqr = mSightRange * mSightRange; }
//public InuAI_Path CreatePathAI(InuStructure src, InuDefine.EInuPathAI aiType, InuFloat speed, bool inAir, bool isDefense) //{ // InuAI_Path ai = new InuAI_Path(src, aiType, speed, inAir, isDefense); // return ai; //} //public void DestroyPathAI(InuAI_Path _ai) //{ // if (_ai == null) // return; // _ai.Destroy(); // mList_Path.Remove(_ai); //} #endregion #region Defense AI interfaces public InuAI_Attack CreateDefenseAI(InuStructure src, InuDefine.EInuAIType aiType, InuFloat attackRange, InuFloat sightRange ) { InuAI_Attack ai = null; //ai = new InuAI_UnitAttack(src, attackScale, aiType, pickTargetAiType, attackRange, sightRange); return(ai); }
public virtual void ClearTarget() { mAttackTarget = null; mTarget = null; mState = AttackState.eSeeNothingAndNoTarget; }