From 807972024cb2e4c0f2235d7a8941e201ea40ca2c Mon Sep 17 00:00:00 2001 From: Cristiano Magro <cristiano.magro@vola.it> Date: Fri, 27 Dec 2024 00:22:00 +0100 Subject: [PATCH] implement game over by watch --- 04 - monster slayer game/prj-monster-01-starting-setup/index.html | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/04 - monster slayer game/prj-monster-01-starting-setup/index.html b/04 - monster slayer game/prj-monster-01-starting-setup/index.html index 7fb2db8..e521d09 100644 --- a/04 - monster slayer game/prj-monster-01-starting-setup/index.html +++ b/04 - monster slayer game/prj-monster-01-starting-setup/index.html @@ -29,6 +29,12 @@ <div class="healthbar__value" :style="playerBarStyle"></div> </div> </section> + <section class="container" v-if="winner"> + <h2>Game Over!</h2> + <h3 v-if="winner == 'monster'">You lost!</h3> + <h3 v-else-if="winner == 'player'">You won!</h3> + <h3 v-else>It's a Draw</h3> + </section> <section id="controls"> <button @click="attackMonster">ATTACK</button> <button @click="specialAttackMonster" :disabled="mayUseSpecialAttack"> -- Gitblit v1.8.0