-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
706d204
commit 33c5cb5
Showing
4 changed files
with
161 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,45 @@ | |
<audio id="splash" preload="auto"> | ||
<source src="./src/audio/start.mp3" type="audio/mp3"> | ||
</audio> | ||
|
||
<!--- | ||
<splash-screen class="d-flex flex-column justify-content-center align-items-center vh-100"> | ||
<img src="https://raw.githubusercontent.com/sebastianjnuwu/app/refs/heads/android/android/app/src/main/res/drawable/splash_screen.png" alt="splash-screen" class="icon mb-5"> | ||
<h1>Click...</h1> | ||
</splash-screen> | ||
</splash-screen> ---> | ||
|
||
<ui style="display: none;" class="d-flex flex-column justify-content-center align-items-center text-center vh-100"> | ||
|
||
<div class="stats-container"> | ||
<table class="stats-table"> | ||
<tbody> | ||
<tr> | ||
<th><i class="fas fa-mouse-pointer"></i> Clicks</th> | ||
<td id="clicks" class="value">0</td> | ||
</tr> | ||
<tr> | ||
<th><i class="fas fa-stopwatch"></i> Seconds</th> | ||
<td id="seconds" class="value">0</td> | ||
</tr> | ||
<tr> | ||
<th><i class="fas fa-cookie-bite"></i> Cookies</th> | ||
<td id="cookies" class="value">0</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
|
||
<cookie class="cookie position-relative"> | ||
<img src="https://cdn.discordapp.com/attachments/1320553436646866994/1322299238599753818/7_Sem_Titulo_20241227172134.png?ex=67705ea1&is=676f0d21&hm=898542885adabfffe794a3e214beb8cd93b865cb4da0aee5280ed894e2481dfe&" | ||
alt="cookie" | ||
class="icon mb-4"> | ||
</cookie> | ||
</ui> | ||
|
||
|
||
|
||
<script src="./src/js/main.js" defer></script> | ||
<script src="./src/js/cookie/game.js" defer></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
$('.cookie').on('click', function (e) { | ||
|
||
const a = 1; | ||
|
||
const $effect = $(`<div class="click-effect">+${a}</div>`); | ||
|
||
const offset = $(this).offset(); | ||
const X = e.pageX - offset.left; | ||
const Y = e.pageY - offset.top; | ||
|
||
$effect.css({ | ||
left: X + 'px', | ||
top: Y + 'px', | ||
position: 'absolute', | ||
}); | ||
|
||
$(this).append($effect); | ||
|
||
$effect | ||
.animate( | ||
{ | ||
top: '-=2.5rem', | ||
opacity: 1, | ||
fontSize: '1.5rem', | ||
}, | ||
300 | ||
) | ||
.animate( | ||
{ | ||
opacity: 0, | ||
}, | ||
200, | ||
function () { | ||
$(this).remove(); | ||
} | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
$(() => { | ||
// Splash screen animation | ||
$("splash-screen").on("click", () => { | ||
$("#splash")[0].play(); | ||
|
||
setTimeout(() => { | ||
$("splash-screen").remove(); | ||
$("ui").show(); | ||
}, 1000); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters