Tilengine - The 2D retro graphics engine forum
rotacion y color - Printable Version

+- Tilengine - The 2D retro graphics engine forum (http://tilengine.org/forum)
+-- Forum: Foros en español (http://tilengine.org/forum/forumdisplay.php?fid=5)
+--- Forum: Soporte (http://tilengine.org/forum/forumdisplay.php?fid=8)
+--- Thread: rotacion y color (/showthread.php?tid=252)



rotacion y color - Hokuto40 - 02-28-2019

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.


RE: rotacion y color - megamarc - 02-28-2019

Hola!

Para cambiar de color un sprite cambias su paleta con el método Sprite.set_palette().
https://github.com/megamarc/TilenginePythonPlatformer/blob/master/platformer.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/blob/master/samples/platformer.py#L71


RE: rotacion y color - dariasmith - 12-25-2021

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.