mirror of
https://github.com/MrEidam/PetPet.git
synced 2026-04-17 15:43:31 +00:00
Transfer to PC
This commit is contained in:
9
main.js
9
main.js
@@ -44,6 +44,8 @@ function display(){
|
|||||||
}else{
|
}else{
|
||||||
Aimg.src = imgTiger.Dead;
|
Aimg.src = imgTiger.Dead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(hp<=0) Aimg.src = imgTiger.Dead;
|
||||||
}
|
}
|
||||||
|
|
||||||
function play(){
|
function play(){
|
||||||
@@ -83,10 +85,13 @@ function clearBoy(){
|
|||||||
|
|
||||||
function time(){
|
function time(){
|
||||||
setTimeout (() => {
|
setTimeout (() => {
|
||||||
hunger--;
|
if(hunger>0) hunger--;
|
||||||
clean--;
|
clean--;
|
||||||
joy--;
|
joy--;
|
||||||
age+=0.5;
|
if(hp>0) age+=0.5;
|
||||||
|
if(hunger===0) hp--;
|
||||||
|
|
||||||
|
|
||||||
display();
|
display();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user