浏览代码

update reset logic

/hh-develop-pushblockcollab
HH 4 年前
当前提交
8be8ebba
共有 1 个文件被更改,包括 15 次插入2 次删除
  1. 17
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs

17
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushBlockEnvController.cs


using System.Collections;
using System.Collections.Generic;
using Unity.MLAgents;
using UnityEngine;
public class PushBlockEnvController : MonoBehaviour

[HideInInspector]
public Rigidbody Rb;
}
/// <summary>
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
private int m_ResetTimer;
/// <summary>
/// The area bounds.

}
// Update is called once per frame
void Update()
void FixedUpdate()
m_ResetTimer += 1;
if (m_ResetTimer > MaxEnvironmentSteps)
{
m_ResetTimer = 0;
ResetScene();
}
}
/// <summary>

正在加载...
取消
保存