Activities/Pilas: Difference between revisions

Tonyforster (talk | contribs)
Tonyforster (talk | contribs)
 
(7 intermediate revisions by the same user not shown)
Line 31: Line 31:
The following Pilas commands can be entered :
The following Pilas commands can be entered :


  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.z = 1                          //depth or drawing order
  mono.rotacion = 40             //rotate 40 degrees
  mono.escala = 2                     //set scale
  mono.rotacion = [360]           // the [] means animate
  mono.rotacion = 40                   //rotate 40 degrees
  mono.x = [-200, 200]           //animate horizontally
  mono.rotacion = [360]               // the [] means animate
  mono.x = [-200, 200] * 5       //go side to side 5 times
  mono.x = [-200, 200]                 //animate horizontally
  mono.x = [-200, 200], 10       //animate over 10 seconds
  mono.x = [-200, 200] * 5             //go side to side 5 times
  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 a monkey instance
  mono = pilas.actores.Mono()         //create a monkey instance
  pilas.iniciar()                 //initialise the game engine
  pilas.iniciar()                     //initialise the game engine
  pilas.iniciar(gravedad=(0, 0)) //initialise and set gravity
  pilas.iniciar(gravedad=(0, 0))       //initialise and set gravity
//with pilas.actores you can create:
//Mono Bomba Pingu Pelota Banana      Monkey Bomb Penguin Ball Banana
//Caja Tortuga Moneda Estrella        Box Turtle Money Star
//Nave Piedra                          Plane Rock
pilas.ejemplos.Piezas ()            //starts a demonstration game


 
There is much more, read the Spanish documentation. [http://www.pilas-engine.com.ar/]
There is much more, read the Spanish. [http://www.pilas-engine.com.ar/]


==Status==
==Status==
Line 97: Line 102:
This is not working, help please!
This is not working, help please!


<s>
Pippy:
Pippy:
  import sys
  import sys
Line 111: Line 117:
In Terminal type  
In Terminal type  
  python myprogram.py
  python myprogram.py
</s>