public void TakeSelfie(SelfiePlace place) { _place = place; bgRend.sprite = GetRandom.ElementInList(bgSprites); poseRend.sprite = GetRandom.ElementInList(poseSprites); Sequence s = DOTween.Sequence(); s.SetUpdate(true); s.AppendCallback(() => { Time.timeScale = 0; player.GetComponent <Player.PlayerScript>().StopMovement(); player.enabled = false; camSFX.PlaySFX(); PlayerScore.AddScore(score); lowpass.TransitionTo(0.01f); }); s.Append(flash.DOFade(1, flashTime)); s.Append(text.DOFade(0, 0f)); s.AppendCallback(() => selfieUI.Activate()); s.Append(flash.DOFade(0, 0.1f)); s.AppendInterval(waitForInput); s.AppendCallback(() => { player.enabled = true; player.SwitchCurrentActionMap("AfterSelfie"); }); s.Append(text.DOFade(1, textFadeTime)); }
public AudioClip GetClip() { AudioClip cl; if (!useListOfClips) { cl = clip; } else { cl = GetRandom.ElementInList(clips); } return(cl); }