From 86a08aaa01ac90dc8541017627065e2b47a46867 Mon Sep 17 00:00:00 2001 From: JevantJedidia <jevantjedidia@gmail.com> Date: Sat, 15 Apr 2023 09:50:51 +0700 Subject: [PATCH] fix pet bought and quest ui on boss fight --- My project/Assets/Scenes/BossFight.unity | 8 ++++---- My project/Assets/Scripts/Controllers/StateController.cs | 6 +++--- My project/Assets/Scripts/Managers/GameOver.cs | 5 +++++ My project/Assets/Scripts/Weapon/Bow.cs | 6 +++--- README.md | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/My project/Assets/Scenes/BossFight.unity b/My project/Assets/Scenes/BossFight.unity index f2a0251..9444186 100644 --- a/My project/Assets/Scenes/BossFight.unity +++ b/My project/Assets/Scenes/BossFight.unity @@ -3411,10 +3411,10 @@ MonoBehaviour: questObjectiveRequirement: 0 reward: 0 questUI: {fileID: 0} - titleText: {fileID: 0} - descText: {fileID: 0} - progressText: {fileID: 0} - rewardText: {fileID: 0} + titleText: {fileID: 1514187214} + descText: {fileID: 1556220132} + progressText: {fileID: 1522039171} + rewardText: {fileID: 1179400701} --- !u!4 &1140854478 Transform: m_ObjectHideFlags: 0 diff --git a/My project/Assets/Scripts/Controllers/StateController.cs b/My project/Assets/Scripts/Controllers/StateController.cs index e10271b..bb22e4d 100644 --- a/My project/Assets/Scripts/Controllers/StateController.cs +++ b/My project/Assets/Scripts/Controllers/StateController.cs @@ -52,9 +52,9 @@ public class StateController : MonoBehaviour ShopController.isShotgunBought = boughtSword; ShopController.isSwordBought = boughtSword; ShopController.isBowBought = boughtBow; - ShopController.isHealerBought = (petTag == 0); - ShopController.isAttackerBought = (petTag == 1); - ShopController.isBuffBought = (petTag == 2); + ShopController.isHealerBought = (petTag == 1); + ShopController.isAttackerBought = (petTag == 2); + ShopController.isBuffBought = (petTag == 0); ShopController.isShotgunUpgraded = (shotGunMultiplier != 1); ShopController.isSwordUpgraded = (swordMultiplier != 1); ShopController.isBowUpgraded = (bowMultiplier != 1); diff --git a/My project/Assets/Scripts/Managers/GameOver.cs b/My project/Assets/Scripts/Managers/GameOver.cs index 9c296cd..4a1bc64 100644 --- a/My project/Assets/Scripts/Managers/GameOver.cs +++ b/My project/Assets/Scripts/Managers/GameOver.cs @@ -36,6 +36,9 @@ public class GameOver : MonoBehaviour } if (restartTimer >= restartDelay) { + QuestManager qman = GameObject.Find("QuestManager").GetComponent<QuestManager>(); + qman.currentQuest = qman.questList[0]; + StateController.reset(); SceneManager.LoadScene(0); } } @@ -53,6 +56,8 @@ public class GameOver : MonoBehaviour if (StateController.slot == "0") { SceneManager.LoadScene(1); + QuestManager qman = GameObject.Find("QuestManager").GetComponent<QuestManager>(); + qman.currentQuest = qman.questList[0]; StateController.reset(); } else diff --git a/My project/Assets/Scripts/Weapon/Bow.cs b/My project/Assets/Scripts/Weapon/Bow.cs index 1fb5946..bf73ca2 100644 --- a/My project/Assets/Scripts/Weapon/Bow.cs +++ b/My project/Assets/Scripts/Weapon/Bow.cs @@ -41,19 +41,19 @@ public class Bow : MonoBehaviour { if(!ShopController.isShopAccessed && !CheatController.isCheatEnabled){ - if (Input.GetMouseButton(0)) + if (Input.GetMouseButton(1)) { chargeSlider.value += Time.deltaTime * 40; } - if (Input.GetMouseButtonDown(0)) + if (Input.GetMouseButtonDown(1)) { bowAudio.Play(); holdDownTime = Time.time; chargeSlider.value += Time.deltaTime; } - if (Input.GetMouseButtonUp(0)) + if (Input.GetMouseButtonUp(1)) { if (reloading || arrow == null) { bowAudio.Stop(); diff --git a/README.md b/README.md index 297f9c9..dcd5a37 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ NIM | Nama | Tugas | Jam Persiapan | Jam Pengerjaan --- | --- | --- | --- | --- 13520021 | Gede Sumerta Yoga | inisialisasi game, pet | | 13520090 | Rahmat Rafid Akbar | Cheat, Main Menu, Game Over, Local Scoreboard, Bug Tester | 10 jam | 24 jam -13520133 | Jevant Jedidia Augustine | Inisialisasi game, story mode, Save & Load | | +13520133 | Jevant Jedidia Augustine | Inisialisasi game, story mode, Save & Load, Integrasi | 10 jam | 36 jam 13520141 | Yoseph Alexander Siregar | Shop, Bonus Upgrade Weapon | 5 jam | 9 jam 13520143 | Muhammad Gerald Akbar Giffera | Weapon, Bonus Upgrade Weapon | | -- GitLab