Skip to content

Commit

Permalink
added info about the space bar. no changes to the game.
Browse files Browse the repository at this point in the history
  • Loading branch information
Makay11 committed Apr 22, 2015
1 parent c9f3e2e commit 91f6330
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
6 changes: 5 additions & 1 deletion app/dist/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions app/dist/stylesheets/app.css
Expand Up @@ -7,6 +7,16 @@ canvas {
width: 100%;
height: 100%;
}
.info {
position: absolute;
top: 47%;
width: 100%;
font-size: 30px;
line-height: 50px;
text-align: center;
color: #ff0;
background-color: #000;
}
.hud .energyMeter {
width: 20%;
height: 3%;
Expand Down
3 changes: 2 additions & 1 deletion app/dist/templates/index.html
Expand Up @@ -6,12 +6,13 @@
<link rel="stylesheet" type="text/css" href="/stylesheets/app.css">
</head>
<body>
<h1 class="info">Press space to start/pause/resume/restart.</h1>
<div class="hud">
<div class="energyMeter">
<div class="energy"></div>
</div>
<div class="sequenceOverlay">
<p class="text"> </p>
<p class="text"></p>
</div>
<div class="scores">
<div class="score">
Expand Down
3 changes: 3 additions & 0 deletions app/src/js/GameManager.coffee
Expand Up @@ -94,6 +94,8 @@ class GameManager
else
@paused = not @paused

$(".info").toggle()

if @paused
@music.stop()
if @musicTimeout
Expand Down Expand Up @@ -156,6 +158,7 @@ class GameManager
@paused = true
@gameOver = true
@music?.stop()
$(".info").show()

render: ->
@enemyManager.render(@camera)
Expand Down
10 changes: 10 additions & 0 deletions app/src/stylesheets/app.styl
Expand Up @@ -7,6 +7,16 @@ canvas
width 100%
height 100%

.info
position absolute
top 47%
width 100%
font-size 30px
line-height 50px
text-align center
color yellow
background-color black

.hud
.energyMeter
width 20%
Expand Down
7 changes: 4 additions & 3 deletions app/src/templates/index.jade
Expand Up @@ -8,21 +8,22 @@ html
link(rel="stylesheet" type="text/css" href="/stylesheets/app.css")

body
h1.info Press space to start/pause/resume/restart.

.hud
.energyMeter
.energy

.sequenceOverlay
p.text
p.text

.scores
.score
p.text 0
.monstersKilled
p.text 0
img(src="images/score.png")


script(type="text/javascript" src="/components/jquery/jquery-2.1.3.min.js")

script(type="text/javascript" src="/components/three/three.min.js")
Expand Down

0 comments on commit 91f6330

Please sign in to comment.