private void CheckTouch()
    {
        if (!_isUsed)
        {
            return;
        }

        if (!Input.GetMouseButtonDown(0))
        {
            return;
        }
        //Debug.Log("SUCCESS TOUCH");

        if (isIndication())
        {
            return;
        }
        //Debug.Log("SUCCESS Indication");

        float distance = SimilarDistance(transform.position, _finishPos);

        //Debug.Log("B : " + distance);

        if (distance > RANK_BAD)
        {
            return;
        }

        //아래부터는 판정 완료

        RANK rank = RANK.MISS;

        if (distance < RANK_BAD)
        {
            rank = RANK.BAD;
        }
        if (distance < RANK_GOOD)
        {
            rank = RANK.GOOD;
        }
        if (distance < RANK_GREAT)
        {
            rank = RANK.GREAT;
        }
        if (distance < RANK_PERFECT)
        {
            rank = RANK.PERFECT;
        }

        StartCoroutine(_noteM.ViewRank(rank.ToString()));
        _noteM.ViewScore(RankToScore(rank));
        _noteM.ViewCombo(rank != RANK.BAD); // BAD가 아니라면 콤보 유지
        _noteM.PlayNote(_index);

        _isChecked = true;
    }
Exemplo n.º 2
0
    public void changeResult(int time, int correct)
    {
        int  allQ = GMS_.Qnumber;
        RANK rank = calcRank(allQ, correct);

        time_t.text    = time + "s";
        correct_t.text = correct + "/" + allQ;
        rank_t.text    = rank.ToString();
        comment_t.text = RankComment[(int)rank];
    }
Exemplo n.º 3
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public override HTTPReq MakeQuery_DBInsert()
    {
        HTTPReq query = new HTTPReq(ApplicationMain.instance.options.DBInfos.url + "/account_create.php", HTTP_METHOD.POST);

        query.AddParameter("id", id.ToString(), QUERY_PARAM_TYPE.VALUE);

        query.AddParameter("date_created", string.Format("{0}-{1}-{2}", m_dateCreated.Year, m_dateCreated.Month, m_dateCreated.Day), QUERY_PARAM_TYPE.VALUE);

        query.AddParameter("login_username", m_loginUsername, QUERY_PARAM_TYPE.STRING);

        query.AddParameter("login_password", m_loginPassword, QUERY_PARAM_TYPE.STRING);

        query.AddParameter("name", name, QUERY_PARAM_TYPE.STRING);

        query.AddParameter("rank", m_rank.ToString(), QUERY_PARAM_TYPE.STRING);

        query.AddParameter("type", m_type.ToString(), QUERY_PARAM_TYPE.STRING);

        return(query);
    }