public void OnEndTurn() { if (this.turnManager.Turn < 5) { this.StartCoroutine("ShowResultsBeginNextTurnCoroutine"); } else //競賽結束,顯示本次雙方分數 { GameUiView.SetActive(false); ResultUIView.SetActive(true); PhotonPlayer remote = PhotonNetwork.player.GetNext(); PhotonPlayer local = PhotonNetwork.player; ResultUIView.GetComponentsInChildren <Text>()[1].text = local.GetScore().ToString(); ResultUIView.GetComponentsInChildren <Text>()[3].text = remote.GetScore().ToString(); Debug.Log("Your Score:" + local.GetScore() + " remote's Score: " + remote.GetScore()); } }
public void Construct(IWeaponFactory weaponFactory, GameUIViewFactory gameUiViewFactory, BlockContainer blockContainer, ILevelLoaderService levelLoaderService) { this.levelLoaderService = levelLoaderService; this.blockContainer = blockContainer; ui = gameUiViewFactory.Create(); weaponFactory.Load(); weapon = weaponFactory.Create(); Subscribe(); ConfigureAttacksCount(); SetupUI(); }
void RefreshUIViews() { ConnectUiView.SetActive(!PhotonNetwork.inRoom);//如果還沒進房間則顯示連線畫面 GameUiView.SetActive(PhotonNetwork.inRoom); //cardgroup.SetActive(PhotonNetwork.room != null ? PhotonNetwork.room.PlayerCount > 1 : false);//如果能get房號且房間人數大於1,則button才可互動 }