Example #1
0
    public void Show()
    {
        TweenCanvasAlpha instance = canvas.GetComponent <TweenCanvasAlpha>();
        TweenParameters  t        = new TweenParameters(canvas, from, to, time, delay);

        instance.ObjectiveShow(t);
    }
Example #2
0
    public static void Show(TweenParameters parameters)
    {
        TweenCanvasAlpha instance = parameters.canvas.GetComponent <TweenCanvasAlpha>();

        if (instance == null)
        {
            instance = parameters.canvas.gameObject.AddComponent <TweenCanvasAlpha>();
        }
        instance.ObjectiveShow(parameters);
    }
Example #3
0
    private void ObjectiveShow(TweenParameters parameters)
    {
        StopAllLocalCoroutines();

        canvas = parameters.canvas;
        to     = parameters.to;
        from   = parameters.from;
        time   = parameters.time;
        delay  = parameters.delay;

        StartCoroutine("Tweening");
    }