예제 #1
0
        private IEnumerator DoSolved()
        {
            Solved = true;
            OnSolved?.Invoke();

            yield return(new WaitForSeconds(0.75f));

            CameraController.Instance.ShakeOn();
            Room3FinalLadder.Instance.Move();
            yield return(new WaitForSeconds(Room3FinalLadder.Instance.MoveTime));

            CameraController.Instance.ShakeOff();

            foreach (var character in Characters)
            {
                character.Sleep();
            }

            ScreenFlash.Flash(FlashTime);
            GameController.Instance.MoreColor();
        }
예제 #2
0
        public SharkDto OnKeyPress(string user, string key)
        {
            user ??= "";
            var oldCorrectCharacters = GetCorrectCharactersForUser(user);

            var newCorrectCharacters = GetNewCorrectCharacters(key, oldCorrectCharacters);

            CorrectCharactersByPlayer[user] = newCorrectCharacters;

            var newGroupCorrectCharacters = CorrectCharactersByPlayer.Values.Max();
            var oldGroupCorrectCharacters = SharkDto.CorrectCharacters;

            SharkDto.CorrectCharacters = newGroupCorrectCharacters;
            var sharkChanged = oldGroupCorrectCharacters != newGroupCorrectCharacters;

            if (SharkDto.IsSolved)
            {
                OnSolved?.Invoke(this, _game);
            }

            return(sharkChanged ? SharkDto : null);
        }