void Update() { if (timeOver) { double elapsedTime = (PhotonNetwork.time - StartTime); remainingTime = SecondsPerTurn - (elapsedTime % SecondsPerTurn); if (joinUser && (remainingTime < 0.02f)) { Debug.Log(" join and time over "); timeUI1.text = "time: 0.00 "; timeOver = false; gameManager.hideExitButton(); if (gameManager.readyP1 == false) { gameManager.randomPos(); gameManager.hideButton(); } return; } if (user2) { if (remainingTime < 0.02f) { Debug.Log(" join and time over 2 "); timeUI2.text = "time: 0.00 "; timeOver = false; gameManager.hideExitButton(); if (gameManager.readyP2 == false) { gameManager.randomPos(); gameManager.hideButton(); } return; } } if (startRoundWhenTimeIsSynced) { this.StartRoundNow(); // the "time is known" check is done inside the method. } countTime = string.Format("time: {0:0.00}", remainingTime); timeUI1.text = countTime; timeUI2.text = countTime; } }
public Vector3 instantiatePos; //생성 포지션 public void clickPosButton() { Debug.Log("click pos button "); gameManager.playerObj.transform.position = instantiatePos; gameManager.hideButton(); gameManager.selectPos(); // gameManager.instantiatePlayer(instantiatePos); // gameManager.initPosition = instantiatePos; }