From 8c672a568ad096f28d4c3a2ba95b01ecc30cc3ce Mon Sep 17 00:00:00 2001
From: Cristiano Magro <cristiano.magro@vola.it>
Date: Thu, 26 Dec 2024 23:51:23 +0100
Subject: [PATCH] draw bar healt after attack

---
 04 - monster slayer game/prj-monster-01-starting-setup/app.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/04 - monster slayer game/prj-monster-01-starting-setup/app.js b/04 - monster slayer game/prj-monster-01-starting-setup/app.js
index a617f63..75dc449 100644
--- a/04 - monster slayer game/prj-monster-01-starting-setup/app.js
+++ b/04 - monster slayer game/prj-monster-01-starting-setup/app.js
@@ -10,7 +10,14 @@
       monsterHealth: 100,
     };
   },
-  computed: {},
+  computed: {
+    monsterBarStyle(){
+        return {width: this.monsterHealth + '%'}
+    },
+    playerBarStyle(){
+        return {width: this.playerHealth + '%'}
+    },
+  },
   watch: {},
   methods: {
     attackMonster() {

--
Gitblit v1.8.0