예제 #1
0
 void OnEnable()
 {
     _core = Camera.main.GetComponent <GameCore>();
     _json = new JsonReadWrite();
     AudioListener.volume = _core.dataSetting[0].soundValue;
     _soundValue.value    = AudioListener.volume;
 }
예제 #2
0
 void OnEnable()
 {
     _core = Camera.main.GetComponent <MainCore>();
     _json = new JsonReadWrite();
     AudioListener.volume  = _core.dataSetting[0].soundValue;
     _soundValue.value     = AudioListener.volume;
     _questionLinkTxt.text = _core.dataSetting[0].questionLink;
     _questionLink.transform.Find("TestConnectButton").GetComponent <Image>().color = new Color32(255, 255, 255, 255);
     _question.value = _core.dataSetting[0].question == true?1:0;
 }
예제 #3
0
    private void Awake()
    {
        //Caching.ClearCache();
        _uiSprite2           = Resources.LoadAll <Sprite>("Sprites/UI/ui2");
        _mapSprite           = Resources.LoadAll <Sprite>("Sprites/UI/map2");
        _UI                  = GameObject.Find("UICanvas");
        _passiveDatail       = new string[] { "passive detail" };
        _player              = new Player();
        _json                = new JsonReadWrite();
        dataSetting          = _json.ReadSetting(dataSetting);
        AudioListener.volume = dataSetting[0].soundValue;
        _loadingScreenImg    = _loadingScreen.GetComponent <Image>();

        SettingBeforeStart();
        OpenStartMenu();
    }
예제 #4
0
        /// <summary>
        /// Henter alt fra fil(er) (lister af projekter, dimser og brugere)
        /// </summary>
        public async Task LoadEverything()
        {
            Debug.WriteLine("Begynder LoadEverything");
            ProjectList = await JsonReadWrite.LoadProjectsFromJsonAsync();

            UserList = await JsonReadWrite.LoadUsersFromJsonAsync();

            foreach (User user in UserList) // Populates searchUser, så listen er klar når man går ind i edit project
            {
                if (!user.Equals(CurrentUser))
                {
                    SearchUsers.Add(user);
                }
            }

            DoohickeyList = await JsonReadWrite.LoadDoohickeysFromJsonAsync();

            foreach (Doohickey doohickey in DoohickeyList) // Populates searchDoohickey, så listen er klar når man går ind i edit project
            {
                SearchDoohickeys.Add(doohickey);
            }

            Debug.WriteLine("Afslutter LoadEverything");
        }
예제 #5
0
 /// <summary>
 /// Gemmer alt til fil(er) (lister af projekter, dimser og brugere)
 /// </summary>
 public void SaveEverything()
 {
     JsonReadWrite.SaveProjectsAsJsonAsync(ProjectList);
     JsonReadWrite.SaveUsersAsJsonAsync(UserList);
     JsonReadWrite.SaveDoohickeyAsJsonAsync(DoohickeyList);
 }