Line 66: |
Line 66: |
| | | |
| ==Getting Started== | | ==Getting Started== |
− | The Activity starts with a monkey(mono) preloaded in the upper pane and a lower pane that executes Python code in immediate mode | + | The Activity starts with the game engine initialised and a monkey (mono) preloaded. The monkey is displayed in the upper pane and the lower pane executes Python code in immediate mode |
| | | |
| [[File:Pilas xo.png|center|300px]] | | [[File:Pilas xo.png|center|300px]] |
Line 72: |
Line 72: |
| The following commands can be entered (from the Spanish documentation [http://readthedocs.org/docs/pilas/en/latest/empezando.html]) | | The following commands can be entered (from the Spanish documentation [http://readthedocs.org/docs/pilas/en/latest/empezando.html]) |
| | | |
− | mono.sonreir() //monkey smile | + | mono.sonreir() //monkey smile |
− | mono.gritar() //monkey shout | + | mono.gritar() //monkey shout |
− | mono.decir("Hello World!") | + | mono.decir("Hello World!") |
| mono.x = 100 | | mono.x = 100 |
| mono.y = 100 | | mono.y = 100 |
− | mono.escala = 2 //set scale | + | mono.escala = 2 //set scale |
− | mono.rotacion = 40 //rotate 40 degrees | + | mono.rotacion = 40 //rotate 40 degrees |
− | mono.rotacion = [360] // the [] means animate | + | mono.rotacion = [360] // the [] means animate |
− | mono.x = [-200, 200] //animate horizontally | + | mono.x = [-200, 200] //animate horizontally |
− | mono.x = [-200, 200] * 5 //go side to side 5 times | + | mono.x = [-200, 200] * 5 //go side to side 5 times |
− | mono.x = [-200, 200], 10 //animate over 10 seconds | + | mono.x = [-200, 200], 10 //animate over 10 seconds |
| help(mono) | | help(mono) |
− | pilas.ver(mono) //view source | + | pilas.ver(mono) //view source |
− | mono.eliminar() //delete monkey | + | mono.eliminar() //delete monkey |
− | mono = pilas.actores.Mono() //create monkey | + | mono = pilas.actores.Mono() //create a monkey instance |
| + | pilas.iniciar() //initialise the game engine |
| + | pilas.iniciar(gravedad=(0, 0)) //initialise and set gravity |
| + | |
| | | |
| There is much more, read the Spanish. [http://www.pilas-engine.com.ar/] | | There is much more, read the Spanish. [http://www.pilas-engine.com.ar/] |