void InitAI() { if (mObj == null) { return; } int aiId = mObj.GetProperty("AI").GetInt(); mCurAIProperty = XmlManager.Instance.GetAIProperty(aiId); if (mCurAIProperty == null) { return; } if (mCurAIProperty.mAIStageList == null) { return; } if (mCurAIProperty.mAIStageList.Count < 1) { return; } mCurAIActionType = mCurAIProperty.mAIStageList[0].mAIActionType; }
bool LoadAIProperty() { byte[] asset = ResourceManager.Instance.GetXml("AI"); if (asset == null) { return(false); } TbXmlNode docNode = TbXml.Load(asset).docNode; if (docNode == null) { return(false); } List <TbXmlNode> xmlNodeList = docNode.GetNodes("AI/Property"); int xmlNodeListLength = xmlNodeList.Count; if (xmlNodeListLength < 1) { return(false); } for (int i = 0; i < xmlNodeListLength; ++i) { TbXmlNode node = xmlNodeList[i] as TbXmlNode; AIProperty ap = new AIProperty(); ap.mAIId = UtilTools.IntParse(node.GetStringValue("Id")); //mAIPropertyDic.Add(ap.mAIId, text); } return(true); }
public void Reset() { _intelligence = AIProperty.intelligence; _latency = AIProperty.latency; _elapsedTime = 0f; _isTime = false; }
//생성자 public AIElement(AIProperty __intelligence, AIProperty __latency) { _intelligence = AIProperty.intelligence; _latency = AIProperty.latency; _elapsedTime = 0f; _isTime = false; Set(__intelligence, __latency); }
public static AIProperty Latency(float _valueBasic) { AIProperty prop = AIProperty.latency; if (_valueBasic < 0.0f) { prop.basic = 0.0f; } else { prop.basic = _valueBasic; } return(prop); }
public static AIProperty Intelligence(float _valueBasic) { AIProperty prop = AIProperty.intelligence; if (_valueBasic >= 1.0f) { prop.basic = 1.0f; } else if (_valueBasic < 0.0f) { prop.basic = 0.0f; } else { prop.basic = _valueBasic; } return(prop); }
public void Set(AIProperty __intelligence, AIProperty __latency) { _intelligence = __intelligence; _latency = __latency; }