Exemple #1
0
        void StackFallingLetter()
        {
            if (fallingLetter == null)
            {
                return;
            }

            fallingLetter.GetComponentInChildren <LivingLetterController>().Falling = false;
            fallingLetter.GetComponentInChildren <LivingLetterController>().SetState(LLAnimationStates.LL_idle);

            for (int i = 0; i < stackedLetters.Count; ++i)
            {
                stackedLetters[i].GetComponentInChildren <LivingLetterController>().SetState(LLAnimationStates.LL_still);
            }

            currentHeight += LETTER_HEIGHT;
            stackedLetters.Add(fallingLetter);
            var currentFallingLetter = fallingLetter;

            fallingLetter = null;
            Bounce();

            System.Action callback;
            if (releasedCallbacks.TryGetValue(currentFallingLetter, out callback))
            {
                releasedCallbacks.Remove(currentFallingLetter);
                callback();
            }
        }
Exemple #2
0
        void SpawnLetter(LivingLetterRagdoll letter)
        {
            remainingFallingTime      = fallingTime;
            letter.transform.position = transform.position + fallingSpawnHeight * Vector3.up;
            letter.gameObject.SetActive(true);
            fallingLetter = letter;
            letter.GetComponentInChildren <LivingLetterController>().Falling = true;
            spawnTimer = 0;

            ToboganConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.UIPopup);
        }