private void Awake() { rend = GetComponent <SpriteRenderer>(); tween = new FloatTween(); tweenTarget = new Crystal.FlashTweenTarget(rend); tween.setRecycleTween(false); }
private void Awake() { rend = GetComponent <SpriteRenderer>(); anim = GetComponent <Animator>(); tween = new FloatTween(); tweenTarget = new FlashTweenTarget(rend); // tween.initialize(tweenTarget, 0f, 1f); // tween.setFrom(1f); tween.setRecycleTween(false); }
private void Awake() { rb2d = GetComponent <Rigidbody2D>(); rend = GetComponent <SpriteRenderer>(); hp = maxHp; tween = new FloatTween(); tweenTarget = new Crystal.FlashTweenTarget(rend); tween.setRecycleTween(false); }
public static FloatTween CreateOneWayTween( SpriteRenderer spriteRenderer, float from, float to, float duration, EaseType easeType = EaseType.QuartIn) { FloatTween tween = new FloatTween(); SpriteFlashTweenTarget tweenTarget = new SpriteFlashTweenTarget(spriteRenderer); tween.setRecycleTween(false); tween.initialize(tweenTarget, to, duration); tween.setFrom(from).setEaseType(easeType); return(tween); }