Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - summfire

Pages: [1]
1
Support / Re: How can I tween alpha on tk2dAnimatedSprite
« on: May 27, 2013, 02:56:03 pm »
Thx. I'll try to solve this problem. Will update if I can figure out the actual issue.

2
Support / Re: How can I tween alpha on tk2dAnimatedSprite
« on: May 27, 2013, 02:00:27 pm »
no errors at all. I tried your code as well but still doesn't work. It really annoys me.

I even tried to modified it directly by the method I wrote below

Code: [Select]

       public void SetAlpha(float alpha)
{
Material material = role.GetComponent<Renderer>().material;
Color color = material.GetColor("_Tint");
color.a = alpha;
material.SetColor("_Tint", color);
}

It works perfectly with non animated sprite but not animated one...

3
Support / Re: How can I tween alpha on tk2dAnimatedSprite
« on: May 27, 2013, 12:49:21 pm »
ops, it was set to 1f but I changed it to 1000f since 1f doesn't work I just changed to a random number. I changed it back to 1f but still doesn't work...

Do you know what's wrong with my code? Thx

4
Support / Re: How can I tween alpha on tk2dAnimatedSprite
« on: May 27, 2013, 12:36:27 pm »
tk2dAnimatedSprite sprite = role.GetComponent<tk2dAnimatedSprite>();
HOTween.To(sprite, 1000f, new TweenParms().Prop("color", new Color(sprite.color.r, sprite.color.g, sprite.color.b, 0.0f)));

is this correct? It still doesn't work

5
Support / Re: How can I tween alpha on tk2dAnimatedSprite
« on: May 27, 2013, 12:19:48 pm »
Thanks. I tried to use it but still cannot tween the alpha. Could you give me an examle. I want to tween tk2dAnimatedSprite, not tk2dSprite

6
Support / How can I tween alpha on tk2dAnimatedSprite
« on: May 27, 2013, 11:26:57 am »
Hi,

I tried to tween aplha on a tk2dAnimatedSprite sprite but every time if the frame of the animation changed then it will switched back to 1. Just want to know what is the right way to tween alpha on it.

Thanks a lot

Pages: [1]