Esempio n. 1
0
 private void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Esempio n. 2
0
    private string tempNum; //Save : 01,02,03 Load : 11,12,13

    //private PlayerManager thePlayer;

    void Start()
    {
        instance  = this;
        slots     = slotObject.GetComponentsInChildren <SettingSlot>();
        theDB     = FindObjectOfType <DatabaseManager>();
        theSL     = FindObjectOfType <SaveNLoad>();
        thePlayer = PlayerManager.instance;
        theLT     = LoadingTrig.instance;
        theBook   = BookManager.instance;
        theAudio  = AudioManager.instance;
        BGM       = BGMManager.instance;

        //theSL.loadList();
        bgmVolumeController.value = BGM.firstVolume;
        effVolumeController.value = theAudio.firstVolume;
    }