Permalink
Browse files

game ui initialized

  • Loading branch information...
1 parent dde95e9 commit 427c843e10f1f6c20367e4f141816aaa26c0bdcc @hugeen committed Nov 17, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −3 game/scenes/level.js
  2. +1 −0 templates/game_ui/skill.html
View
7 game/scenes/level.js
@@ -5,12 +5,15 @@ define([
"game/entities/player",
"game/entities/monster",
"game/entities/attack",
-], function($, Crafty, Burst, PlayerEntity, MonsterEntity, AttackEntity) {
+ 'text!templates/game_ui/skill.html'
+], function($, Crafty, Burst, PlayerEntity, MonsterEntity, AttackEntity, _skill) {
return {
name: "level",
init: function(options) {
+ $("#wrapper").html(_.template(_skill));
+
var player = PlayerEntity.create();
var monster = MonsterEntity.create("Octocat", 1);
@@ -26,8 +29,6 @@ define([
attackSkill.bind("SkillTriggered", function() {
AttackEntity.create(player);
});
-
-
},
uninit: function() {
View
1 templates/game_ui/skill.html
@@ -0,0 +1 @@
+<div class="skill"></div>

0 comments on commit 427c843

Please sign in to comment.