//----------------------------------------------------------------------------------------- // 状态的静态调用 //----------------------------------------------------------------------------------------- public static CReturnAI Instance() { if (m_instance == null) { m_instance = new CReturnAI(); } return(m_instance); }
/// ---------------------------------------------------------------------------------- /// <summary> /// AI 状态实体 /// </summary> private CAIStats GetStateByType(AIStateType eStateType) { if (eStateType == AIStateType.AIST_Idle) { return((CAIStats)CIdleAI.Instance()); } else if (eStateType == AIStateType.AIST_Pursue) { return((CAIStats)CPursueAI.Instance()); } else if (eStateType == AIStateType.AIST_Attack) { return((CAIStats)CAttackAI.Instance()); } else if (eStateType == AIStateType.AIST_Return) { return((CAIStats)CReturnAI.Instance()); } return(null); }