Tilengine - The 2D retro graphics engine forum

Full Version: rotacion y color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Quiero rotar el sprite y cambiar su color,pero no encuentro ninguna funcion,dime que funcion se encarga de esto en la version de python.
Hola!

Para cambiar de color un sprite cambias su paleta con el método Sprite.set_palette().
https://github.com/megamarc/TilenginePyt...er.py#L347

Rotaciónde sprites no hay (sólo escalado), lo que hay es animación de ciclo de colores, que puedes establecer con Animation.set_palette_animation().
https://github.com/megamarc/PyTilengine/...mer.py#L71
Python is a programming language that is used for many purposes, including web development. It is easy for beginners to learn and use because of its simple syntax. If you're looking for a way to create animations in Python, this tutorial will show you how to rotate a sprite and change its color. In this article, I will show you how to make your own rotating animation using the tkinter module in Python. tunnel rush
The steps are as follows:
1. Import the tkinter module
2. Make a window with a frame and label it "My Frame"
3. Create a new window called "My Window"
4. Create an empty canvas object and give it the dimensions of 640 x 480 pixels
5. Set the background color of "My Window" as white
6. Add an event listener for when users click on the canvas
7. Create an instance of "Sprite1" with the coordinates (0,0) set in your window's coordinate system.