Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. // -----JS CODE-----
  2.  
  3.  
  4. //Creates an input we can connect our sprite to and access using script.componentName
  5. // @input Component.SpriteVisual spriteVisual
  6.  
  7.  
  8. //Sets the display property of the sprite to true so we can see it
  9. script.spriteVisual.enabled = true;
  10.  
  11.  
  12. //loops defines how many times the animation will play, set to -1 to play continuously
  13. var loops = 1;
  14. var offset = 0;
  15.  
  16. script.spriteVisual.getMaterial(0).getPass(0).baseTex.control.play(loops, offset);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement