Example #1
0
        private void Render(ResultData result)
        {
            var playerIndex = result.CorrectPlayerIndex;
            var player      = PlayerEntity.PlayerList[playerIndex];

            StageResultRenderer.Render(player.NickName, playerIndex, result.IsCorrect);

            // リストに追加する
            foreach (var stageResultListRenderer in StageResultListRendererList)
            {
                stageResultListRenderer.Render(result.Time, result.StageCount);
            }

            // 答えを表示する
            AnswerRenderer.Render(StageEntity.Answer, false);

            // Timelineを再生する
            StageResultTimelineRenderer.Play(result.IsCorrect);

            if (result.IsCorrect)
            {
                EffectCrackerRenderer.Play();
                InfoEntity.Set(Setting.CorrectInfoList.Random());
            }
            else
            {
                InfoEntity.Set(Setting.TimeoutInfoList.Random());
            }
        }
Example #2
0
        private void Render()
        {
            AudioPlayer.Play(AudioType.Main4);

            var totalTime  = ResultEntity.CalcTotalTime();
            var resultRank = ResultRankList.GetResultRankByTime(totalTime);

            ResultTotalTimeRenderer.Set(totalTime);
            ResultRankRenderer.Render(resultRank.Rank, resultRank.Comment);
            InfoEntity.Set("お疲れ様でした! また一緒に遊んでくださいね");
        }
Example #3
0
 private void SetInfo()
 {
     if (PlayerEntity.IsOwner(PhotonNetwork.LocalPlayer))
     {
         InfoEntity.Set($"あなたは「出題者」です 限られた文字で「{StageEntity.Answer}」を表現しましょう");
     }
     else
     {
         InfoEntity.Set($"あなたは「回答者」です 出題者に質問をして「答え」を導きましょう");
     }
 }
Example #4
0
        public void Initialize()
        {
            // 入力
            KeyboardKeyHandlerList.Select(x => x.OnDownAsObservable())
            .Merge()
            .Subscribe(Set)
            .AddTo(Disposable);

            // 送信
            KeyboardSendButtonHandler.OnDownAsObservable()
            .Where(_ => !KeyboardEntity.IsEmpty())
            .Subscribe(_ =>
            {
                switch (MainStateEntity.State)
                {
                case MainState.Wait:
                    Comment();
                    break;

                case MainState.StagePlay:
                    SendChat();
                    break;
                }
            })
            .AddTo(Disposable);

            //  削除
            KeyboardDeleteButtonHandler.OnDownAsObservable()
            .Subscribe(_ => Delete())
            .AddTo(Disposable);

            // Owenrの場合、徐々に文字が増えていく
            TimerEntity.OnUpdateTimerAsObservable()
            .Where(_ => PlayerEntity.IsOwner(PhotonNetwork.LocalPlayer))
            .Where(_ => MainStateEntity.Check(MainState.StagePlay))
            .Subscribe(time =>
            {
                var unlockKey = UnlockKeyList.List.ElementAtOrDefault(KeyboardEntity.UnlockKeyIndex);
                if (unlockKey != null && time >= unlockKey.ThresholdTime)
                {
                    foreach (var i in KeyboardEntity.EnableOwner(unlockKey.Count))
                    {
                        KeyboardKeyRendererList[i].Enable();
                    }

                    KeyboardEntity.IncreaseUnlockKeyIndex();
                    KeyboardListRenderer.PlayEnableSound();
                    InfoEntity.Set($"新しく {unlockKey.Count}文字 追加されました");
                }
            })
            .AddTo(Disposable);
        }
Example #5
0
 private void SetInfo(string text)
 => InfoEntity.Set(text);