public void reset() { if (actor == null || !actor.isLoaded) { return; } actor.ResetParticles(); pick.transform.position = pick_orig_pos; end.transform.position = end_orig_pos; print("Reset!"); }
public override void Initialize() { actor = GetComponent <ObiActor> (); c = GetComponent <Collider> (); e = GameObject.FindObjectOfType <EnemyManager> (); if (!trainingMode) { MaxStep = 0; } c.enabled = true; actor.ResetParticles(); softBody.deformationResistance = 0.7f; }
public void Death() { AddReward(-1f); c.enabled = false; if (!trainingMode) { softBody.deformationResistance = 0; } EndEpisode(); if (trainingMode) { actor.ResetParticles(); Vector3 pos = e.allies[0].GetComponent <EnemyOneSM> ().NavMeshSpot(); pos.y = 1.5f; actor.Teleport(pos, manager.gameObject.transform.rotation); } }