Permalink
Browse files

life.js

  • Loading branch information...
liline committed Dec 1, 2012
1 parent ba84cd1 commit 238c4e5e17727316ca6018140cb2bbc45d4f90c6
Showing with 13 additions and 0 deletions.
  1. +1 −0 index.html
  2. +12 −0 life.js
View
@@ -6,6 +6,7 @@
<script type="text/javascript" src="game.js"></script>
<script type="text/javascript" src="components.js"></script>
<script type="text/javascript" src="js/realDelay.js"></script>
+ <script type="text/javascript" src="life.js"></script>
<title>Forky's Revenge</title>
<style>
View
12 life.js
@@ -0,0 +1,12 @@
+function lifeCounter(){
+
+// HUD
+ lifeCounter = 5;
+ scoreTxt = Crafty.e("LifeCounter, 2D, DOM, Text").attr({x: 650, y: STAGE_HEIGHT-40, w: 300, z:20})
+ .textFont({size: '24px'})
+ .textColor('#000000')
+ .text("x" + lifeCounter);
+ Crafty.e("2D, DOM, Image")
+ .image("imgs/forky_life_little.png")
+ .attr({x: 630, y: STAGE_HEIGHT-60, w:300, z:20});
+}

0 comments on commit 238c4e5

Please sign in to comment.