Skip to content

Commit

Permalink
blank scene added
Browse files Browse the repository at this point in the history
  • Loading branch information
hugeen committed Oct 17, 2012
1 parent a6547f4 commit c4d3946
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/views/home/show.js
Expand Up @@ -2,12 +2,14 @@ define([
'jQuery',
'Underscore',
'Backbone',
'text!templates/home/show.html'
], function($, _, Backbone, _show) {
'text!templates/home/show.html',
'game/scenes/blank'
], function($, _, Backbone, _show, blankScene) {

var Show = Backbone.View.extend({
el: $("#wrapper"),
render: function() {
blankScene.load();
this.el.html(_show);
}
});
Expand Down
6 changes: 4 additions & 2 deletions app/views/levels/index.js
Expand Up @@ -3,15 +3,17 @@ define([
'Underscore',
'Backbone',
'collections/levels',
'text!templates/levels/index.html'
], function($, _, Backbone, levels, _index) {
'text!templates/levels/index.html',
'game/scenes/blank'
], function($, _, Backbone, levels, _index, blankScene) {

var Index = Backbone.View.extend({
el: $("#wrapper"),
initialize: function() {

},
render: function() {
blankScene.load();
var data = { levels: levels.models, _: _ };
this.el.html(_.template(_index, data));
}
Expand Down
3 changes: 3 additions & 0 deletions app/views/levels/show.js
Expand Up @@ -18,6 +18,9 @@ define([
});
var data = { level: levels.at(parseInt(id,10)-1), _: _ };
this.el.html(_.template(_show, data));
$("#ig_menu button").click(function() {
window.location.replace("#");
});
}
});

Expand Down
17 changes: 17 additions & 0 deletions game/scenes/blank.js
@@ -0,0 +1,17 @@
define([
'jQuery',
'Underscore',
'Backbone',
'Crafty'
], function($, _, Backbone, Crafty, wolf) {

var sceneName = "blank"
Crafty.scene(sceneName, function() {});

return {
load: function() {
Crafty.scene(sceneName)
}
};

});

0 comments on commit c4d3946

Please sign in to comment.