예제 #1
0
    IEnumerator DiaIsFin(string t_name, int t_ID)
    {
        yield return(new WaitUntil(CheckDia));

        TS.GetTask(t_name);
        nowTaskID = t_ID;
    }
예제 #2
0
파일: Drama2.cs 프로젝트: skanap/unity_game
    IEnumerator DiaIsFin(string t_name)
    {
        yield return(new WaitUntil(CheckDia));

        TS.GetTask(t_name);
    }
예제 #3
0
파일: Status.cs 프로젝트: skanap/unity_game
    public void Load()
    {/*
      * SceneName = PlayerPrefs.GetString("Scene_Name");
      * if (SceneName != "")
      * {*/
        isLoad    = true;
        SceneName = PlayerPrefs.GetString("Scene_Name");
        Chapter   = PlayerPrefs.GetString("Chapter");
        Debug.Log(Chapter);
        //if (Chapter == "Teaching")
        //{
        int _DiaID     = PlayerPrefs.GetInt("DiaID");
        int _TaskID    = PlayerPrefs.GetInt("TaskID");
        int _NowTaskID = PlayerPrefs.GetInt("NowTaskID");
        int _NowDiaID  = PlayerPrefs.GetInt("NowDiaID");

        for (int i = 1; i <= _DiaID; i++)
        {
            DS.SetFin(i);
        }
        for (int i = 0; i <= _TaskID; i++)
        {
            Task t = new Task();
            t.TaskID = i;
            TS.SetFin(t);
        }

        if (_NowTaskID != 0)
        {
            TS.GetTask("Task" + _NowTaskID.ToString());
        }
        if (_NowDiaID != 0 && Chapter == "Teaching")
        {
            DS.Talking(_NowDiaID, _NowDiaID - 2, TS.GetFin());
        }
        _NowTaskID = 0;
        _NowDiaID  = 0;
        //}

        /*
         * else if (Chapter == "Chapter_0")
         * {
         *  for(int i = 0 ; i < 19;i++){
         *    if(PlayerPrefs.HasKey("FinDia"+i)) {
         *      DS.SetFin(i);
         *      //PlayerPrefs.DeleteKey("FinDia" + i);
         *    }
         *  }
         *
         *  for(int i = 0 ; i < 12;i++){
         *    if(PlayerPrefs.HasKey("FinTask"+i)) {
         *      Debug.Log("HasKey");
         *      Task t = new Task();
         *      t.TaskID = i;
         *      TS.SetFin(t);
         *      //PlayerPrefs.DeleteKey("FinTask" + i);
         *    }
         *  }
         *
         *  //PlayerPrefs.SetInt("NowDia", DS.GetNow());
         *
         *  for (int i = 0; i < 12; i++)
         *  {
         *    if (PlayerPrefs.HasKey("NowTask" + i))
         *    {
         *      TS.GetTask("Task" + i);
         *      //PlayerPrefs.DeleteKey("NowTask" + i);
         *    }
         *  }
         * }*/
        Application.LoadLevel(SceneName);
        // } // if

        /*
         * else
         * {
         *  GameObject NoSave = GameObject.Find("NonSaveData");
         *  NoSave.SetActive(true);
         * }*/
    }