public void ShowDialog(Delegates.ShallowDelegate onEnd, params Tuple <string, string>[] dialog) { camera.StartZoomOut(); waitingForCameraOut = true; this.onEnd = onEnd; foreach (Tuple <string, string> entry in dialog) { queue.Enqueue(entry); } }
public static void Consume(Deprimus deprimus, float time, Delegates.ShallowDelegate onTrigger, Delegates.ShallowDelegate onUntrigger) { onTrigger(); if (time != 0f) { effects.Add(new EffectInfo(time, onUntrigger)); } deprimuses.Remove(deprimus); StaticCoroutine.Start(deprimus.FadeOut()); }
void Update() { if (waitingForCameraOut && camera.zoomedOut) { waitingForCameraOut = false; shown = true; canvas.SetActive(true); Next(); } else if (waitingForCameraIn && (!camera.zoomedOut && !camera.isZoomingOut && !camera.isZoomingIn)) { waitingForCameraIn = false; if (onEnd != null) { onEnd(); onEnd = null; } } HandleInput(); }
public EffectInfo(float remaining, Delegates.ShallowDelegate untrigger) { this.remaining = remaining; this.untrigger = untrigger; }
private static IEnumerator FollowPlay(AudioClip clip, Delegates.ShallowDelegate next) { yield return(new WaitForSeconds(clip.length)); next(); }
public static void PlayWith(AudioSource src, Clip clip, Delegates.ShallowDelegate next) { src.PlayOneShot(clips[clip]); StaticCoroutine.Start(FollowPlay(clips[clip], next)); }