Bug fix for iOS support (tested on iPad 17FPS and iPhone 3GS 29FPS)

This commit is contained in:
Guillaume DE LA RUE 2011-02-13 13:52:18 +01:00
parent 28e7b63568
commit 24ca06af50
4 changed files with 18 additions and 15 deletions

View file

@ -71,7 +71,7 @@
<!-- The footer... -->
<footer id="credits" class="">
<strong>HTML5 Game Jam 2011</strong><br>
<strong><a href="https://github.com/glenux/wyrian" target="_blank" title="View Project on GitHub" class="game">..:: Wyrian v<span id="version">0.2a</span> ::..</a></strong> | <a href="http://www.html5place.com/" title="View my Website" class="author">Guillaume DE LA RUE</a><br>Thanks to <a href="https://github.com/glenux" target="_blank" title="View profile of Glenux on GitHub" class="quote">Glenux</a> for design and Matthieu Bosquet<br>And everyone present at the HTML5 Game Jam :)
<strong><a href="https://github.com/glenux/wyrian" target="_blank" title="View Project on GitHub" class="game">..:: Wyrian v<span id="version">0.2b</span> ::..</a></strong> | <a href="http://www.html5place.com/" title="View my Website" class="author">Guillaume DE LA RUE</a><br>Thanks to <a href="https://github.com/glenux" target="_blank" title="View profile of Glenux on GitHub" class="quote">Glenux</a> for design and Matthieu Bosquet<br>And everyone present at the HTML5 Game Jam :)
</footer>
<!-- Main JS Libs -->

View file

@ -40,7 +40,7 @@ app.prototype.init = function() {
require({
baseUrl: "js/",
urlArgs: "bust=" + self.version
urlArgs: "bust=" + GameVersion
},
// -- Layout to load
@ -81,12 +81,14 @@ app.prototype.loopAnimation = function() {
// -- Create ennemies if needed
var numEnnemies = 0 ;
for ( var i in Layouts.Ennemies.els ) {
var _el = Layouts.Ennemies.els[i] ;
if ( ! _el.deleteAfter ) numEnnemies++ ;
}
for ( var i = numEnnemies-1 ; i < Level + 3 ; i++ ) {
Layouts.Ennemies.createRandom() ;
if ( Layouts.Ennemies ) {
for ( var i in Layouts.Ennemies.els ) {
var _el = Layouts.Ennemies.els[i] ;
if ( ! _el.deleteAfter ) numEnnemies++ ;
}
for ( var i = numEnnemies-1 ; i < Level + 3 ; i++ ) {
Layouts.Ennemies.createRandom() ;
}
}
// -- Init loops counter

View file

@ -95,8 +95,8 @@ Layout.prototype.createObj = function(opts) {
if ( ! this.box.length ) {
this.box = $('<div>', {
class:'sprite '+this.name,
id: this.id
'class':'sprite '+this.name,
'id': this.id
}) ;
this.cssObj = {

View file

@ -5,7 +5,8 @@ var Game = new app({
'order!layouts/Ennemies'
],
'wrapper': $('#GameContainer')
}) ;
}),
GameVersion = 0 ;
// Init Application and bind all games events
jQuery(document).ready(function() {
@ -13,11 +14,11 @@ jQuery(document).ready(function() {
/**************************************************************************
* Load Dependencies & Create Application
***************************************************************************/
GameVersion = $('#version').html() ;
var baseLibs = [
'order!libs/jquery.transform-0.9.3.min',
'order!layouts/LayoutClass'
],
GameVersion = $('#version').html() ;
] ;
require({
baseUrl: "js/",