Advertisement
otorp2

loop through sprite

May 4th, 2020
918
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let mySprite = sprites.create(img`
  2.     1 . 2 . 3 .
  3.     . . . 1 . .
  4.     1 . 2 . 1 .
  5.     . . . . . .
  6.     1 . 2 . 3 1
  7.     . . . 1 . .
  8. `, SpriteKind.Player)
  9. // mySprite.say("hi", 5000)
  10. let bg = scene.backgroundImage()
  11. bg.drawLine(0, 0, 100, 100, 10)
  12. bg.print("hihi", 100, 100);
  13. for (let sprite of sprites.allOfKind(SpriteKind.Player)) {
  14.     // Replace all pixels with the color 0 (transparent)
  15.     // with 1 (white)
  16.     sprite.image.replace(2, 5)
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement