浏览代码

reduce show goal mat to .5

/hh-develop-walljump_bugfixes
Hunter 5 年前
当前提交
e12d830c
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 2
      UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
  2. 14
      UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs

2
UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity


m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!23 &252453052
MeshRenderer:
m_ObjectHideFlags: 0

14
UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs


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>

正在加载...
取消
保存