//Initialize vars and managers void Start() { PropertiesPanel.SetActive(true); GlobOptionPanel.SetActive(true); socas = Selected.GetComponent <SelectedObjectControllerAndSelecter>(); rbm = Selected.GetComponent <RigidBodyManager>(); gm = gameObject.GetComponent <GravityManager>(); pbc = GameObject.FindWithTag("PlayButton").GetComponent <PlayButtonController>(); }
private void Update() { if (Input.GetKeyUp(KeyCode.Escape)) { Application.Quit(); } //Demo presets if (enableDemoMaps == true) { if (Input.GetKeyUp("z")) { SceneManager.LoadScene("Main"); } if (Input.GetKeyUp("x")) { SceneManager.LoadScene("Other"); } if (Input.GetKeyUp("c")) { SceneManager.LoadScene("Balls"); } } //Hotkey implementation if (Input.GetKeyUp(KeyCode.P)) { TogglePlayPause(); } if (Input.GetKeyUp(KeyCode.Q)) { ToggleGlobalSettingsWindow(); } //PropertiesPanel enable if object selected if (Selected == null) { PropertiesPanel.GetComponent <RectTransform>().anchoredPosition = new Vector3(-200, 0, 0); } else { socas = Selected.GetComponent <SelectedObjectControllerAndSelecter>(); socas.enabled = true; PropertiesPanel.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 0, 0); } if (GSPIsEnabled) { GlobOptionPanel.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 0, 0); } else { GlobOptionPanel.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 9999, 0); } }
public void ReactToPropertyChange() { socas = Selected.GetComponent <SelectedObjectControllerAndSelecter>(); rbm = Selected.GetComponent <RigidBodyManager>(); socas.KidsReactToPropertyDamage(); }
public void reset() { socas = Selected.GetComponent <SelectedObjectControllerAndSelecter>(); rbm = Selected.GetComponent <RigidBodyManager>(); socas.reset(); }