예제 #1
0
    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);
        }
    }
예제 #2
0
    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());
    }
예제 #3
0
    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();
    }
예제 #4
0
 public EffectInfo(float remaining, Delegates.ShallowDelegate untrigger)
 {
     this.remaining = remaining; this.untrigger = untrigger;
 }
예제 #5
0
파일: SoundManager.cs 프로젝트: deprimus/D1
    private static IEnumerator FollowPlay(AudioClip clip, Delegates.ShallowDelegate next)
    {
        yield return(new WaitForSeconds(clip.length));

        next();
    }
예제 #6
0
파일: SoundManager.cs 프로젝트: deprimus/D1
    public static void PlayWith(AudioSource src, Clip clip, Delegates.ShallowDelegate next)
    {
        src.PlayOneShot(clips[clip]);

        StaticCoroutine.Start(FollowPlay(clips[clip], next));
    }