Kaydet (Commit) 30aa7cb7 authored tarafından Tuğba Fıçıcı's avatar Tuğba Fıçıcı

Overlay eklendi

üst ad428aab
......@@ -58,3 +58,25 @@
padding: 10px;
border: 1px solid #aaaaaa;
}
#overlay {
position: fixed;
display: none;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 2;
cursor: pointer;
}
#text{
position: absolute;
top: 50%;
left: 50%;
font-size: 50px;
color: white;
transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
}
\ No newline at end of file
......@@ -10,6 +10,9 @@
<body>
<div class="container">
<div id="overlay" onclick="overlayOff()">
<div id="text">Bitti</div>
</div>
<div id="user1hole7" class="rectangle">hazine</div>
<div class="circle_container">
<div class="circle_wrap">
......
......@@ -116,6 +116,7 @@ function dagit(user,hole){
user2hole[k].value=0;
}
user1hole[6].value += tabladakiBoncuklar;
overlay();
}
//#####################3333
......@@ -189,6 +190,7 @@ function dagit(user,hole){
user1hole[k].value=0;
}
user2hole[6].value += tabladakiBoncuklar;
overlay();
}
}
......@@ -242,6 +244,22 @@ function boncukCiz(){
}
function robotEasy(){
// player 1 i kontrol eden robot
let x = 0;
let holeID = Math.floor(Math.random() * 10) % 6 ;
while(user1hole[holeID] == 0 && x<100){
holeID = Math.floor(Math.random() * 10) % 6 ;
x+=1;
}
return holeID
}
var clicks = 0;
function counterUp() {
clicks += 1;
......@@ -265,4 +283,15 @@ function drop(ev) {
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
counterDown();
}
\ No newline at end of file
}
//overlay ac kapa
function overlay() {
document.getElementById("overlay").style.display = "block";
}
function overlayOff() {
document.getElementById("overlay").style.display = "none";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment