Version - 1 - 1-38
BIN
Version - 25/img/Cat.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Version - 25/img/Click.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Version - 25/img/Dog.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
Version - 25/img/Fox.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
Version - 25/img/Lemons.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Version - 25/img/Lemt3.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
Version - 25/img/Wolf.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
37
Version - 25/index.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>BRB - Clicking</title>
|
||||
|
||||
<!-- By MrEidam && Standa Chlup -->
|
||||
|
||||
|
||||
<!-- Custom Styles -->
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Shop -->
|
||||
<div id="tycoon">
|
||||
<a href="shop.html" id="shop">Go to Shop!</a>
|
||||
</div>
|
||||
|
||||
<!-- Clicks -->
|
||||
<div id="logclick">
|
||||
<p id="disclick">
|
||||
</div>
|
||||
|
||||
<!-- BRB -->
|
||||
<div id="button" onclick="clicking()">
|
||||
<img src = 'https://i.postimg.cc/9Rs0vWFF/Nezm-kl.png' id="unpressed">
|
||||
<img src = "https://i.postimg.cc/NLr5Rrpy/Zm-kl.png" id="pressed">
|
||||
</div>
|
||||
|
||||
<!-- Project -->
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
58
Version - 25/main.js
Normal file
@@ -0,0 +1,58 @@
|
||||
// Items
|
||||
var items
|
||||
|
||||
var anime = false
|
||||
|
||||
function load(){
|
||||
if (localStorage.getItem('items')!=null){
|
||||
items = JSON.parse(localStorage.getItem('items'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function(){
|
||||
load();
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
function beriba(){
|
||||
document.getElementById('unpressed').style.visibility='visible'
|
||||
document.getElementById('pressed').style.visibility='hidden'
|
||||
anime=true;
|
||||
}
|
||||
|
||||
function reset(){
|
||||
items = {
|
||||
clicks:0,
|
||||
dogs:0,
|
||||
cats:0,
|
||||
foxes:0,
|
||||
wolfs:0,
|
||||
lemons:0,
|
||||
lt3:0,
|
||||
}
|
||||
update()
|
||||
}
|
||||
|
||||
// Update
|
||||
function update(){
|
||||
let i = JSON.stringify(items);
|
||||
localStorage.setItem('items', i);
|
||||
document.getElementById('disclick').innerHTML=`You've clicked ${items.clicks} times!`
|
||||
}
|
||||
|
||||
|
||||
// Clicks
|
||||
|
||||
// BRB
|
||||
function clicking(){
|
||||
items.clicks += 1;
|
||||
update();
|
||||
|
||||
document.getElementById('unpressed').style.visibility='hidden'
|
||||
document.getElementById('pressed').style.visibility='visible'
|
||||
anime=false;
|
||||
|
||||
setTimeout(beriba, 75)
|
||||
}
|
||||
147
Version - 25/shop.css
Normal file
@@ -0,0 +1,147 @@
|
||||
body{
|
||||
font-size: 15pt;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* Dog */
|
||||
#logdog{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
top: 90px;
|
||||
}
|
||||
#imgdog{
|
||||
position: absolute;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
#buydog{
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
left: 69px;
|
||||
background-color: darkorange;
|
||||
}
|
||||
#disdog{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
left: 230px;
|
||||
bottom: 2px;
|
||||
margin: 0 0 -10px 0;
|
||||
}
|
||||
|
||||
/* Cats */
|
||||
#logcat{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
top: 140px;
|
||||
}
|
||||
#buycat{
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
left: 69px;
|
||||
background-color: orange;
|
||||
}
|
||||
#discat{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
left: 230px;
|
||||
bottom: 2px;
|
||||
margin: 0 0 -10px 0;
|
||||
}
|
||||
|
||||
/* Foxes */
|
||||
#logfox{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
top: 190px;
|
||||
}
|
||||
#buyfox{
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
left: 69px;
|
||||
background-color: lightsalmon;
|
||||
}
|
||||
#disfox{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
left: 230px;
|
||||
bottom: 2px;
|
||||
margin: 0 0 -10px 0;
|
||||
}
|
||||
|
||||
/* Wolfs */
|
||||
#logwol{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
top: 240px;
|
||||
}
|
||||
#buywol{
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
left: 69px;
|
||||
background-color: lightgray;
|
||||
}
|
||||
#diswol{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
left: 230px;
|
||||
bottom: 2px;
|
||||
margin: 0 0 -10px 0;
|
||||
}
|
||||
|
||||
/* Lemons */
|
||||
#loglem{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
top: 290px;
|
||||
}
|
||||
#buylem{
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
left: 69px;
|
||||
background-color: yellow;
|
||||
}
|
||||
#dislem{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
left: 230px;
|
||||
bottom: 2px;
|
||||
margin: 0 0 -10px 0;
|
||||
}
|
||||
|
||||
/* Lemon trees */
|
||||
#logLt3{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
top: 340px;
|
||||
}
|
||||
#buyLt3{
|
||||
position: absolute;
|
||||
width: 150px;
|
||||
height: 40px;
|
||||
left: 69px;
|
||||
background-color: lightgoldenrodyellow;
|
||||
}
|
||||
#dislt3{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
left: 230px;
|
||||
bottom: 2px;
|
||||
margin: 0 0 -10px 0;
|
||||
}
|
||||
86
Version - 25/shop.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>BRB - Shop</title>
|
||||
|
||||
<!-- By MrEidam & Standa Chlup -->
|
||||
|
||||
|
||||
<!-- Custom Styles -->
|
||||
<link rel="stylesheet" href="shop.css">
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- BRB -->
|
||||
<div>
|
||||
<a href="index.html" id="click.brb">Go to BRB!</a>
|
||||
</div>
|
||||
|
||||
<!-- Clicks -->
|
||||
<div id="logclick">
|
||||
<p id="disclick">
|
||||
</div>
|
||||
|
||||
|
||||
<!-- ITEMS -->
|
||||
|
||||
<!-- Dog -->
|
||||
<div id="logdog">
|
||||
<img src="Dog.png" id="imgdog">
|
||||
<button id="buydog" onclick="buydog()">
|
||||
Buy a Dog for 100 clicks
|
||||
</button>
|
||||
<p id="disdog">
|
||||
</div>
|
||||
|
||||
<!-- Cat -->
|
||||
<div id="logcat">
|
||||
<button id="buycat" onclick="buycat()">
|
||||
Buy a Cat for 10 dogs
|
||||
</button>
|
||||
<p id="discat">
|
||||
</div>
|
||||
|
||||
<!-- lemons -->
|
||||
<div id="loglem">
|
||||
<button id="buylem" onclick="buylem()">
|
||||
Buy a Lemon for ### cats
|
||||
</button>
|
||||
<p id="dislem">
|
||||
</div>
|
||||
|
||||
<!-- Fox -->
|
||||
<div id="logfox">
|
||||
<button id="buyfox" onclick="buyfox()">
|
||||
Buy a Fox for 15 dogs
|
||||
</button>
|
||||
<p id="disfox">
|
||||
</div>
|
||||
|
||||
<!-- Wolf -->
|
||||
<div id="logwol">
|
||||
<button id="buywol" onclick="buywol()">
|
||||
Buy a Wolf for 6 dogs and 5 foxes
|
||||
</button>
|
||||
<p id="diswol">
|
||||
</div>
|
||||
|
||||
<!-- Lemn t3-->
|
||||
<div id="logLt3">
|
||||
<button id="buyLt3" onclick="buylt3()">
|
||||
Buy a Lemon Tree for 5 lemons
|
||||
</button>
|
||||
<p id="dislt3">
|
||||
</div>
|
||||
|
||||
<script src="shop.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
71
Version - 25/shop.js
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
|
||||
|
||||
// Update
|
||||
function update(){
|
||||
let i = JSON.stringify(items);
|
||||
localStorage.setItem('items', i);
|
||||
}
|
||||
|
||||
// Load
|
||||
function load(){
|
||||
items = JSON.parse(localStorage.getItem('items'));
|
||||
document.getElementById('disclick').innerHTML=`You've clicked ${items.clicks} times!`
|
||||
document.getElementById('disdog').innerHTML=`You've got ${items.dogs} dogs!`
|
||||
document.getElementById('discat').innerHTML=`You've got ${items.cats} cats!`
|
||||
document.getElementById('disfox').innerHTML=`You've got ${items.foxes} foxes!`
|
||||
document.getElementById('diswol').innerHTML=`You've got ${items.wolfs} wolfs!`
|
||||
document.getElementById('dislem').innerHTML=`You've got ${items.lemons} lemons!`
|
||||
document.getElementById('dislt3').innerHTML=`You've got ${items.lt3} L. trees!`
|
||||
|
||||
}
|
||||
load();
|
||||
|
||||
function upload(){
|
||||
update();
|
||||
load();
|
||||
}
|
||||
// Nákupy
|
||||
function buydog(){
|
||||
if (items.clicks>=100){
|
||||
items.clicks -= 100;
|
||||
items.dogs += 1;
|
||||
}
|
||||
upload();
|
||||
}
|
||||
function buycat(){
|
||||
if(items.dogs>=10){
|
||||
items.dogs-=10;
|
||||
items.cats+=1;
|
||||
}
|
||||
upload();
|
||||
}
|
||||
function buyfox(){
|
||||
if(items.dogs>=15){
|
||||
items.dogs-=15;
|
||||
items.foxes+=1;
|
||||
}
|
||||
upload();
|
||||
}
|
||||
function buywol(){
|
||||
if(items.dogs>=6 && items.foxes>=5){
|
||||
items.dogs-=6;
|
||||
items.foxes-=5;
|
||||
items.wolfs+=1;
|
||||
}
|
||||
upload();
|
||||
}
|
||||
function buylem(){
|
||||
if(items.cats>=10){
|
||||
items.cats-=10;
|
||||
items.lemons+=1;
|
||||
}
|
||||
upload();
|
||||
}
|
||||
function buylt3(){
|
||||
if (items.lemons>=5) {
|
||||
items.lemons-=5;
|
||||
items.lt3+=1;
|
||||
}
|
||||
upload();
|
||||
}
|
||||
43
Version - 25/style.css
Normal file
@@ -0,0 +1,43 @@
|
||||
body {
|
||||
font-size: 15pt;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#logclick{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
top: 40px;
|
||||
left: 50%;
|
||||
text-align: center;
|
||||
transform: translate(-50%,0);
|
||||
}
|
||||
#disclick{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 25px;
|
||||
transform: translate(0%,0);
|
||||
}
|
||||
|
||||
/*BRB*/
|
||||
#unpressed{
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
border-radius: 150px;
|
||||
}
|
||||
#pressed{
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
visibility: hidden;
|
||||
border-radius: 150px;
|
||||
}
|
||||
#button{
|
||||
user-select: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -150px 0 0 -150px;
|
||||
border-radius: 150px;
|
||||
}
|
||||