/// <summary>
 /// Sets the character's destination based on the "mouse position", which is ultimately indicated by this agent.
 /// </summary>
 protected void Move()
 {
     _destinationSet      = true;
     _currentArrivalSpeed = 1.0f;
     _destination         = new Vector3(transform.position.x, 0, transform.position.z);
     _lookDirection       = (_destination - _characterTransform.position).normalized;
     if (_academy.GetIsInference())
     {
         Instantiate(_walkFeedback, new Vector3(transform.position.x, 0.1f, transform.position.z), Quaternion.Euler(new Vector3(90, 0, 0)));
     }
 }
Esempio n. 2
0
 private void WaitTimeInference()
 {
     if (!academy.GetIsInference())
     {
         RequestDecision();
     }
     else
     {
         if (timeSinceDecision >= timeBetweenDecisionsAtInference)
         {
             timeSinceDecision = 0f;
             RequestDecision();
         }
         else
         {
             timeSinceDecision += Time.fixedDeltaTime;
         }
     }
 }
Esempio n. 3
0
 private void WaitTimeInterface()
 {
     if (m_academy.GetIsInference())
     {
         if (m_timer > 0)
         {
             m_timer -= Time.deltaTime;
         }
         else
         {
             m_timer = DECISION_INTERVAL;
             RequestDecision();
         }
     }
     else
     {
         // 学習時はフレーム毎に呼び出す
         RequestDecision();
     }
 }
Esempio n. 4
0
    void WaitTimeInference()
    {
        if (renderCamera != null)
        {
            renderCamera.Render();
        }

        if (!m_Academy.GetIsInference())
        {
            RequestDecision();
        }
        else
        {
            if (m_TimeSinceDecision >= timeBetweenDecisionsAtInference)
            {
                m_TimeSinceDecision = 0f;
                RequestDecision();
            }
            else
            {
                m_TimeSinceDecision += Time.fixedDeltaTime;
            }
        }
    }