public void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == Constants.TAG_POKEBALL) { if (tag == Constants.CORRECT_LETTER_TAG) { GameState.instance.OnCorrectLetterHit(this); ThrowBallsConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.Poof); } else { if (ThrowBallsGame.instance.GameState.isRoundOngoing) { letterObjectView.DoTwirl(null); BallController.instance.OnRebounded(); } } } }
void Update() { letter.HasFear = fear; letter.SetWalkingSpeed(walkSpeed); letter.SetDancingSpeed(danceSpeed); if (doTransition) { doTransition = false; letter.SetState(targetState); } if (doHooray) { doHooray = false; letter.DoHorray(); } if (doAngry) { doAngry = false; letter.DoAngry(); } if (doHighFive) { doHighFive = false; letter.DoHighFive(); } if (onJumpStart) { onJumpStart = false; letter.OnJumpStart(); } if (onJumpMiddle) { onJumpMiddle = false; letter.OnJumpMaximumHeightReached(); } if (onJumpEnd) { onJumpEnd = false; letter.OnJumpEnded(); } if (doSmallJump) { doSmallJump = false; letter.DoSmallJump(); } if (doDanceWin) { doDanceWin = false; letter.DoDancingWin(); } if (doDanceLose) { doDanceLose = false; letter.DoDancingLose(); } if (doTwirl) { doTwirl = false; letter.DoTwirl(() => { Debug.Log("BACK!"); }); } if (doToggleDance) { doToggleDance = false; letter.ToggleDance(); } }