I'm learning unityscript for Unity 3D. I'm new to programming (one month old) and I'm building a 2D game that is going pretty good so far.
My code (game not updated in the above example) allows the character to cycle through from shooting position (shown in game) and standing, when the Left-CTRL button is pressed ("Shoot").
I need a Much better method.
How do I program sprite sheets Correctly using unityscript in Unity 3D?
var numFrames : int = 2;
function Update ()
{
if (Input.GetButtonDown ("Shoot"))
{
renderer.material.mainTextureOffset.x += 1.0 / numFrames;
}
}
There's more, but this shows the crummy sprite animation I have conjured up. Please help...