02-28-2019, 02:41 AM
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.
rotacion y color
|
02-28-2019, 02:41 AM
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.
02-28-2019, 07:22 AM
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
12-25-2021, 06:03 PM
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. |
« Next Oldest | Next Newest »
|