Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export function removeHeart(){
// hearts[heartcnt-1].dispose();
hearts[heartcnt-1].alpha=0;
heartcnt--;
if(heartcnt !=0){
StateChange(State.LOSTHEART);//ハートが無くなったらstateを変更
}
if(heartcnt ==0){
StateChange(State.GAMEOVER);
showMessages("You lose. Reload to play again");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment