Advertisement
Guest User

Stencyl Motion

a guest
Mar 29th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.34 KB | None | 0 0
  1.  
  2. /* ======================== When Updating ========================= */
  3. addWhenUpdatedListener(null, function(elapsedTime:Float, list:Array<Dynamic>):Void
  4. {
  5.     if(wrapper.enabled)
  6.     {
  7.         actor.setXVelocity(0);
  8.         if(isKeyDown("right"))
  9.         {
  10.             actor.setXVelocity(20);
  11.         }
  12.         else if(isKeyDown("left"))
  13.         {
  14.             actor.setXVelocity(-20);
  15.         }
  16.     }
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement