void StackFallingLetter() { if (fallingLetter == null) { return; } fallingLetter.GetComponentInChildren <LetterObjectView>().Falling = false; fallingLetter.GetComponentInChildren <LetterObjectView>().SetState(LLAnimationStates.LL_idle); for (int i = 0; i < stackedLetters.Count; ++i) { stackedLetters[i].GetComponentInChildren <LetterObjectView>().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(); } }
void SpawnLetter(LivingLetterRagdoll letter) { remainingFallingTime = fallingTime; letter.transform.position = transform.position + fallingSpawnHeight * Vector3.up; letter.gameObject.SetActive(true); fallingLetter = letter; letter.GetComponentInChildren <LetterObjectView>().Falling = true; spawnTimer = 0; EA4S.Tobogan.ToboganConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.UIPopup); }