Example #1
0
        public void OnJoinedLobby()
        {
            Debug.Log("OnJoinedLobby");

            var name = PlayerPrefs.GetString(PlayerPrefsKey.PlayerName);
            var id   = PhotonNetwork.AuthValues.UserId;

            PhotonNetwork.playerName = IdentificationNameUtility.Create(name, id);

            StartMatching();
        }
Example #2
0
        public void StartByHost()
        {
            guest = false;

            // TODO:
            var settings = new RoomSettings {
                WinsCount = 2,
                FallSpeed = 1.5f,
            };
            var name = IdentificationNameUtility.Create(PhotonNetwork.playerName, PhotonNetwork.AuthValues.UserId);

            roomManager.CreateRoom(name, settings);

            backButton.Inactive();
            StartCoroutine(AnimationTransit.Out(createRoomTransit, () => {
                waitingManager.gameObject.SetActive(true);
                waitingManager.InMenu(() => backButton.Active());
                gameObject.SetActive(false);
            }));
        }