public override void InitializeAcademy() { FloatProperties.RegisterCallback("gridSize", f => { MainCamera.transform.position = new Vector3(-(f - 1) / 2f, f * 1.25f, -(f - 1) / 2f); MainCamera.orthographicSize = (f + 5f) / 2f; }); }
public override void InitializeAcademy() { if (spawnManager == null) { spawnManager = FindObjectOfType <SpawnManager>(); } FloatProperties.RegisterCallback("bullet_speed", f => { spawnManager.bulletSpeed = 20; }); }
public override void InitializeAcademy() { Monitor.verticalOffset = 1f; // We increase the Physics solver iterations in order to // make walker joint calculations more accurate. Physics.defaultSolverIterations = 12; Physics.defaultSolverVelocityIterations = 12; Time.fixedDeltaTime = 0.01333f; //(75fps). default is .2 (60fps) Time.maximumDeltaTime = .15f; // Default is .33 FloatProperties.RegisterCallback("gravity", f => { Physics.gravity = new Vector3(0, -f, 0); }); }
//This function is called when the academy first gets initialized public override void InitializeAcademy() { FishSpeed = 0f; FeedRadius = 0f; //setup code to be called every time fish-speed parameter changes //during curriculum learning FloatProperties.RegisterCallback("fish_speed", f => { FishSpeed = f; }); //setup code to be called every time feed-radius parameter changes //during curriculum learning FloatProperties.RegisterCallback("feed_radius", f => { FeedRadius = f; }); }
public override void InitializeAcademy() { FishSpeed = 0f; FeedRadius = 0f; FloatProperties.RegisterCallback("fish_speed", f => { FishSpeed = f; }); FloatProperties.RegisterCallback("feed_radius", f => { FeedRadius = f; }); }
//Academy gets vars from .json file that can increase the difficulty for the paddle //training as the paddle gets better and getting rewards public override void InitializeAcademy() { //default values paddleXScale = 1f; ballSpeed = 20f; FloatProperties.RegisterCallback("paddleXScale", f => { paddleXScale = f; }); FloatProperties.RegisterCallback("ballSpeed", f => { ballSpeed = f; }); }
public override void AcademyReset() { //get the tank areas if (tankAreas == null) { tankAreas = FindObjectsOfType <TankArea>(); } //set up areas foreach (TankArea tankArea in tankAreas) { //set up values from curriculum FloatProperties.RegisterCallback("spawn_radius", f => { tankArea.spawnRadius = f; }); //reset objects inside the area tankArea.ResetArea(); } }
public override void InitializeAcademy() { FloatProperties.RegisterCallback("gravity", f => { Physics.gravity = new Vector3(0, -f, 0); }); }