예제 #1
0
    // Start is called before the first frame update

    private void Awake()
    {
        if (_inst != null)
        {
            Destroy(gameObject);
            return;
        }
        _inst = this;
        DontDestroyOnLoad(gameObject);
    }
예제 #2
0
    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;
    }
예제 #3
0
    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;
    }
예제 #4
0
    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);
    }
예제 #5
0
    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);
    }
예제 #6
0
    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;
        }
    }
예제 #7
0
 private void Awake()
 {
     Instance = this;
 }