Skip to content

Commit

Permalink
Cleaning up game
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Thakore committed Jan 13, 2014
1 parent c991ef1 commit 48cbe0b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
15 changes: 11 additions & 4 deletions game.css
@@ -1,14 +1,21 @@
body { body {
background-image: url('img/backgroundGalaxy.jpg'); background-image: url('img/backgroundGalaxy.jpg');
background-size: cover;
font-family: 'Helvetica', sans-serif; font-family: 'Helvetica', sans-serif;
position:absolute; position:absolute;
width:100%;
height:100%;
top:0; top:0;
right:0; right:0;
left:0; left:0;
bottom:0; bottom:0;
overflow: hidden;
}

.close {
position:absolute;
left: 10px;
padding: 2px;
z-index: 10px;
font-family: sans-serif;
color: lime;
} }


#scoreBoard { #scoreBoard {
Expand Down
12 changes: 12 additions & 0 deletions game.html
Expand Up @@ -3,8 +3,20 @@
<head> <head>
<link href="game.css" rel="stylesheet" type="text/css"> <link href="game.css" rel="stylesheet" type="text/css">
<script src="libs/jquery-1.10.2.min.js"> </script> <script src="libs/jquery-1.10.2.min.js"> </script>
<script>
if (require) {
var gui = require('nw.gui');
var win = gui.Window.get();

$(function() {
$closeBtn = $('.close');
$closeBtn.on('click', function () {win.close()});
});
}
</script>
</head> </head>
<body> <body>
<div class="close">X</div>
<div id="scoreBoard"> <div id="scoreBoard">
<div>High Score: <span id="high score">0</span></div> <div>High Score: <span id="high score">0</span></div>
<div>Score: <span id="score">0</span></div> <div>Score: <span id="score">0</span></div>
Expand Down
Binary file modified img/backgroundGalaxy.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions package.json
@@ -0,0 +1,12 @@
{
"name": "Lesson 1! Fight",
"main": "game.html",
"window": {
"frame": false,
"width": 640,
"height": 480,
"toolbar": false,
"position": "center",
"resizable": false
}
}

0 comments on commit 48cbe0b

Please sign in to comment.