|
|
|
|
|
|
IEnumerator GoalScoredSwapGroundMaterial(Material mat, float time) |
|
|
|
{ |
|
|
|
m_GroundRenderer.material = mat; |
|
|
|
yield return new WaitForSeconds(time); //wait for 2 sec
|
|
|
|
yield return new WaitForSeconds(time); |
|
|
|
m_GroundRenderer.material = m_GroundMaterial; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
SetReward(1f); |
|
|
|
StartCoroutine( |
|
|
|
GoalScoredSwapGroundMaterial(m_Academy.goalScoredMaterial, 2)); |
|
|
|
GoalScoredSwapGroundMaterial(m_Academy.goalScoredMaterial, .5f)); |
|
|
|
Done(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
{ |
|
|
|
m_currentVelMag = m_AgentRb.velocity.magnitude; |
|
|
|
fuTimer++; |
|
|
|
if (m_Configuration != -1) |
|
|
|
{ |
|
|
|
ConfigureAgent(m_Configuration); |
|
|
|
m_Configuration = -1; |
|
|
|
} |
|
|
|
// if (m_Configuration != -1)
|
|
|
|
// {
|
|
|
|
// ConfigureAgent(m_Configuration);
|
|
|
|
// m_Configuration = -1;
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|