浏览代码

Fix Done-ing every time an agent dies

/develop/zombieteammanager
Ervin Teng 4 年前
当前提交
03493207
共有 1 个文件被更改,包括 1 次插入10 次删除
  1. 11
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs

11
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs


public void KillAgent(Collision col, Transform t)
{
print($"zombie {t.name} ate {col.collider.name}");
//End Episode
foreach (var item in AgentsList)
{
if (!item.Agent)
{
return;
}
item.Agent.EndEpisode();
}
item.Agent.EndEpisode();
item.Col.gameObject.SetActive(false);
break;
}

正在加载...
取消
保存