Saturday, October 2, 2010

It Moves!

I've got the code for animating sprite sheets working. I had made the mistake of setting a variable as a float instead of an integer. In human lingo this mean I was working with a decimal number where I was supposed to use a "whole" number. I took me a while to figure this out, but by now at least I understand the code I borrowed a lot better.

I changed this:
float index = Time.time*fps;
to this:
int index = (int)(Time.time*fps);

Current screenshot of application:


Everything looks a mess. I'm trying to figure out why my graphics gets pixelated now that I've change to Unity3 and while doing so I've piled graphics in different resolutions.

Talking of Unity3 the mysterious icon issue has been fixed and it's now super easy to add an icon picture under the player settings and best of all - it works!

No comments:

Post a Comment