Differences

This shows you the differences between the selected revision and the current
version of the page.


es:kbase:inside_the_brain_and_body_of_your_game 2010/03/18 16:09 es:kbase:inside_the_brain_and_body_of_your_game 2010/03/18 21:38 current
Line 232: Line 232:
Como puedes ver, funciona igual que la ventana del Menú Principal. Si seleccionamos Si, xResult se marca como True y llama a **Game.QuitGame();**. No es física cuántica. Como puedes ver, funciona igual que la ventana del Menú Principal. Si seleccionamos Si, xResult se marca como True y llama a **Game.QuitGame();**. No es física cuántica.
---- ----
-Ok... Still don't have enough? In the second part of this tutorial we will have a look at **game_daemon.script** file. +Bien... ¿todavía no tenéis suficiente? En la segunda parte de este tutorial vamos a echarle un vistazo al archivo **game_daemon.script**.
-You can see that after some declaration it starts with infinite loop. It means that it will just go and on until the game is ended or you Detach the script. Funny part about infinite loops is, that you should end them with some little **Sleep();** or it will take the whole control over the game end results in freezing. Not nice experience... +Puedes comprobar que, después de algunas declaraciones, comienza un bucle infinito. Eso quiere decir que se ejecutará hasta que el juego acabe o se desvincule el script. La parte más divertida de los bucles infinitos es que debes detenerlos con la instrucción **Sleep();** o tomarán el control del juego que se acabará colgando. No es una experiencia agradable...
<code script> <code script>
Line 260: Line 260:
</code> </code>
-First portion of the daemon handles with the Captions when you hover with a mouse over some defined regions with no inventory item attached. It positions it, assign a caption according to caption defined in Scene Edit, scales it and prepares it. +La primera parte del código controla los rótulos que aparecen cuando pasas el ratón sobre algunas regiones sin tener seleccionado un objeto del inventario. Se posiciona, asigna el rótulo que esté definido en Scene Edit, lo escala y lo prepara.
<code script> <code script>
Line 278: Line 278:
</code> </code>
-If you on the other hand have some item assigned, the caption is prepared in a manner of **Use knife with apple**. Again it is pretty obvious from the code itself. Common denominator is that Caption is displayed and gets focus. If we are over empty space with no inventory item in hand we hide the caption with **WinCaption.Visible = false;**. So much for captions.+Si, por otro lado, tienes un objeto asignado, el rótulo es preparado de la siguiente manera: **Usar cuchillo con manzana**. De nuevo, el código es bastante explicativo. El común denominador es que el rótulo es mostrado y consigue el foco. Si estamos sobre un lugar vacío y no tenemos un objeto de inventario en la mano, ocultamos el rótulo con la instrucción **WinCaption.Visible = false;**. Ya es bastante para los rótulos.
-Last portion of the daemon is to handle the inventory behavior. +La última parte controla el inventario.
<code script> <code script>
Line 289: Line 289:
</code> </code>
-If we position mouse into upper part of the screen, we show the inventory (provided the game is in interactive mode, main menu is not visible, and we are not in dialogue mode). When we get out of the inventory box or we are in the dialogue mode or game is not interactive, we hide it. It's a bit crude and you should look at **faq** on some inventory handling tips. +Si movemos el ratón a la parte superior de la pantalla, mostramos el inventario (mientras el juego no esté en modo interactivo, el menú principal no sea visible y no estemos en modo diálogo). Cuando salimos del inventario, entramos en modo diálogo o el juego no es interactivo, lo ocultamos. Es un poco lioso y deberías mirar en [[es:FAQ|Preguntas y respuestas]] para conocer algunos trucos al manejar el inventario.
-Lastly the aformentioned Sleep is issued and we are set.+Finalmente, ejecutamos la instrucción Sleep que mencionamos antes.
-That concludes it for this tutorial and I hope you'll find it at least a bit useful.+El tutorial finaliza aquí y espero que lo encuentres útil.
 
es/kbase/inside_the_brain_and_body_of_your_game.1268924989.txt.gz · Last modified: 2010/03/18 16:09 by saboteur
Recent changes RSS feed Creative Commons License Driven by DokuWiki