In this article, I will teach you to add the game engine object to your project.
First, you need a project as this :
Then, create a game view object with : app.CreateGameView( width, height );
So we have : gv = app.CreateGameView( 1, 1 );
Next, create a script file called : 'game' with this button :
First, you need a project as this :
So we have : gv = app.CreateGameView( 1, 1 );
Next, create a script file called : 'game' with this button :
After, that you clicked you obtain this :
Return on your main project file by clicking on 'game.js'
Add under gv = app.CreateGameView( 1, 1 ); : gv.SetFile( "game.js" ); for set the game file to the game view. Add also gv.SetFrameRate( 60 ); And add lay.AddChild( gv ); for add game view to the layout.
Then return in your game.js, and add two function : 'OnLoad' and 'OnReady'.
In the next post, I will learn you how create a scene with background and sprites ;-)
Nice, nice, nice. Please keep on and thanks.
ReplyDeleteYes :)
DeleteThis is when I am checking out your tutorial but I can say I already like it.... It's so incredible.
ReplyDeleteKeep up the good work! ��
Obrigado amigo muito obrigado
ReplyDeleteAdb
ReplyDeleteBlock it
ReplyDelete