public void Initialize() { localMap = p2Map.Instance; globalScene = p2Scene.Instance; gui = p2Gui.Instance; ResetBasic(); ZeroBonus(); var host = localMap[0, 0]; var client = localMap[localMap.total_x - 1, 0]; state = TurnState.NetWait; if (PhotonNetwork.isMasterClient) { turn_identity = photonView.isMine ? 0 : 1; currentCell = photonView.isMine ? host : client; transform.rotation = photonView.isMine ? q01 : q0_1; } else { turn_identity = photonView.isMine ? 1 : 0; currentCell = photonView.isMine ? client : host; transform.rotation = photonView.isMine ? q0_1 : q01; } currentCell.OnPlayerMoveIn(this); }
void Start() { localMap = p2Map.Instance; gui = p2Gui.Instance; globalScene = p2Scene.Instance; TouchInput.Instance.gameObject.SetActive(false); }