// Start is called before the first frame update private void Awake() { if (_inst != null) { Destroy(gameObject); return; } _inst = this; DontDestroyOnLoad(gameObject); }
public void Set(MasterUI master, Oscilator oscilator, MinMax minMax) { this.master = master; this.oscilator = oscilator; Slider slider = GetComponent <Slider>(); slider.onValueChanged.AddListener(Slide); slider.minValue = minMax.min; slider.maxValue = minMax.max; }
public void Set(MasterUI master, Oscilator oscilator) { this.master = master; this.oscilator = oscilator; Slider slider = GetComponent <Slider>(); slider.onValueChanged.AddListener(Slide); slider.minValue = 0f; slider.maxValue = 2 * (float)Math.PI; }
public void Set(string name, Oscilator osc, MasterUI controller) { this.name = name; this.osc = osc; this.controller = controller; Button button; button = GetComponent <Button>(); button.onClick.AddListener(Add); }
public void Set(MasterUI master, SynthWave wave, Oscilator parent, Oscilator osc, GameObject tab, TabsUI handler) { this.master = master; this.parent = parent; this.osc = osc; this.tab = tab; this.handler = handler; Button button; button = GetComponent <Button>(); button.onClick.AddListener(Remove); }
private void OnEnable() { Time.timeScale = 1.0f; LoadingScreen.IsLoadingScreen = false; _MUI = _MasterUI.GetComponent <MasterUI>(); _HUI = _HeroUI.GetComponent <HeroesUI>(); _MasterUI.SetActive(false); _HeroUI.SetActive(true); if (PhotonNetwork.isMasterClient) { _HeroUI.SetActive(false); _MasterUI.SetActive(true); } else { Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; } }
private void Awake() { Instance = this; }