Messing with patron objects.
This commit is contained in:
parent
f82c126b8a
commit
abf4983ffa
12 changed files with 448 additions and 159 deletions
|
|
@ -31,11 +31,10 @@ public class AnimateSprite : MonoBehaviour {
|
|||
//split into x and y indexes
|
||||
Vector2 offset = new Vector2((float)index / columns - (index / columns), //x index
|
||||
(index / columns) / (float)rows); //y index
|
||||
|
||||
|
||||
renderer.sharedMaterial.SetTextureOffset("_MainTex", offset);
|
||||
|
||||
yield return new WaitForSeconds(1f / framesPerSecond);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue