Exemple #1
0
        public void CleanBeforeInit()
        {
            ExitClean();
            BPM          = 110;
            BPMText.text = BPM.ToString();
            MaxLine      = 0;
            BeatVal      = 4;
            NoteColorR   = 255;
            NoteColorG   = 255;
            NoteColorB   = 255;
            for (int i = 1; i < 9; i++)
            {
                if (LineButtons[i] != null)
                {
                    LineButtons[i].targetGraphic.color = GlobalTheme.ThemeColor();
                    LineButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
                }
            }
            for (int i = 0; i < 4; i++)
            {
                LevelButtons[i].targetGraphic.color = GlobalTheme.ThemeColor();
                LevelButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
            }
            DensityVal       = 20;
            DensityText.text = DensityVal.ToString();
            LevelSelect(2);
            NoteCount          = 0;
            NoteCountText.text = "0 notes";

            NameField.text   = "";
            ArtistField.text = "";
            MapperField.text = "";
            OffsetField.text = "";
        }
 public void ShowAchievements()
 {
     if (!Social.localUser.authenticated)
     {
         Social.localUser.Authenticate((bool success) =>
         {
             if (success)
             {
                 if (Application.platform.Equals(RuntimePlatform.Android))
                 {
                     socialTextAnd.text  = LocaleManager.instance.GetLocaleText("setting_playgameslogged");
                     socialTextAnd.color = GlobalTheme.ThemeColor(RuntimePlatform.Android);
                 }
                 else if (Application.platform.Equals(RuntimePlatform.IPhonePlayer))
                 {
                     socialTextiOS.text  = LocaleManager.instance.GetLocaleText("setting_gamecenterlogged");
                     socialTextiOS.color = GlobalTheme.ThemeColor(RuntimePlatform.IPhonePlayer);
                 }
                 Social.ShowAchievementsUI();
                 return;
             }
             else
             {
                 return;
             }
         });
     }
     Social.ShowAchievementsUI();
 }
Exemple #3
0
        public void Initialize()
        {
            IsActive            = true;
            StartPoint          = 0;
            StartPointText.text = LocaleManager.instance.GetLocaleText("creator_auto");
            NoteSpeed           = 1.0f;
            SpeedText.text      = NoteSpeed.ToString("N1");
            ScopeVal            = 1.0f;
            ScopeText.text      = (ScopeVal * 100).ToString("N0") + "%";
            DivLine             = 8;
            DivArrayIndex       = 5;
            DivLineText.text    = DivLine.ToString();
            ViewSpecific        = false;
            ViewSpecificBtn.targetGraphic.color = GlobalTheme.ThemeColor();
            ViewSpecificBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
            RText.text       = NoteColorR.ToString();
            GText.text       = NoteColorG.ToString();
            BText.text       = NoteColorB.ToString();
            ColorPanel.color = new Color32(NoteColorR, NoteColorG, NoteColorB, 255);

            LevelSelect(LevelVal);
            ChangeLine(MaxLine);
            SelectNoteMode(0);
            SelectFlickMode(0);
            ChangeBeats(BeatVal);
            ChangeSize(1);
            PlaceModeChanged(0);
            Player.Clean();

            MetadataMode = false;
            ShowMetadata();
        }
Exemple #4
0
 public void SelectNoteMode(int mode)
 {
     if (NoteButtons[mode].interactable)
     {
         NoteType = mode;
         for (int i = 0; i < 5; i++)
         {
             if (i.Equals(mode))
             {
                 NoteButtons[i].gameObject.GetComponent <Image>().color = GlobalTheme.ThemeContrastColor();
             }
             else
             {
                 NoteButtons[i].gameObject.GetComponent <Image>().color = GlobalTheme.ThemeColor();
             }
             if (NoteType.Equals(0))
             {
                 FlickButtons[i].interactable = true;
             }
             else
             {
                 FlickButtons[i].interactable = i.Equals(0) ? true : false;
             }
         }
         if (!NoteType.Equals(0))
         {
             SelectFlickMode(0);
         }
     }
 }
Exemple #5
0
 private void ChangePlaceModeColor()
 {
     if (NotePlaceMode.Equals(0))
     {
         PlaceModePanel.color             = GlobalTheme.ThemeColor();
         PlaceModeTitle.color             = GlobalTheme.ThemeContrastColor();
         PlaceModeDesc.color              = GlobalTheme.ThemeContrastColor();
         PlaceModeBtn.targetGraphic.color = GlobalTheme.ThemeColor();
         PlaceModeBtn.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
     }
     else if (NotePlaceMode.Equals(1))
     {
         PlaceModePanel.color             = new Color32(0, 0, 255, 255);
         PlaceModeTitle.color             = new Color32(255, 255, 255, 255);
         PlaceModeDesc.color              = new Color32(255, 255, 255, 255);
         PlaceModeBtn.targetGraphic.color = new Color32(0, 0, 255, 255);
         PlaceModeBtn.GetComponentInChildren <Text>().color = new Color32(255, 255, 255, 255);
     }
     else if (NotePlaceMode.Equals(2))
     {
         PlaceModePanel.color             = new Color32(178, 0, 255, 255);
         PlaceModeTitle.color             = new Color32(255, 255, 255, 255);
         PlaceModeDesc.color              = new Color32(255, 255, 255, 255);
         PlaceModeBtn.targetGraphic.color = new Color32(178, 0, 255, 255);
         PlaceModeBtn.GetComponentInChildren <Text>().color = new Color32(255, 255, 255, 255);
     }
     else if (NotePlaceMode.Equals(3))
     {
         PlaceModePanel.color             = new Color32(255, 128, 0, 255);
         PlaceModeTitle.color             = new Color32(0, 0, 0, 255);
         PlaceModeDesc.color              = new Color32(0, 0, 0, 255);
         PlaceModeBtn.targetGraphic.color = new Color32(255, 128, 0, 255);
         PlaceModeBtn.GetComponentInChildren <Text>().color = new Color32(0, 0, 0, 255);
     }
 }
Exemple #6
0
        public void ChangeSize(int value)
        {
            SizeVal = value;
            for (int i = 0; i < 3; i++)
            {
                if (i.Equals(value))
                {
                    SizeButtons[i].targetGraphic.color = GlobalTheme.ThemeContrastColor();
                    SizeButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
                }
                else
                {
                    SizeButtons[i].targetGraphic.color = GlobalTheme.ThemeColor();
                    SizeButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
                }
            }

            if (SelectedNote.Count > 0 && SizeVal != 2)
            {
                foreach (CreatorNote note in SelectedNote)
                {
                    note.Size = SizeVal;
                    note.UpdateInfoToUI();
                }
            }
        }
 public void SetKeyCode(KeyCode key, int number)
 {
     gameKeys[number - 1] = key;
     btn[number - 1].GetComponent <Image>().color          = new Color32(0, 0, 0, 255);
     btn[number - 1].GetComponentInChildren <Text>().text  = gameKeys[number - 1].ToString();
     btn[number - 1].GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor(themeVal);
     KeyInputWaiting = false;
 }
Exemple #8
0
        public void ModeClicked(int index)
        {
            if (index.Equals(1))
            {
                CurrentQueue = Starlight5;
            }
            else if (index.Equals(2))
            {
                CurrentQueue = Theater2;
            }
            else if (index.Equals(3))
            {
                CurrentQueue = Theater4;
            }
            else if (index.Equals(4))
            {
                CurrentQueue = Theater6;
            }
            else if (index.Equals(5))
            {
                CurrentQueue = Platinum1;
            }

            for (int i = 0; i < 5; i++)
            {
                if (i.Equals(index - 1))
                {
                    ModeBtn[i].gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
                    ModeBtn[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
                }
                else
                {
                    ModeBtn[i].gameObject.GetComponent <Image>().color          = Color.white;
                    ModeBtn[i].gameObject.GetComponentInChildren <Text>().color = Color.black;
                }
            }

            for (int i = 0; i < 4; i++)
            {
                LevelBtn[i].interactable = false;
                LevelBtn[i].gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
                LevelBtn[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
                if (CurrentQueue[i].Count > 0)
                {
                    LevelBtn[i].interactable = true;
                }
            }

            if (LevelSelectedPrevious)
            {
                animationObj.Play("SelectSong_ModeReselected");
                LevelSelectedPrevious = false;
            }
            if (BeatmapIndexPanel.activeSelf)
            {
                BeatmapIndexPanel.SetActive(false);
            }
        }
Exemple #9
0
        public void ReceiveFileData(int index, string fullPath)
        {
            CurrentFilePath = fullPath;
            FileButtons[CurrentListIndex].SetColor(GlobalTheme.ThemeColor(), GlobalTheme.ThemeContrastColor());
            FileButtons[index].SetColor(GlobalTheme.ThemeContrastColor(), GlobalTheme.ThemeColor());
            CurrentListIndex = index;

            if (!LoadBtn.interactable)
            {
                LoadBtn.interactable = true;
            }
        }
Exemple #10
0
        public void LevelSelected(int index)
        {
            CurrentBeatmaps = CurrentQueue[index].ToArray();
            LevelIndex      = index;
            CurrentIndex    = 0;
            if (CurrentBeatmaps.Length > 1)
            {
                BeatmapIndexPanel.SetActive(true); BeatmapIndexChanged(0);
            }
            else
            {
                BeatmapIndexPanel.SetActive(false); BeatmapIndexChanged(0);
            }
            LevelSelectedPrevious = true;

            for (int i = 0; i < 4; i++)
            {
                if (i.Equals(index))
                {
                    Color c = Color.white, t = Color.white;
                    if (index.Equals(0))
                    {
                        c = Color.cyan; t = Color.black;
                    }
                    else if (index.Equals(1))
                    {
                        c = Color.yellow; t = Color.black;
                    }
                    else if (index.Equals(2))
                    {
                        c = Color.red; t = Color.white;
                    }
                    else if (index.Equals(3))
                    {
                        c = Color.magenta; t = Color.white;
                    }
                    LevelBtn[i].gameObject.GetComponent <Image>().color          = c;
                    LevelBtn[i].gameObject.GetComponentInChildren <Text>().color = t;
                    DensityPanel.GetComponent <Image>().color = c;
                    densityMainText.color = t;
                    densitySubText.color  = t;
                }
                else
                {
                    LevelBtn[i].gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
                    LevelBtn[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
                }
            }
            LoadBeatmapInfo();
        }
Exemple #11
0
        public void SpecificView()
        {
            ViewSpecific = ViewSpecific ? false : true;
            UpdateSpecificView();

            if (ViewSpecific)
            {
                ViewSpecificBtn.targetGraphic.color = GlobalTheme.ThemeContrastColor();
                ViewSpecificBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
            }
            else
            {
                ViewSpecificBtn.targetGraphic.color = GlobalTheme.ThemeColor();
                ViewSpecificBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
            }
        }
Exemple #12
0
 public void LevelSelect(int value)
 {
     LevelVal = value;
     for (int i = 0; i < 4; i++)
     {
         if ((i + 1).Equals(value))
         {
             LevelButtons[i].targetGraphic.color = GlobalTheme.ThemeContrastColor();
             LevelButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
         }
         else
         {
             LevelButtons[i].targetGraphic.color = GlobalTheme.ThemeColor();
             LevelButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
     }
 }
Exemple #13
0
        // ========== FROM HERE THIS IS METADATA CONTROL

        public void ShowMetadata()
        {
            MetadataMode = MetadataMode ? false : true;

            if (MetadataMode)
            {
                RightMetadataPanel.transform.SetAsLastSibling();
                OpenMetadataBtn.targetGraphic.color = GlobalTheme.ThemeContrastColor();
                OpenMetadataBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
            }
            else
            {
                RightControlPanel.transform.SetAsLastSibling();
                OpenMetadataBtn.targetGraphic.color = GlobalTheme.ThemeColor();
                OpenMetadataBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
            }
        }
Exemple #14
0
 public void SelectFlickMode(int mode)
 {
     if (FlickButtons[mode].interactable)
     {
         FlickType = mode;
         for (int i = 0; i < 5; i++)
         {
             if (i.Equals(mode))
             {
                 FlickButtons[i].gameObject.GetComponent <Image>().color = GlobalTheme.ThemeContrastColor();
             }
             else
             {
                 FlickButtons[i].gameObject.GetComponent <Image>().color = GlobalTheme.ThemeColor();
             }
         }
     }
 }
Exemple #15
0
 public void ChangeBeats(int value)
 {
     if (value.Equals(3))
     {
         BeatVal = 3;
         BeatButton[0].targetGraphic.color = GlobalTheme.ThemeContrastColor();
         BeatButton[0].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
         BeatButton[1].targetGraphic.color = GlobalTheme.ThemeColor();
         BeatButton[1].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
     }
     else if (value.Equals(4))
     {
         BeatVal = 4;
         BeatButton[1].targetGraphic.color = GlobalTheme.ThemeContrastColor();
         BeatButton[1].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
         BeatButton[0].targetGraphic.color = GlobalTheme.ThemeColor();
         BeatButton[0].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
     }
 }
 public void TabSelected(int index)
 {
     for (int i = 0; i < 3; i++)
     {
         if (i.Equals(index))
         {
             Panels[i].GetComponent <CanvasGroup>().alpha = 1;
             Panels[i].GetComponent <RectTransform>().SetAsLastSibling();
             Tabs[i].GetComponent <Image>().color          = GlobalTheme.ThemeContrastColor(themeVal);
             Tabs[i].GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor(themeVal);
         }
         else
         {
             Panels[i].GetComponent <CanvasGroup>().alpha  = 0;
             Tabs[i].GetComponent <Image>().color          = GlobalTheme.ThemeColor(themeVal);
             Tabs[i].GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor(themeVal);
         }
     }
 }
 public void KeySetButtonClick(int number)
 {
     for (int i = 0; i < 6; i++)
     {
         if (i.Equals(number - 1))
         {
             btn[i].GetComponent <Image>().color          = GlobalTheme.ThemeColor(themeVal);
             btn[i].GetComponentInChildren <Text>().text  = LocaleManager.instance.GetLocaleText("setting_keybtn");
             btn[i].GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor(themeVal);
             selectedLine = number;
         }
         else
         {
             btn[i].GetComponent <Image>().color          = new Color32(0, 0, 0, 255);
             btn[i].GetComponentInChildren <Text>().text  = gameKeys[i].ToString();
             btn[i].GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
         }
     }
     KeyInputWaiting = true;
 }
Exemple #18
0
 private void ChangeLine(int value)
 {
     if (value > 0)
     {
         MaxLine = value;
         for (int i = 1; i < 9; i++)
         {
             if (i.Equals(value))
             {
                 LineButtons[i].targetGraphic.color = GlobalTheme.ThemeContrastColor();
                 LineButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
             }
             else if (LineButtons[i] != null)
             {
                 LineButtons[i].targetGraphic.color = GlobalTheme.ThemeColor();
                 LineButtons[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
             }
         }
     }
 }
Exemple #19
0
 public void LoadMusic(string path, int index)
 {
     if (Application.platform.Equals(RuntimePlatform.Android) || Application.platform.Equals(RuntimePlatform.IPhonePlayer))
     {
         StartCoroutine(LoadMusicProgress("file://" + path));
     }
     else
     {
         StartCoroutine(LoadMusicProgress(path));
     }
     for (int i = 0; i < Buttons.Count; i++)
     {
         if (i.Equals(index))
         {
             Buttons[i].GetComponent <Image>().color          = GlobalTheme.ThemeContrastColor();
             Buttons[i].GetComponentInChildren <Text>().color = GlobalTheme.ThemeColor();
         }
         else
         {
             Buttons[i].GetComponent <Image>().color          = GlobalTheme.ThemeColor();
             Buttons[i].GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
     }
 }
Exemple #20
0
        public void Selected(int index, string title, List <BeatmapInfo>[] St5, List <BeatmapInfo>[] Th2, List <BeatmapInfo>[] Th4, List <BeatmapInfo>[] Th6, List <BeatmapInfo>[] Pt1, bool[] filled, int bgaFrame, string bgaPath, string backPath)
        {
            Starlight5 = St5;
            Theater2   = Th2;
            Theater4   = Th4;
            Theater6   = Th6;
            Platinum1  = Pt1;
            CurBGAVal  = bgaFrame;
            BGAPath    = bgaPath;
            BackPath   = backPath;

            titleText.text  = title;
            artistText.text = null;
            authorText.text = null;
            for (int i = 0; i < 5; i++)
            {
                ModeBtn[i].interactable = false;
                ModeBtn[i].gameObject.GetComponent <Image>().color          = Color.white;
                ModeBtn[i].gameObject.GetComponentInChildren <Text>().color = Color.black;
                if (filled[i])
                {
                    ModeBtn[i].interactable = true;
                }
            }
            for (int i = 0; i < 4; i++)
            {
                LevelBtn[i].interactable = false;
                LevelBtn[i].gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
                LevelBtn[i].gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
            }
            animationObj.Play("SelectSong_SongSelected", 0, 0);
            if (!TitlePanel.activeSelf)
            {
                TitlePanel.SetActive(true);
            }
            if (!PeoplePanel.activeSelf)
            {
                PeoplePanel.SetActive(true);
            }
            if (!ModePanel.activeSelf)
            {
                ModePanel.SetActive(true);
            }

            if (!SongSelectedPrevious)
            {
                OptionPanel.SetActive(true);
                SongSelectedPrevious = true;
            }
            LevelSelectedPrevious = false;
            if (BeatmapIndexPanel.activeSelf)
            {
                BeatmapIndexPanel.SetActive(false);
            }

            if (lastButtonIdx != -1)
            {
                buttons[lastButtonIdx].GetComponent <Graphic>().color = GlobalTheme.ThemeColor();
                buttons[lastButtonIdx].GetComponent <SongButton>().buttonText.color = GlobalTheme.ThemeContrastColor();
            }
            lastButtonIdx = index;
        }
Exemple #21
0
 public void GameOptionSelected(int index)
 {
     //Debug.Log(index);
     if (index.Equals(0)) // AUTO PLAY
     {
         autoPlay = autoPlay ? false : true;
         if (autoPlay)
         {
             AutoPlayBtn.gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
             AutoPlayBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
         else
         {
             AutoPlayBtn.gameObject.GetComponent <Image>().color          = Color.white;
             AutoPlayBtn.gameObject.GetComponentInChildren <Text>().color = Color.black;
         }
     }
     else if (index.Equals(1)) // RANDOM WAVE
     {
         randWave = randWave ? false : true;
         if (randWave)
         {
             RandWaveBtn.gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
             RandWaveBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
         else
         {
             RandWaveBtn.gameObject.GetComponent <Image>().color          = Color.white;
             RandWaveBtn.gameObject.GetComponentInChildren <Text>().color = Color.black;
         }
     }
     else if (index.Equals(2)) // NO MUSIC
     {
         noMusic = noMusic ? false : true;
         if (noMusic)
         {
             NoMusicBtn.gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
             NoMusicBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
         else
         {
             NoMusicBtn.gameObject.GetComponent <Image>().color          = Color.white;
             NoMusicBtn.gameObject.GetComponentInChildren <Text>().color = Color.black;
         }
     }
     else if (index.Equals(3)) // MIRROR
     {
         mirror = mirror ? false : true;
         if (mirror)
         {
             MirrorBtn.gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
             MirrorBtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
         else
         {
             MirrorBtn.gameObject.GetComponent <Image>().color          = Color.white;
             MirrorBtn.gameObject.GetComponentInChildren <Text>().color = Color.black;
         }
     }
     else if (index.Equals(4)) // DEFAULT BGA
     {
         defBGA = defBGA ? false : true;
         if (defBGA)
         {
             DefBGABtn.gameObject.GetComponent <Image>().color          = GlobalTheme.ThemeColor();
             DefBGABtn.gameObject.GetComponentInChildren <Text>().color = GlobalTheme.ThemeContrastColor();
         }
         else
         {
             DefBGABtn.gameObject.GetComponent <Image>().color          = Color.white;
             DefBGABtn.gameObject.GetComponentInChildren <Text>().color = Color.black;
         }
     }
 }
        // Use this for initialization
        void Start()
        {
            if (Application.platform.Equals(RuntimePlatform.WindowsPlayer))
            {
                WindowsPanel.SetActive(true);
            }
            else if (Application.platform.Equals(RuntimePlatform.Android))
            {
                AndroidPanel.SetActive(true);
            }
            else if (Application.platform.Equals(RuntimePlatform.IPhonePlayer))
            {
                iOSPanel.SetActive(true);
            }

            KeyInputWaiting = false;
            selectedLine    = 0;
            for (int i = 1; i <= 6; i++)
            {
                if (PlayerPrefs.HasKey("key" + i.ToString()).Equals(true))
                {
                    gameKeys[i - 1] = (KeyCode)PlayerPrefs.GetInt("key" + i.ToString());
                    btn[i - 1].GetComponentInChildren <Text>().text = gameKeys[i - 1].ToString();
                }
            }
#if UNITY_STANDALONE || UNITY_EDITOR
            screenSelector.value = PlayerPrefs.GetInt("screenselect");
            if (PlayerPrefs.GetInt("fullscreen").Equals(0))
            {
                fullScreen.isOn = true;
            }
            else
            {
                fullScreen.isOn = false;
            }
            fullScreen.interactable = true;
#endif
            if (PlayerPrefs.HasKey("hitsound").Equals(false))
            {
                PlayerPrefs.SetString("hitsound", "true"); hitSound = "true";
            }
            else
            {
                hitSound = PlayerPrefs.GetString("hitsound");
            }
            if (hitSound.Equals("true"))
            {
                hitSoundTog.isOn = true;
            }

            if (PlayerPrefs.HasKey("tempestic").Equals(false))
            {
                PlayerPrefs.SetString("tempestic", "true"); tempestic = "true";
            }
            else
            {
                tempestic = PlayerPrefs.GetString("tempestic");
            }
            if (tempestic.Equals("true"))
            {
                tpstTog.isOn = true;
            }

            if (PlayerPrefs.HasKey("flickmode").Equals(false))
            {
                PlayerPrefs.SetInt("flickmode", 1); flickValue = 1;
            }
            else
            {
                flickValue = PlayerPrefs.GetInt("flickmode");
            }
            if (flickValue.Equals(0))
            {
                flickLoose.isOn = true;
            }
            else if (flickValue.Equals(1))
            {
                flickNormal.isOn = true;
            }
            else if (flickValue.Equals(2))
            {
                flickStrict.isOn = true;
            }
            else if (flickValue.Equals(3))
            {
                flickDynamic.isOn = true;
            }

            if (PlayerPrefs.HasKey("canvasnote") && PlayerPrefs.GetInt("canvasnote").Equals(0))
            {
                canvasNote.isOn = true; canvasVal = 0;
            }
            else
            {
                canvasNote.isOn = false; canvasVal = 1;
            }

            if (PlayerPrefs.HasKey("sdcard"))
            {
                SDval.text = PlayerPrefs.GetString("sdcard");
            }

            if (PlayerPrefs.HasKey("theater2") && PlayerPrefs.GetInt("theater2").Equals(0))
            {
                T2Portrait.isOn = true; T2ScreenVal = 0;
            }
            else
            {
                T2Landscape.isOn = true; T2ScreenVal = 1;
            }

            langCode = PlayerPrefs.GetInt("locale");
            if (PlayerPrefs.HasKey("tinytip").Equals(true) && PlayerPrefs.GetInt("tinytip").Equals(1))
            {
                tinyTipTog.isOn = false; tinyTipVal = 1;
            }
            else
            {
                tinyTipTog.isOn = true; tinyTipVal = 0;
            }
            if (PlayerPrefs.HasKey("720p").Equals(true) && PlayerPrefs.GetInt("720p").Equals(0))
            {
                fixResTog.isOn = true; fixResVal = 0;
            }
            else
            {
                fixResTog.isOn = false; fixResVal = 1;
            }

            themeVal = 0;
            if (PlayerPrefs.HasKey("theme"))
            {
                themeVal = PlayerPrefs.GetInt("theme");
            }
            themeToggle[themeVal].isOn = true;
            SetTheme();


#if UNITY_ANDROID
            if (!Social.localUser.authenticated)
            {
                socialTextAnd.text  = LocaleManager.instance.GetLocaleText("setting_notloggedin");
                socialTextAnd.color = Color.white;
            }
            else
            {
                socialTextAnd.text  = LocaleManager.instance.GetLocaleText("setting_playgameslogged");
                socialTextAnd.color = GlobalTheme.ThemeColor(RuntimePlatform.Android);
            }
#elif UNITY_IOS
            if (!Social.localUser.authenticated)
            {
                socialTextiOS.text  = LocaleManager.instance.GetLocaleText("setting_notloggedin");
                socialTextiOS.color = Color.white;
            }
            else
            {
                socialTextiOS.text  = LocaleManager.instance.GetLocaleText("setting_gamecenterlogged");
                socialTextiOS.color = GlobalTheme.ThemeColor(RuntimePlatform.IPhonePlayer);
            }
#endif
        }