Пример #1
0
        private IEnumerator successMatching()
        {
            Debug.Log(@"Found the other player. Will begin transit to network battle scene, Wait a moment...");

            foundOpponent = true;

            messageLabel.text         = string.Format("対戦相手が見つかりました!\n<size=25>あなたは<size=40>{0}</size>です</size>", PhotonNetwork.player.ID == 1 ? "<color=red>1P</color>" : "<color=blue>2P</color>");
            statusLabel.text          = @"あいて: " + IdentificationNameUtility.ParseName(PhotonNetwork.otherPlayers[0].NickName);
            cancelButton.interactable = false;

            PhotonNetwork.room.IsOpen           = false;
            PhotonNetwork.isMessageQueueRunning = false;

            updateStartingCounter(3);
            yield return(new WaitForSeconds(1.0f));

            updateStartingCounter(2);
            yield return(new WaitForSeconds(1.0f));

            updateStartingCounter(1);
            yield return(new WaitForSeconds(1.0f));

            updateStartingCounter(0);

            SceneController.Instance.LoadScene(SceneName.NetworkBattle, 0.4f);
        }
Пример #2
0
        protected override void Awake()
        {
            base.Awake();

            photonView = GetComponent <PhotonView>();
            groupManager.MinoDeleted += onMinoDeleted;

            director.PlayerNameLabel.text   = IdentificationNameUtility.ParseName(PhotonNetwork.player.NickName);
            director.OpponentNameLabel.text = IdentificationNameUtility.ParseName(PhotonNetwork.otherPlayers[0].NickName);
            director.PlayerYouLabel.enabled = true;
        }
Пример #3
0
        public void Set(RoomEntry entry)
        {
            if (entry == null)
            {
                Clear();
                return;
            }

            opponentName.text = IdentificationNameUtility.ParseName(entry.RoomName);
            winsCount.text    = $"{entry.Settings.WinsCount}";
            fallSpeed.text    = $"{entry.Settings.FallSpeed} m/s";
        }
Пример #4
0
        protected override void OnSceneReady(object sender, EventArgs args)
        {
            minoManager.HitMino      += onHitMino;
            groupManager.MinoDeleted += onMinoDeleted;

            director.PlayerNameLabel.text   = IdentificationNameUtility.ParseName(PhotonNetwork.player.NickName);
            director.OpponentNameLabel.text = IdentificationNameUtility.ParseName(PhotonNetwork.otherPlayers[0].NickName);
            director.PlayerYouLabel.enabled = true;

            StartCoroutine(updateAndSendPing());

            ready();
        }
Пример #5
0
        protected override void OnSceneReady(object sender, EventArgs args)
        {
            this.PlayerMode   = (GameMode)PhotonNetwork.player.CustomProperties["mode"];
            this.OpponentMode = (GameMode)PhotonNetwork.otherPlayers[0].CustomProperties["mode"];

            perspectives.Activate(PlayerSide.Player, PlayerMode);
            perspectives.Activate(PlayerSide.Opponent, OpponentMode);

            directorManager.SetMode(PlayerMode);
            director             = directorManager.GetDirector();
            director.OnGameOver += onGameOver;
            director.Initialize();

            ui.PlayerNameLabel.text   = IdentificationNameUtility.ParseName(PhotonNetwork.player.NickName);
            ui.OpponentNameLabel.text = IdentificationNameUtility.ParseName(PhotonNetwork.otherPlayers[0].NickName);

            StartCoroutine(updateAndSendPing());

            ready();
        }
Пример #6
0
        private IEnumerator successMatching()
        {
            Debug.Log(@"Found the other player. Will begin transit to network battle scene, Wait a moment...");

            foundOpponent             = true;
            messageLabel.text         = @"対戦相手が見つかりました!";
            statusLabel.text          = @"あいて: " + IdentificationNameUtility.ParseName(PhotonNetwork.otherPlayers[0].NickName);
            cancelButton.interactable = false;
            PhotonNetwork.room.IsOpen = false;

            updateStartingCounter(3);
            yield return(new WaitForSeconds(1.0f));

            updateStartingCounter(2);
            yield return(new WaitForSeconds(1.0f));

            updateStartingCounter(1);
            yield return(new WaitForSeconds(1.0f));

            updateStartingCounter(0);

            SceneController.Instance.LoadScene(SceneName.NetworkBattle, 0.4f);
        }
Пример #7
0
 private void updateView()
 {
     GetComponentInChildren <Text>().text = IdentificationNameUtility.ParseName(RoomName);
 }