public override void AgentReset() { if (!_hasLazyInitialized) { _bodyManager = GetComponent <BodyManager002>(); _bodyManager.BodyConfig = MarathonManAgent.BodyConfig; _bodyManager.OnInitializeAgent(); _hasLazyInitialized = true; } if (_bodyManager == null) { _bodyManager = GetComponent <BodyManager002>(); } _bodyManager.OnAgentReset(); if (_terrainGenerator == null) { _terrainGenerator = GetComponent <TerrainGenerator>(); } if (_spawnableEnv == null) { _spawnableEnv = GetComponentInParent <SpawnableEnv>(); } _terrainGenerator.Reset(); lastXPosInMeters = (int) _bodyManager.GetBodyParts(BodyPartGroup.Foot) .Average(x => x.Transform.position.x); _pain = 0f; }
public override void AgentReset() { if (_bodyManager == null) { _bodyManager = GetComponent <BodyManager002>(); var academy = FindObjectOfType <Academy>(); _isTrainingMode = academy.agentSpawner.trainingMode; } _bodyManager.OnAgentReset(); //StepsUntilChange = 0; //SetAction(0); }
public override void AgentReset() { if (!_hasLazyInitialized) { _bodyManager = GetComponent <BodyManager002>(); _bodyManager.BodyConfig = MarathonManAgent.BodyConfig; _bodyManager.OnInitializeAgent(); _hasLazyInitialized = true; } _isDone = true; _bodyManager.OnAgentReset(); }
public override void AgentReset() { if (_bodyManager == null) { _bodyManager = GetComponent <BodyManager002>(); } _bodyManager.OnAgentReset(); _episodeMaxDistance = 0f; if (rollingAverage == null) { rollingAverage = new RollingAverage(100); } }
public override void AgentReset() { if (!_hasLazyInitialized) { _bodyManager = GetComponent <BodyManager002>(); _bodyManager.BodyConfig = MarathonManAgent.BodyConfig; _bodyManager.OnInitializeAgent(); _hasLazyInitialized = true; } _isDone = true; _bodyManager.OnAgentReset(); _episodeMaxDistance = 0f; if (rollingAverage == null) { rollingAverage = new RollingAverage(100); } }
public override void AgentReset() { if (_bodyManager == null) { _bodyManager = GetComponent <BodyManager002>(); } _bodyManager.OnAgentReset(); if (_terrainGenerator == null) { _terrainGenerator = GetComponent <TerrainGenerator>(); } if (_spawnableEnv == null) { _spawnableEnv = GetComponentInParent <SpawnableEnv>(); } _terrainGenerator.Reset(); lastXPosInMeters = (int) _bodyManager.GetBodyParts(BodyPartGroup.Foot) .Average(x => x.Transform.position.x); _pain = 0f; _modeRecover = false; }
public override void AgentReset() { if (_bodyManager == null) _bodyManager = GetComponent<BodyManager002>(); _bodyManager.OnAgentReset(); }