mirror of
https://github.com/MrEidam/PetPet.git
synced 2026-04-17 15:43:31 +00:00
Added baby Shiba + added heal boy function and choice window (needs to be implemented)
This commit is contained in:
BIN
img/gone/shiba.png
Normal file
BIN
img/gone/shiba.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 699 KiB |
BIN
img/shiba/adult.png
Normal file
BIN
img/shiba/adult.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 584 KiB |
BIN
img/shiba/baby.png
Normal file
BIN
img/shiba/baby.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 286 KiB |
BIN
img/shiba/senior.png
Normal file
BIN
img/shiba/senior.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 648 KiB |
BIN
img/shiba/teen.png
Normal file
BIN
img/shiba/teen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 756 KiB |
@@ -9,6 +9,11 @@
|
||||
<title>PetPet</title>
|
||||
</head>
|
||||
<body>
|
||||
<dialog id="chui" open>
|
||||
<p>:OOOO</p>
|
||||
<a href="./Games/" style="color: #fff;text-decoration: none;font-size: 20px;">:0000</a>
|
||||
</dialog>
|
||||
<div id="blurs"></div>
|
||||
<article class="cash">
|
||||
<img src="./img/mone.png" style="height: 1rem;">
|
||||
<p>Money: <span>0</span></p>
|
||||
@@ -34,7 +39,7 @@
|
||||
</article>
|
||||
<article class="item">
|
||||
<p>Health: <span id="heaN"></span></p>
|
||||
<button class="actBTN" onclick="">Heal</button>
|
||||
<button class="actBTN" onclick="healBoy()">Heal</button>
|
||||
</article>
|
||||
</div>
|
||||
<div class="games">
|
||||
|
||||
19
main.js
19
main.js
@@ -24,11 +24,6 @@ const animalImage = {
|
||||
Dead: `./img/dead/${chosenAnimal}.png`,
|
||||
Gone: `./img/gone/${chosenAnimal}.png`
|
||||
}
|
||||
|
||||
////Spring: {},
|
||||
////Summer: {},
|
||||
////Fall: {},
|
||||
////Winter: {},
|
||||
}
|
||||
|
||||
let attributes = {
|
||||
@@ -122,10 +117,10 @@ function toCPercen(varr){
|
||||
}
|
||||
|
||||
function display(){
|
||||
Dage.innerHTML = (attributes.Age.value);
|
||||
Djoy.innerHTML = toCPercen(attributes.Joy);
|
||||
Dfood.innerHTML = toCPercen(attributes.Hunger);
|
||||
Dclean.innerHTML = toCPercen(attributes.Clean);
|
||||
Dage.innerHTML = (attributes.Age.value);
|
||||
Djoy.innerHTML = toCPercen(attributes.Joy);
|
||||
Dfood.innerHTML = toCPercen(attributes.Hunger);
|
||||
Dclean.innerHTML = toCPercen(attributes.Clean);
|
||||
Dhealth.innerHTML = toCPercen(attributes.Hp);
|
||||
|
||||
if(attributes.Age.value<=6){
|
||||
@@ -137,7 +132,7 @@ function display(){
|
||||
}else if(attributes.Age.value<60){
|
||||
NameC.innerHTML = `Adult`;
|
||||
Aimg.src = animalImage.animal.Normal.age[2];
|
||||
}else if(attributes.Age.value<100){
|
||||
}else if(attributes.Age.value<attributes.Age.max){
|
||||
NameC.innerHTML = `Senior`;
|
||||
Aimg.src = animalImage.animal.Normal.age[3];
|
||||
}else{
|
||||
@@ -196,6 +191,10 @@ function clearBoy(){
|
||||
display();
|
||||
}
|
||||
|
||||
function healBoy(){
|
||||
alert('Not enough money!');
|
||||
}
|
||||
|
||||
function hapiHeal(){
|
||||
if( attributes.Hunger.value > (attributes.Hunger.max/100)* 70 && //? Hunger heal
|
||||
attributes.Joy.value > (attributes.Joy.max/100)* 80 && //? Joy heal
|
||||
|
||||
45
style.css
45
style.css
@@ -137,3 +137,48 @@ span p{
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#blurs{
|
||||
z-index: 68;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
#chui{
|
||||
z-index: 69;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
|
||||
padding: 1.5rem;
|
||||
|
||||
border: none;
|
||||
border-radius: 1.5rem;
|
||||
background-color: #333333dd;
|
||||
color: #fff;
|
||||
|
||||
transition: .5s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#chui::backdrop{
|
||||
content: '';
|
||||
position: absolute;
|
||||
background: #3c3;
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
border: red 2px solid;
|
||||
}
|
||||
Reference in New Issue
Block a user