public void UseRotation() { foreach (GameObject OrbitManager in OrbitManagers) { OrbitManagement OM = OrbitManager.GetComponent <OrbitManagement>(); OM.UseRotation = UseRotationToggle.isOn; OM.ObjectGenerator(); } }
//Global Line toggle - defaulted to off, as should be set by Json file //Values for each Orbit Manager able to be changed independantly. public void GlobalToggleLineDraw() { foreach (GameObject OrbitManager in OrbitManagers) { //when toggled on, if OrbitManagers > 10 - should maybe reduce Line tolerance to preserve framerate. OrbitManagement OM = OrbitManager.GetComponent <OrbitManagement>(); OM.Orbiter.GetComponent <SatelliteInteract>().CancelInvoke("DelayedExit"); OM.Line = GlobalLineToggle.isOn; OM.ObjectGenerator(); } }
private void OnMouseOver() { if (gameObject.layer == 5) { return; } else { if (!triggered) { triggered = true; AM.Play("ButtonClick"); if (OM.UITag == true) { TagWasEnabled = true; } if (OM.Line == true) { LineWasEnabled = true; } if (OM.UITag == false) { OM.UITag = true; TagWasEnabled = false; } if (OM.Line == false) { OM.Line = true; OM.ObjectGenerator(); LineWasEnabled = false; } } } }
public void OnToggle() { if (LineToggle.GetComponent <Toggle>().isOn) { OM = OrbitManager.GetComponent <OrbitManagement>(); OM.Line = true; OM.ObjectGenerator(); } if (!LineToggle.GetComponent <Toggle>().isOn) { OM = OrbitManager.GetComponent <OrbitManagement>(); OM.Line = false; OM.ObjectGenerator(); } }