Ejemplo n.º 1
0
    private void Awake()
    {
        rend = GetComponent <SpriteRenderer>();

        tween       = new FloatTween();
        tweenTarget = new Crystal.FlashTweenTarget(rend);
        tween.setRecycleTween(false);
    }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
    private void Awake()
    {
        rb2d = GetComponent <Rigidbody2D>();
        rend = GetComponent <SpriteRenderer>();
        hp   = maxHp;

        tween       = new FloatTween();
        tweenTarget = new Crystal.FlashTweenTarget(rend);
        tween.setRecycleTween(false);
    }
Ejemplo n.º 4
0
    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);
    }