Exemplo n.º 1
0
    private IEnumerator WaitTurnChange()
    {
        yield return(new WaitForSeconds(0.2f));

        Debug.Log("ターンチェンジ");
        if (turnPlayer == TURNPLAYER.PLAYER)
        {
            turnPlayer = TURNPLAYER.COM;
        }
        else if (turnPlayer == TURNPLAYER.COM)
        {
            turnPlayer = TURNPLAYER.PLAYER;
        }

        switch (turnPlayer)
        {
        case TURNPLAYER.PLAYER:
            player.Initialize();
            break;

        case TURNPLAYER.COM:
            break;
        }
        state = STATE.WAIT_SELECT_CARD;
        Initialize();

        isTurnChange = false;
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        GameManager.Instance.state = GameManager.STATE.HANAFUDA;

        if (state != STATE.RESULT)
        {
            AudioManager.Instance.PlayBGM(AudioName.AudioNameManager.BGM_BGM_CHAPTER2_3, true, 1.0f);

            handoutCounter = 0;
            handCardTimer  = HANDCARD_MAXTIMER;
            turnPlayer     = TURNPLAYER.PLAYER;

            roleNameImage_Dic.Add(Role.RoleManager.SANKOU, roleNameImageList[0]);
            roleNameImage_Dic.Add(Role.RoleManager.YONKOU, roleNameImageList[1]);
            roleNameImage_Dic.Add(Role.RoleManager.AMEYONKOU, roleNameImageList[2]);
            roleNameImage_Dic.Add(Role.RoleManager.GOKOU, roleNameImageList[3]);
            roleNameImage_Dic.Add(Role.RoleManager.INOSHIKATYOU, roleNameImageList[4]);
            roleNameImage_Dic.Add(Role.RoleManager.TUKIMIZAKE, roleNameImageList[5]);
            roleNameImage_Dic.Add(Role.RoleManager.HANAMIZAKE, roleNameImageList[6]);
            roleNameImage_Dic.Add(Role.RoleManager.TANE, roleNameImageList[7]);
            roleNameImage_Dic.Add(Role.RoleManager.AKATANZAKU, roleNameImageList[8]);
            roleNameImage_Dic.Add(Role.RoleManager.AOTANZAKU, roleNameImageList[9]);
            roleNameImage_Dic.Add(Role.RoleManager.TANZAKU, roleNameImageList[10]);
            roleNameImage_Dic.Add(Role.RoleManager.KASU, roleNameImageList[11]);

            roleScore_Dic.Add(Role.RoleManager.SANKOU, Role.RoleManager.SCORE_SANKOU);
            roleScore_Dic.Add(Role.RoleManager.YONKOU, Role.RoleManager.SCORE_YONKOU);
            roleScore_Dic.Add(Role.RoleManager.AMEYONKOU, Role.RoleManager.SCORE_AMEYONKOU);
            roleScore_Dic.Add(Role.RoleManager.GOKOU, Role.RoleManager.SCORE_GOKOU);
            roleScore_Dic.Add(Role.RoleManager.INOSHIKATYOU, Role.RoleManager.SCORE_INOSHIKATYOU);
            roleScore_Dic.Add(Role.RoleManager.TUKIMIZAKE, Role.RoleManager.SCORE_TUKIMIZAKE);
            roleScore_Dic.Add(Role.RoleManager.HANAMIZAKE, Role.RoleManager.SCORE_HANAMIZAKE);
            roleScore_Dic.Add(Role.RoleManager.TANE, Role.RoleManager.SCORE_TANE);
            roleScore_Dic.Add(Role.RoleManager.AKATANZAKU, Role.RoleManager.SCORE_AKATANZAKU);
            roleScore_Dic.Add(Role.RoleManager.AOTANZAKU, Role.RoleManager.SCORE_AOTANZAKU);
            roleScore_Dic.Add(Role.RoleManager.TANZAKU, Role.RoleManager.SCORE_TANZAKU);
            roleScore_Dic.Add(Role.RoleManager.KASU, Role.RoleManager.SCORE_KASU);

            arrayRoleType = new string[][] { new string[] { Role.RoleManager.GOKOU, Role.RoleManager.YONKOU, Role.RoleManager.AMEYONKOU, Role.RoleManager.SANKOU },
                                             new string[] { Role.RoleManager.HANAMIZAKE, Role.RoleManager.TUKIMIZAKE, Role.RoleManager.INOSHIKATYOU, Role.RoleManager.TANE },
                                             new string[] { Role.RoleManager.AKATANZAKU, Role.RoleManager.AOTANZAKU, Role.RoleManager.TANZAKU },
                                             new string[] { Role.RoleManager.KASU } };

            //StartCoroutine(WaitNextState(1.0f, STATE.DECK_SHUFLE));
            StartCoroutine(StartGame());
        }
    }