public void Show() { TweenCanvasAlpha instance = canvas.GetComponent <TweenCanvasAlpha>(); TweenParameters t = new TweenParameters(canvas, from, to, time, delay); instance.ObjectiveShow(t); }
public static void Show(TweenParameters parameters) { TweenCanvasAlpha instance = parameters.canvas.GetComponent <TweenCanvasAlpha>(); if (instance == null) { instance = parameters.canvas.gameObject.AddComponent <TweenCanvasAlpha>(); } instance.ObjectiveShow(parameters); }
private void ObjectiveShow(TweenParameters parameters) { StopAllLocalCoroutines(); canvas = parameters.canvas; to = parameters.to; from = parameters.from; time = parameters.time; delay = parameters.delay; StartCoroutine("Tweening"); }