コード例 #1
0
    IEnumerator SetRingColliderAgain()
    {
        if (inGame.HasOponents())
        {
            inGame.state = InGameState.GameState.SCORED;
        }
        sphere.transform.position = meshCollider.transform.position;
        yield return(new WaitForSeconds(1.0f));

        meshCollider.enabled = true;


        if (this.gameObject.tag == "PlayerRing")
        {
            inGame.scoredbyPlayer  = false;
            inGame.scoredbyOponent = true;

            if (sphere.distThrowed > 7.0f)
            {
                inGame.score_visiting += 3;
            }
            else
            {
                inGame.score_visiting += 2;
            }
        }
        else if (this.gameObject.tag == "OponentRing")
        {
            inGame.scoredbyPlayer  = true;
            inGame.scoredbyOponent = false;

            if (sphere.distThrowed > 7.0f)
            {
                inGame.score_local += 3;
            }
            else
            {
                inGame.score_local += 2;
            }
        }
    }