public void WantUseChangeStone() { if (_GameMng.CanUseChangeStoneCount() > 0 && _SpareStoneCount_Enemy > 0 && _GameMng.IsMyTurn()) { _WantUseChangeStone_AlGame = true; } }
void Update() { if (_GameMng.IsMyTurn()) { _TargetPointer.SetActive(true); } else { _TargetPointer.SetActive(false); } if (Input.GetMouseButton(0)) { Vector2 nowPos = new Vector2(Input.mousePosition.x * (DisplayWidth / Screen.width), Input.mousePosition.y * (DisplayHeight / Screen.height)); if (nowPos.x >= 50.0f && nowPos.x <= 1030.0f && nowPos.y >= 800.0f && nowPos.y <= 1780.0f) { Vector2 newPos = (nowPos - new Vector2(_GameMng._BoardZeroPos.x - 35.0f, _GameMng._BoardZeroPos.y - 35.0f)); _NowTargetPos_X = (int)(newPos.x / (BoardSize / 14)); _NowTargetPos_Y = (int)(newPos.y / (BoardSize / 14)); Debug.Log(_NowTargetPos_X + " : " + _NowTargetPos_Y); } } _TargetPointer.transform.localPosition = new Vector2(_NowTargetPos_X * (BoardSize / 14), _NowTargetPos_Y * (BoardSize / 14)); for (int i = 0; i < 5; i++) { _MySpareStoneImage[i].gameObject.SetActive(false); _EnemySpareStoneImage[i].gameObject.SetActive(false); } for (int i = 0; i < _SpareStoneCount; i++) { _MySpareStoneImage[i].gameObject.SetActive(true); } for (int i = 0; i < _SpareStoneCount_Enemy; i++) { _EnemySpareStoneImage[i].gameObject.SetActive(true); } _UsingStoneChangeGray.SetActive(_GameMng.CanUseChangeStoneCount() == 0 || _SpareStoneCount_Enemy == 0 || _FirstOmGame); _NowUsingStone_Normal.SetActive(!_WantUseChangeStone_OmGame); _NowUsingStone_Change.SetActive(_WantUseChangeStone_OmGame); }