Beispiel #1
0
    public IEnumerator CheckLogin(string fileName, string[] str)
    {
        WWWForm phpform = new WWWForm();

        phpform.AddField("user_id", str[0]);
        phpform.AddField("user_pwd", str[1]);
        WWW reg = new WWW(serverlink + fileName, phpform);

        yield return(reg);

        if (reg.error == null)
        {
            if (reg.text == "0")
            {
                state = 0;//帳密錯誤
            }
            else
            {
                AccountInfo = reg.text.Split(',');
                state       = 1;
                xmlprocess  = new Xmlprocess(AccountInfo[0]);
                //xmlprocess.setUserInfo(AccountInfo);
                xmlprocess.New_timeHistoryRecord("Login", DateTime.Now.ToString("yyyy-MM-dd"));
            }
        }
        else
        {
            Debug.Log("error msg" + reg.error);
        }
    }
Beispiel #2
0
    void goScene(string sceneName)
    {
        Debug.Log(sceneName);
        string startTime = (System.DateTime.Now).ToString("HH:mm:ss");

        xmlprocess.New_timeHistoryRecord(sceneName, startTime);
        SceneManager.LoadScene(sceneName);
    }
Beispiel #3
0
    /*適用於非同步競賽
     *
     * public IEnumerator requestMember()
     * {
     *
     *  WWWForm phpform = new WWWForm();
     *  phpform.AddField("user_id", playerInfo[0]);
     *  phpform.AddField("level", playerInfo[2]);
     *
     *  WWW reg = new WWW(serverlink + "searchEnemy", phpform);
     *  yield return reg;
     *  if (reg.error == null)
     *  {
     *      enemyInfo = reg.text.Split(',');
     *      xmlprocess.New_timeHistoryRecord("SearchEnemy", searchTime);
     *  }
     *  else
     *  {
     *      Debug.Log( "error msg" + reg.error );
     *  }
     * }
     */
    public IEnumerator loadingQues()
    {
        WWWForm phpform = new WWWForm();

        phpform.AddField("level", playerInfo[2]);

        WWW reg = new WWW(serverlink + "searchEnemy", phpform);

        yield return(reg);

        if (reg.error == null)
        {
            enemyInfo = reg.text.Split(',');
            xmlprocess.New_timeHistoryRecord("SearchEnemy", searchTime);
        }
        else
        {
            Debug.Log("error msg" + reg.error);
        }
    }