Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
Basics of game - layout, background image, first variable in js, styles
  • Loading branch information
macieqx committed Feb 26, 2017
1 parent 7191b38 commit 7dcc8de
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
Binary file added img/back.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="style/style.css">
<title> Clicker game </title>
</head>
<body>
<div class="container">
<div class="left-container">
<div class="stats">
</div>
<div class="heroes">
<button id="improve"> Popraw </button>
</div>
</div>
<div class="right-container">
<div class="levels">
</div>
<div class="monsters">
<button id="monster"> Klik </button>
</div>
</div>
</div>
</body>
<script src="js/clicking.js">
</html>
10 changes: 10 additions & 0 deletions js/clicking.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var clickDamage = 1;

var clickCount = 0;

document.querySelector('.monsters').addEventListener("click", Killing);

function Killing() {
clickCount++;
console.log("Dupa");
}
60 changes: 60 additions & 0 deletions style/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
html, body {
max-width: 100vw;
max-height: 100vh;
background: url('../img/back.jpg');
}

.container {
display: flex;
flex-wrap: nowrap;
justify-content: center;
width: 95vw;
height: 92vh;
margin-top: 3vh;
margin-left: 2vw;
margin-right: 2vw;
}

.left-container {
display: flex;
flex-direction: column;
width: 33%;
position: static;
background: rgba(255, 255, 255, 0.3);
}

.right-container {
width: 67%;
display: flex;
flex-direction: column;
position: static;
background: rgba(255, 255, 255, 0.3);
}

.stats {
width: 100%;
height: 20%;
position: relative;
background-color: rgba(165, 42, 44, 0.4);
}

.heroes {
width: 100%;
height: 80%;
position: relative;
background-color: rgba(0, 211, 133, 0.4);
}

.levels {
margin-top: 3%;
width: 100%;
height: 10%;
background-color: rgba(211, 0, 133, 0.4);
}

.monsters {
width: 100%;
height: 80%;
margin-top: 4%;
background-color: rgba(0, 0, 0, 0.4);
}

0 comments on commit 7dcc8de

Please sign in to comment.