Skip to content

Commit

Permalink
more on virtualjoystick.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeetienne committed Dec 29, 2011
1 parent 06588aa commit a58d4a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

<link rel='stylesheet' href="css/main.css" />
<link rel='stylesheet' href="css/osd.css" />
<link rel='stylesheet' href="css/virtualjoystick.css" />
<link rel='stylesheet' href="css/pageLandingMain.css" />
<link rel='stylesheet' href="css/embedded.css" />

Expand Down
1 change: 1 addition & 0 deletions js/pageGameLife.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var gameLevel;
var camera, scene, renderer;


//////////////////////////////////////////////////////////////////////////////////
// ctor/dtor //
//////////////////////////////////////////////////////////////////////////////////
Expand Down
7 changes: 3 additions & 4 deletions js/pageGameMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ Marble.PageGameMain = function()
osdLayer = new Marble.OsdLayer();
osdLayer.livesSet( this._playerLives );

if( true || !VirtualJoystick.touchScreenAvailable() ){
var needCanvas = jQuery.url().param('render') ? true : false;
if( needCanvas || VirtualJoystick.touchScreenAvailable() ){
this._virtualJoystick = new VirtualJoystick({
mouseSupport : true
});
});
vJoystick = this._virtualJoystick;
}


this._gameLifeCtor();
}

Marble.PageGameMain.prototype.destroy = function()
{
this._gameLifeDtor();


this._virtualJoystick && this._virtualJoystick.destroy();
this._virtualJoystick = null;
vJoystick = this._virtualJoystick;
Expand Down

0 comments on commit a58d4a3

Please sign in to comment.