123456789101112131415161718192021222324 |
- # --- Test 24. Use Sprite node. --- #
- import nodesnim
- Window("hello world")
- var
- main = Scene("Main")
- sprite = Sprite()
- icon = load("assets/smile.png", GL_RGBA)
- main.addChild(sprite)
- sprite.move(128, 128) # Move sprite.
- sprite.setTexture(icon) # Change sprite image.
- sprite.centered = true # The default value is true. Try to change it.
- addScene(main)
- setMainScene("Main")
- windowLaunch()
|