Beispiel #1
0
 /// <summary>
 /// 改变当前的决定
 /// </summary>
 /// <param name="_Decision">要改编为的决定</param>
 public void ChangeDecision(Decisions _Decision)
 {
     //Debug.Log(gameObject.name+"Decision Change Had Been Called");
     //决定可以在不同的ai角色中共用
     brain.m_LearnedBehaviorManager.m_Decisions = Instantiate(_Decision);
     brain.m_LearnedBehaviorManager.m_Decisions.Initialize(brain);
     //Debug.Log(gameObject.name+"Current Decision is"+brain.m_LearnedBehaviorManager.m_Decisions);
 }
Beispiel #2
0
 protected void Update()
 {
     elementInDictioanry = peopleInMemory.Keys.Count;
     m_EnemyTarget       = sensorData.m_EnemyTarget;
     m_HaveEnemy         = sensorData.m_HaveEnemy;
     m_EvadeTarget       = sensorData.m_EvadeTarget;
     m_NeedEvade         = sensorData.m_NeedEvade;
     //Debug.Log(brain.m_LearnedBehaviorManager.m_Decisions);
     CurrentDecision = brain.m_LearnedBehaviorManager.m_Decisions;
 }
Beispiel #3
0
        /// <summary>
        /// 初始化决定
        /// </summary>
        public void InitializeDecision()
        {
            decisions = aiSettings.m_OriginalDecision;

            //Debug.Log(decisions);
            //Debug.Log("Next decisions' number is : "+decisions.m_NextDecisions.Length);
            //for (int i = 0; i < decisions.m_NextDecisions.Length; i++)
            //{
            //    Debug.Log("decisions.m_NextDecisions[i].m_NextDecision is:"+decisions.m_NextDecisions[i].m_NextDecision);
            //    Debug.Log("decisions.m_NextDecisions[i].m_DecideEvents is:" + decisions.m_NextDecisions[i].m_DecideEvents);
            //}
            //初始化dicision
            decisions.Initialize(brain);
        }