Esempio n. 1
0
    public void GameStart(string color)
    {
        for (int i = 0; i < _Stones.Count; i++)
        {
            _Stones[i].Clean(_SoundMng.isSoundOn());
            _UseStoneNumber = 0;
        }
        _SceneMng.OpenOmGamePopup();
        _SceneMng.CloseAlGamePopup();
        _SceneMng.CloseGameQuitPopup();
        _SceneMng.CloseOptionPopup();
        _SceneMng.CloseLogoutPopup();
        _SceneMng.CloseCreditPopup();
        _IsBlackTurn = true;
        _NowGameOm   = true;
        _GameStarted = true;
        _MustGoLobby = false;
        _TimerOn     = true;
        _ImBlack     = color == "black" ? true : false;
        _OmGameMng.GameStart();

        if (_ImBlack)
        {
            _ChangeStoneCount_My    = 2;
            _ChangeStoneCount_Enemy = 3;
            _MyColorIcon.sprite     = _OmGameMng._SpareStoneImage_Black;
            _EnemyColorIcon.sprite  = _OmGameMng._SpareStoneImage_White;
        }
        else
        {
            _ChangeStoneCount_My    = 3;
            _ChangeStoneCount_Enemy = 2;
            _MyColorIcon.sprite     = _OmGameMng._SpareStoneImage_White;
            _EnemyColorIcon.sprite  = _OmGameMng._SpareStoneImage_Black;
        }



        _OmGameUI.SetActive(true);
        _AlGameUI.SetActive(false);


        _MyTurnTimer = _TurnTime;
        _EnemyTimer  = _TurnTime;
    }