Пример #1
0
 private void GeneLabelButton(float x, float y, string labelString, string button, int keyNumber)
 {
     GUI.Label(new Rect(x, y, 100, 20), labelString);
     if (!allFalse())
     {
         if (GUI.Button(new Rect(x + 120, y, 100, 20), button))
         {
             reboundButton[keyNumber] = true;
         }
     }
     else if (reboundButton[keyNumber])
     {
         GUI.Label(new Rect(50, 200, 200, 50), "Press a button to rebound " + labelString + '\n' + "Press ESC to cancle");
         //GUI.Window(0, new Rect(0, 0, Screen.width, Screen.height), null, "Press a button to rebound" + '\n' + "Press ESC to cancle");
         if (Input.GetKeyDown(KeyCode.Escape))
         {
             reboundButton[keyNumber] = false;
         }
         if (Input.anyKeyDown)
         {
             if (!Input.GetKey(KeyCode.Escape) && !Input.GetMouseButton(0) && !Input.GetMouseButton(1) && !Input.GetMouseButton(2))
             {
                 reboundButton[keyNumber] = false;
                 //Debug.Log(button+keyNumber);
                 GameManager.Instance.playerSetting.currentButton[keyNumber] = Event.current.keyCode;
                 GameManager.Instance.playerSetting.sameButton(keyNumber);
                 SaveNLoad.Save(GameManager.Instance.playerSetting);
             }
         }
     }
 }
Пример #2
0
    void Start()
    {
        if (!File.Exists(Application.persistentDataPath + "/PlayerButtonSetting.setting"))
        {
            SaveNLoad.Save(GameManager.Instance.playerSetting);
        }
        //Debug.Log(GameManager.Instance.playerSetting.currentButton[11]);
        GameManager.Instance.playerSetting = SaveNLoad.Load();

        foreach (Button btn in this.GetComponentsInChildren <Button>(true))
        {
            mainMenuBtn.Add(btn);
            btn.onClick.AddListener(delegate
            {
                OnClick(btn);
            });
        }

        if (GameManager.Instance.playerSetting.lastLevel == Level.None)
        {
            mainMenuBtn[1].enabled = false;
        }
        else
        {
            mainMenuBtn[1].enabled = true;
        }
    }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     DontDestroyOnLoad(this.gameObject); // 씬 로드 시 캐릭터 파괴 금지
     animator     = GetComponent <Animator>();
     boxCollider  = GetComponent <BoxCollider2D>();
     theSaveNLoad = FindObjectOfType <SaveNLoad>();
 }
Пример #4
0
    // Start is called before the first frame update

    private void Awake()

    /////////////////////////////////////////////////////////로드할 때 loadFadingN 함수 실행하시오.


    {
        instance = this;
    }
Пример #5
0
 private void sliderChanged()
 {
     Debug.Log("volume changed " + volume.value);
     GameManager.Instance.playerSetting.volume = (int)volume.value;
     volumeNum.text = GameManager.Instance.playerSetting.volume.ToString();
     AkSoundEngine.SetRTPCValue("Master_Volume", volume.value, Camera.main.gameObject);
     SaveNLoad.Save(GameManager.Instance.playerSetting);
 }
Пример #6
0
    //private int fileCount = 3;                              //세이브 저장 가능 갯수


    //private PlayerManager thePlayer;

    void Start()
    {
        slots = slotObject.GetComponentsInChildren <SettingSlot>();
        theDB = FindObjectOfType <DatabaseManager>();
        theSL = FindObjectOfType <SaveNLoad>();
//        Debug.Log(theSL.data.saveName);

        theSL.loadList();
        // if(theSL.loadList()==0){

        // }
        //for(int i=1; i<=3;i++){
        //    slots[i].name_text.text =theSL.data.saveName[i];
        //    slots[i].time_text.text =theSL.data.saveTime[i];
        //}
        //세이브파일 다 열어서 lastSaveNum 비교 가 아니라 하나열어서 그대로 걍 대입

        /*
         * for(int i=1; i<=fileCount; i++){
         *
         *  BinaryFormatter bf = new BinaryFormatter();
         *  FileStream file = File.Open(Application.dataPath + "/SaveFile" + i +".dat", FileMode.Open);
         *
         *  if(file != null && file.Length >0){
         *      data =(Data)bf.Deserialize(file);
         *
         *      slots[i].name_text.text = data.saveName[i-1];
         *      slots[i].time_text.text = data.saveTime[i-1];
         *
         *  }
         *  else{
         *
         *      slots[i].name_text.text = "";
         *      slots[i].time_text.text = "";
         *      Debug.Log(i +"번에 저장된 파일없음");
         *  }
         *
         *  file.Close();
         * }*/
        /*
         * Debug.Log(theDB.lastSaveNum);
         * lastSaveNum = theDB.lastSaveNum;
         * if(lastSaveNum!=0){
         *  BinaryFormatter bf = new BinaryFormatter();
         *  FileStream file = File.Open(Application.dataPath + "/SaveFile" + lastSaveNum +".dat", FileMode.Open);
         *
         *  if(file != null && file.Length >0){
         *      data =(Data)bf.Deserialize(file);
         *
         *
         *
         * }   */
        //
        //FileStream file = File.Open(Application.dataPath + "/SaveFile1.dat", FileMode.Open);
        //

        //if(file != null && file.Length >0){
    }
Пример #7
0
 void Start()
 {
     instance  = this;
     quitcheck = false;
     thecamera = FindObjectOfType <CameraManager>();
     themain   = FindObjectOfType <Main>();
     music     = FindObjectOfType <Music>();
     saveNload = FindObjectOfType <SaveNLoad>();
 }
Пример #8
0
    void Start()
    {
        Queue <string> queue = new Queue <string>();

        boxCollider  = GetComponent <BoxCollider2D>();
        animator     = GetComponent <Animator>();
        theAudio     = FindObjectOfType <AudioManager>();
        theSaveNLoad = FindObjectOfType <SaveNLoad>();
    }
Пример #9
0
 private void Start()
 {
     sr           = GetComponent <SpriteRenderer>();
     animator     = GetComponent <Animator>();
     rb2D         = GetComponent <Rigidbody2D>();
     theWeapon    = FindObjectOfType <WeaponMotion>();
     theSaveNLoad = FindObjectOfType <SaveNLoad>();
     So           = FindObjectOfType <ShopOpen>();
 }
Пример #10
0
 private void Start()
 {
     animator = GetComponent <Animator>();
     //tilemapCollider = GetComponent<TilemapCollider2D>();
     boxCollider = GetComponent <BoxCollider2D>();
     queue       = new Queue <string>();
     PlayerPrefs.DeleteAll();//첫 실행시 모든 저장된 값 초기화
     theSaveNLoad = FindObjectOfType <SaveNLoad>();
 }
Пример #11
0
    IEnumerator LoadCoroutine()
    {
        AsyncOperation operation = SceneManager.LoadSceneAsync(sceneName);

        while (!operation.isDone)
        {
            yield return(null);
        }
        theSaveNLoad = FindObjectOfType <SaveNLoad>();
        theSaveNLoad.LoadData();
        Destroy(gameObject);
    }
Пример #12
0
    void Start()
    {
        theDB     = DatabaseManager.instance;
        theBook   = BookManager.instance;
        thePlayer = PlayerManager.instance;
        theSL     = FindObjectOfType <SaveNLoad>();
#if DEV_MODE
        isDevMode.SetActive(true);
        isDevMode.GetComponent <Text>().text += " VER." + Application.version + " " + DebugManager.instance.update;
        playCount.text  += DebugManager.instance.playerInfo.count_play;
        clearCount.text += DebugManager.instance.playerInfo.count_clear;
#endif
    }
Пример #13
0
 private void DefaultBtn()
 {
     for (int i = 0; i < GameManager.Instance.playerSetting.currentButton.Length; i++)
     {
         GameManager.Instance.playerSetting.currentButton[i] = GameManager.Instance.playerSetting.defaultButton[i];
     }
     GameManager.Instance.playerSetting.volume = 50;
     volume.value   = GameManager.Instance.playerSetting.volume;
     volumeNum.text = volume.value.ToString();
     GameManager.Instance.playerSetting.player1Controller = false;
     tog.isOn = GameManager.Instance.playerSetting.player1Controller;
     SaveNLoad.Save(GameManager.Instance.playerSetting);
 }
Пример #14
0
 //FadeManager theFade;
 //private OrderManager theOrder;
 void Start()
 {
     //instance = this;
     theSL     = FindObjectOfType <SaveNLoad>();
     thePlayer = FindObjectOfType <PlayerManager>();
     theDB     = FindObjectOfType <DatabaseManager>();
     //StopAllCoroutines();
     //theSL.CallLoad(theDB.phaseNum);
     if (!DebugManager.instance.onDebug)
     {
         StartCoroutine(Loading());
     }
 }
Пример #15
0
 private int GeneLabelSlider(float x, float y, ref int volume)
 {
     //volume = GameManager.Instance.playerSetting.volume;
     GUI.Label(new Rect(x, y + 30, 100, 20), "Volume");
     volume = (int)GUI.HorizontalSlider(new Rect(x + 150, y + 30, Screen.width - x - 50 - 100 - 100, 20), volume, 0.0f, 100.0f);
     GUI.Label(new Rect(x + 100, y + 30, 50, 20), volume.ToString());
     if ((Input.GetMouseButtonUp(0) || Input.GetMouseButtonUp(1) || Input.GetMouseButtonUp(2)) &&
         GameManager.Instance.playerSetting.volume != volume)
     {
         SaveNLoad.Save(GameManager.Instance.playerSetting);
     }
     return(volume);
 }
Пример #16
0
    IEnumerator LoadCoroutine()
    {
        //SceneManager.LoadScene(scnenName);
        AsyncOperation operation = SceneManager.LoadSceneAsync(scnenName); // 동기화

        while (!operation.isDone)                                          // while문 안에다가 로딩 화면 만들어줘도 좋음. (opeartion.process 이용)
        {
            yield return(null);
        } // 로딩이 끝날 때까지 1프레임씩 대기하다가 로딩이 끝나면 while문 벗어나서 데이터 호출.

        // Awake에서 부르면 이미 파괴되었기때문에 여기서 찾아줘야함.
        theSaveNLoad = FindObjectOfType <SaveNLoad>();
        theSaveNLoad.LoadData();
        gameObject.SetActive(false); // DontDestroy 때문에 Destroy로는 안먹힘.
    }
Пример #17
0
    void Start()
    {
        //Debug.Log(GameManager.Instance.playerSetting.currentButton.Length);
        for (int i = 0; i < GameManager.Instance.playerSetting.currentButton.Length; i++)
        {
            reboundButton[i] = false;
        }

        if (!File.Exists(Application.persistentDataPath + "/PlayerButtonSetting.setting"))
        {
            SaveNLoad.Save(GameManager.Instance.playerSetting);
        }
        //Debug.Log(GameManager.Instance.playerSetting.currentButton[11]);
        GameManager.Instance.playerSetting = SaveNLoad.Load();
    }
Пример #18
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;
    }
Пример #19
0
 // Use this for initialization
 void Start()
 {
     if (instance == null)
     {
         queue = new Queue <string>();
         DontDestroyOnLoad(this.gameObject);
         boxCollider  = GetComponent <BoxCollider2D>();
         animator     = GetComponent <Animator>();
         instance     = this;
         theAudio     = FindObjectOfType <AudioManager>();
         theSaveNLoad = FindObjectOfType <SaveNLoad>();
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Пример #20
0
    public static void SaveScore(SaveNLoad SD)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        //name/path of file
        string path = Application.persistentDataPath + "/Highscore" + "/" + SD.Player + Random.Range(0, 1000000000) + ".Asteroid";

        if (!File.Exists(path))
        {
            FileStream    stream   = new FileStream(path, FileMode.Create);
            SaveVariables SaveData = new SaveVariables(SD);
            formatter.Serialize(stream, SaveData);
            stream.Close();
        }
        else
        {
            Debug.Log("FILE ALREADY EXISTS");
        }
    }
Пример #21
0
    void Start()
    {
        playerMove   = true;
        stick        = transform.GetChild(0).gameObject;
        pc           = gameObject.GetComponentInChildren <PolygonCollider2D>();
        animator     = GetComponent <Animator>();
        theSaveNLoad = FindObjectOfType <SaveNLoad>();

        if (!playerExists)
        {
            playerExists = true;
            DontDestroyOnLoad(transform.gameObject);
        }
        else
        {
            Destroy(gameObject);
        }
    }
Пример #22
0
    IEnumerator LoadCoroutine()                                            //로드씬을 한 후 바로 로드 데이터를 하면 너무 빠르게 이루어져 씬이 전부 불러와지지 않았는데, 로드데이터를 하여 null이 출력될 수 있다. 동기화를 위해 텀을 줘야한다.
    {
        AsyncOperation operation = SceneManager.LoadSceneAsync(sceneName); //싱크를 맞추기 위해 로딩관련 일을 할 수 있는 것

        go_LoadingBar.SetActive(true);                                     //로딩바 나오게

        while (!operation.isDone)                                          //로딩이 끝날 때까지
        {
            loadingBar.value = operation.progress;                         //로딩바 값
            yield return(null);                                            //대기
        }

        go_LoadingBar.SetActive(false);
        theSaveNLoad = FindObjectOfType <SaveNLoad>();
        theSaveNLoad.LoadData();

        this.gameObject.SetActive(false);
    }
        /// <summary>
        /// User clicked to button Save game configuration
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void BSave_Click(object sender, EventArgs e)
        {
            if (SDForSaveConfiguration.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            try//Saving main configuration
            {
                BinaryWriter saveMainConf = new BinaryWriter(new FileStream(SDForSaveConfiguration.FileName, FileMode.Create, FileAccess.Write));
                int          tmp1         = 40;
                Int32.TryParse(mTBGoldAtStart.Text, out tmp1);
                int tmp2 = 20;
                Int32.TryParse(mTBNumberOfLives.Text, out tmp2);
                SaveNLoad.SaveMainGameConfig(saveMainConf, _numberOfMonstersAtLevel, _goldForSuccessfulLevelFinish, _goldForKillMonster, PBMap.Tag, TBTowerFolder.Text,
                                             _levelsConfig.Count, 5, tmp1, tmp2);
                saveMainConf.Close();
            }
            catch (Exception exc)
            {
                MessageBox.Show(Resources.Save_error + exc.Message);
                return;
            }
            string filePath = SDForSaveConfiguration.FileName.Substring(0, SDForSaveConfiguration.FileName.LastIndexOf('\\') + 1);
            string fileName = SDForSaveConfiguration.FileName.Substring(SDForSaveConfiguration.FileName.LastIndexOf('\\') + 1);

            fileName = fileName.Substring(0, fileName.LastIndexOf('.'));
            try//Saving configurations of levels
            {
                FileStream levelConfSaveStream = new FileStream(filePath + fileName + ".tdlc", FileMode.Create, FileAccess.Write);
                IFormatter formatter           = new BinaryFormatter();
                foreach (MonsterParam t in _levelsConfig)
                {
                    formatter.Serialize(levelConfSaveStream, t);
                }
                levelConfSaveStream.Close();
            }
            catch (Exception exc)
            {
                MessageBox.Show(Resources.Save_error + exc.Message);
                return;
            }
            BNewGameConfig.Tag = 2;
        }
Пример #24
0
    void Start()
    {
        theSL    = FindObjectOfType <SaveNLoad>();
        theAudio = FindObjectOfType <AudioManager>();
        if (!DebugManager.instance.onDebug)
        {
            boxCollider.enabled = false;
        }
        if (instance == null)
        {
            DontDestroyOnLoad(this.gameObject);
            instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }

        ResetColor();
    }
Пример #25
0
    // Update is called once per frame
    private void Update()
    {
        for (int i = 0; i < GameManager.Instance.playerSetting.currentButton.Length; i++)
        {
            if (!allFalse())
            {
                playerButtons[i].gameObject.SetActive(true);
                playerButtons[i].enabled = true;
                Text text = playerButtons[i].GetComponentInChildren <Text>(true);
                text.text = GameManager.Instance.playerSetting.currentButton[i].ToString();
            }
            else
            {
                playerButtons[i].enabled = false;
                if (reboundButton[i])
                {
                    playerButtons[i].gameObject.SetActive(false);
                    if (Input.GetKeyDown(KeyCode.Escape))
                    {
                        reboundButton[i] = false;
                    }
                    if (Input.anyKeyDown)
                    {
                        if (!Input.GetKey(KeyCode.Escape) && !Input.GetMouseButton(0) && !Input.GetMouseButton(1) && !Input.GetMouseButton(2))
                        {
                            reboundButton[i] = false;
                            GameManager.Instance.playerSetting.currentButton[i] = GetKeyCode();
                            GameManager.Instance.playerSetting.sameButton(i);
                            SaveNLoad.Save(GameManager.Instance.playerSetting);
                        }
                    }
                }
            }
        }

        if (!GameManager.Instance.playerSetting.player1Controller)
        {
            btnlist.SetActive(true);
            textlist.SetActive(true);
            controllerImage.gameObject.SetActive(false);
        }
        else
        {
            btnlist.SetActive(false);
            textlist.SetActive(false);
            controllerImage.gameObject.SetActive(true);
        }

        if (!allFalse())
        {
            //defaultbtn.gameObject.SetActive(true);
            //tog.gameObject.SetActive(true);
            defaultbtn.enabled = true;
            tog.enabled        = true;
            volume.enabled     = true;
        }
        else
        {
            //defaultbtn.gameObject.SetActive(false);
            //tog.gameObject.SetActive(false);
            defaultbtn.enabled = false;
            tog.enabled        = false;
            volume.enabled     = false;
        }
    }
Пример #26
0
 private void Start()
 {
     GameManager.Instance.playerSetting.lastLevel = level;
     SaveNLoad.Save(GameManager.Instance.playerSetting);
     return;
 }
Пример #27
0
 private void toggleChange()
 {
     GameManager.Instance.playerSetting.player1Controller = tog.isOn;
     SaveNLoad.Save(GameManager.Instance.playerSetting);
 }
Пример #28
0
    // [Header("체크시 로고 활성화")]
    // public bool logoOn;
    // public GameObject logo;



    //private DatabaseManager theDB;

    void Start()
    {
        instance = this;
        theSL    = FindObjectOfType <SaveNLoad>();
        theDB    = FindObjectOfType <DatabaseManager>();
    }
 /// <summary>
 /// User clicked to button Load game configuration
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void BLoad_Click(object sender, EventArgs e)
 {
     ODForFileSelect.Filter   = "File with game configuration|*.tdgc";
     ODForFileSelect.FileName = "*.tdgc";
     if (ODForFileSelect.ShowDialog() == DialogResult.OK)
     {
         if (ODForFileSelect.FileName.LastIndexOf(".tdgc", StringComparison.Ordinal) == -1)
         {
             MessageBox.Show("Wrong file selected");
             return;
         }
         int levelsCount;
         try//Loading main configuration
         {
             BinaryReader loadMainConf = new BinaryReader(new FileStream(ODForFileSelect.FileName, FileMode.Open, FileAccess.Read));
             object[]     tmp;
             SaveNLoad.LoadMainGameConf(loadMainConf, out _numberOfMonstersAtLevel, out _goldForSuccessfulLevelFinish, out _goldForKillMonster, out tmp);
             string mapName = (string)tmp[0]; //0-Map name
             if (!ShowMapByFileName(mapName)) //If map file doesn't exists at path from configuration file, try to get it from folder with configuration
             {
                 ShowMapByFileName(ODForFileSelect.FileName.Substring(0, ODForFileSelect.FileName.LastIndexOf("\\", StringComparison.Ordinal) + 1) + mapName.Substring(mapName.LastIndexOf("\\", StringComparison.Ordinal)));
             }
             TBTowerFolder.Text    = (string)tmp[1];                                                 //1-Nam of the folder with towers configurations
             levelsCount           = (int)tmp[2];                                                    //2-Number of levels
             mTBGoldAtStart.Text   = Convert.ToInt32(tmp[4]).ToString(CultureInfo.InvariantCulture); //4-Money
             mTBNumberOfLives.Text = Convert.ToInt32(tmp[5]).ToString(CultureInfo.InvariantCulture); //5-Lives
             loadMainConf.Close();
         }
         catch (Exception exc)
         {
             MessageBox.Show(Resources.Load_error + exc.Message);
             return;
         }
         try//Loading configurations of levels
         {
             string     levelFileName   = ODForFileSelect.FileName.Substring(0, ODForFileSelect.FileName.LastIndexOf('.')) + ".tdlc";
             FileStream levelLoadStream = new FileStream(levelFileName, FileMode.Open, FileAccess.Read);
             IFormatter formatter       = new BinaryFormatter();
             _levelsConfig.Clear();
             for (int i = 0; i < levelsCount; i++)
             {
                 _levelsConfig.Add((MonsterParam)(formatter.Deserialize(levelLoadStream)));
             }
             levelLoadStream.Close();//All loaded, stream closing
             _currentLevel = 1;
             ShowLevelSettings(1);
             BRemoveLevel.Enabled = true;
             if (_levelsConfig.Count() > 1)
             {
                 BLoadMonsterPict.Enabled     = true;
                 GBNumberOfDirections.Enabled = true;
             }
         }
         catch (Exception exc)
         {
             MessageBox.Show(Resources.Load_error + exc.Message);
             return;
         }
     }
     BNewGameConfig.Tag    = 2;
     GBLevelConfig.Enabled = true;
     GBMapManage.Enabled   = true;
     if (_levelsConfig.Count != 0)
     {
         CBLevelInvisible.Enabled = true;
     }
     if (_levelsConfig.Count > 1)
     {
         BPrevLevel.Enabled = true;
         BNextLevel.Enabled = true;
     }
     BSave.Enabled = true;
 }
Пример #30
0
    private void OnGUI()
    {
        if (GUI.Button(new Rect(50, 100, 200, 20), "Setting"))
        {
            if (!settingClicked)
            {
                settingClicked = true;
            }
            else
            {
                settingClicked = false;
                for (int i = 0; i < GameManager.Instance.playerSetting.currentButton.Length; i++)
                {
                    reboundButton[i] = false;
                }
            }
        }
        if (!settingClicked)
        {
            if (GUI.Button(new Rect(50, 50, 200, 20), "Start"))
            {
                SceneManager.LoadScene("StartUpMenu");
            }

            if (GUI.Button(new Rect(50, 150, 200, 20), "Quit"))
            {
                Application.Quit();
            }
        }
        else
        {
            float widthRemain  = Screen.width - 250;
            float heightRemain = Screen.height - 40 - 140;
            int   amount       = GameManager.Instance.playerSetting.currentButton.Length / 2;
            GUI.Label(new Rect(250 + 50, 20, 200, 20), "Player1");
            GUI.Label(new Rect(250 + 50 + widthRemain / 2, 20, 200, 20), "Player2");


            if (!GameManager.Instance.playerSetting.player1Controller)
            {
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 1, "Forward", GameManager.Instance.playerSetting.currentButton[0].ToString(), 0);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 2, "Left", GameManager.Instance.playerSetting.currentButton[1].ToString(), 1);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 3, "Backward", GameManager.Instance.playerSetting.currentButton[2].ToString(), 2);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 4, "Right", GameManager.Instance.playerSetting.currentButton[3].ToString(), 3);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 5, "Emotion1", GameManager.Instance.playerSetting.currentButton[4].ToString(), 4);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 6, "Emotion2", GameManager.Instance.playerSetting.currentButton[5].ToString(), 5);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 7, "Emotion3", GameManager.Instance.playerSetting.currentButton[6].ToString(), 6);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 8, "Emotion4", GameManager.Instance.playerSetting.currentButton[7].ToString(), 7);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 9, "Jump", GameManager.Instance.playerSetting.currentButton[8].ToString(), 8);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 10, "Interact/Reattach", GameManager.Instance.playerSetting.currentButton[9].ToString(), 9);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 11, "Limbos Panel", GameManager.Instance.playerSetting.currentButton[10].ToString(), 10);
                GeneLabelButton(250 + 50, 60 + heightRemain / (amount + 2) * 12, "Dunno What Is Used For", GameManager.Instance.playerSetting.currentButton[11].ToString(), 11);

                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 1, "Forward", GameManager.Instance.playerSetting.currentButton[12].ToString(), 12);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 2, "Left", GameManager.Instance.playerSetting.currentButton[13].ToString(), 13);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 3, "Backward", GameManager.Instance.playerSetting.currentButton[14].ToString(), 14);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 4, "Right", GameManager.Instance.playerSetting.currentButton[15].ToString(), 15);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 5, "Emotion1", GameManager.Instance.playerSetting.currentButton[16].ToString(), 16);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 6, "Emotion2", GameManager.Instance.playerSetting.currentButton[17].ToString(), 17);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 7, "Emotion3", GameManager.Instance.playerSetting.currentButton[18].ToString(), 18);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 8, "Emotion4", GameManager.Instance.playerSetting.currentButton[19].ToString(), 19);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 9, "Jump", GameManager.Instance.playerSetting.currentButton[20].ToString(), 20);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 10, "Interact/Reattach", GameManager.Instance.playerSetting.currentButton[21].ToString(), 21);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 11, "Limbos Panel", GameManager.Instance.playerSetting.currentButton[22].ToString(), 22);
                GeneLabelButton(250 + 50 + widthRemain / 2, 60 + heightRemain / (amount + 2) * 12, "Dunno What Is Used For", GameManager.Instance.playerSetting.currentButton[23].ToString(), 23);
            }
            if (!allFalse())
            {
                bool player1Controller = GameManager.Instance.playerSetting.player1Controller;
                GameManager.Instance.playerSetting.player1Controller = GUI.Toggle(new Rect(550, Screen.height - 40, 200, 20), GameManager.Instance.playerSetting.player1Controller, "Controller");

                if (player1Controller != GameManager.Instance.playerSetting.player1Controller)
                {
                    SaveNLoad.Save(GameManager.Instance.playerSetting);
                }

                GeneLabelSlider(250 + 50, Screen.height - 140, ref GameManager.Instance.playerSetting.volume);
                if (GUI.Button(new Rect(250 + 50, Screen.height - 40, 200, 20), "Default"))
                {
                    for (int i = 0; i < GameManager.Instance.playerSetting.currentButton.Length; i++)
                    {
                        GameManager.Instance.playerSetting.currentButton[i] = GameManager.Instance.playerSetting.defaultButton[i];
                    }
                    GameManager.Instance.playerSetting.volume            = 50;
                    GameManager.Instance.playerSetting.player1Controller = false;
                    SaveNLoad.Save(GameManager.Instance.playerSetting);
                }
            }
        }
    }