Permalink
Browse files

levels refactored

  • Loading branch information...
1 parent 9fc6f90 commit e11dda688e4d0d5719669ec8e372f8cd387f641b @hugeen committed Nov 20, 2012
Showing with 17 additions and 8 deletions.
  1. +14 −6 game/levels.js
  2. +3 −2 game/scenes/level.js
View
@@ -1,10 +1,18 @@
define(function() {
- return [
- { name: "Level 1" },
- { name: "Level 2" },
- { name: "Level 3" },
- { name: "Level 4" }
- ];
+ return [{
+ id: 1,
+ speed: 1,
+ waves: [{
+ "1": "**********p*************************************************",
+ "2": "******p*****************************************************",
+ "3": "*p**********************************************************",
+ "4": "****p*******************************************************",
+ "5": "************************************************************",
+ "6": "************************************************************"
+ }]
+ }, {
+ id: 2
+ }];
});
@@ -1,4 +1,5 @@
define([
+ "underscore",
"jquery",
"crafty",
"burst",
@@ -10,11 +11,11 @@ define([
'text!templates/game_ui/skill.html',
'game/mouse',
'mouseTrap'
-], function($, Crafty, Burst, PlayerEntity, MonsterEntity, keyboard, skills, _skills, _skill, mouse, Mousetrap) {
+], function(_, $, Crafty, Burst, PlayerEntity, MonsterEntity, keyboard, skills, _skills, _skill, mouse, Mousetrap) {
return {
name: "level",
- init: function(options) {
+ init: function(options) {
$("#wrapper").append(_.template(_skills));

0 comments on commit e11dda6

Please sign in to comment.