From 8d2d9f183c920fdd0165ae14c40c69952ed4f5cc Mon Sep 17 00:00:00 2001 From: Mint Date: Fri, 15 Apr 2022 00:04:23 -0700 Subject: [PATCH] NME Preview Tweak --- Assets/AddressableAssetsData/link.xml | 10 ++++++++++ Assets/AddressableAssetsData/link.xml.meta | 7 +++++++ Assets/DCJam2022/EncounterBattle/Foe.cs | 5 +++++ .../DCJam2022/EncounterBattle/FoeSelectionHandler.cs | 8 +++----- Assets/DCJam2022/Foes/Circles/Major Issue.asset | 2 +- Assets/DCJam2022/Foes/Pluses/Supply.asset | 2 +- Assets/DCJam2022/Moves/MoveTooltip.cs | 1 + Assets/DCJam2022/Visual Assets/WarrencrawlBar.cs | 10 +++++++++- 8 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 Assets/AddressableAssetsData/link.xml create mode 100644 Assets/AddressableAssetsData/link.xml.meta diff --git a/Assets/AddressableAssetsData/link.xml b/Assets/AddressableAssetsData/link.xml new file mode 100644 index 0000000..ba1b24e --- /dev/null +++ b/Assets/AddressableAssetsData/link.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Assets/AddressableAssetsData/link.xml.meta b/Assets/AddressableAssetsData/link.xml.meta new file mode 100644 index 0000000..3eb4888 --- /dev/null +++ b/Assets/AddressableAssetsData/link.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8181378b7d1e64d4295fdce2a6c9b967 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/DCJam2022/EncounterBattle/Foe.cs b/Assets/DCJam2022/EncounterBattle/Foe.cs index 9729274..89728b6 100644 --- a/Assets/DCJam2022/EncounterBattle/Foe.cs +++ b/Assets/DCJam2022/EncounterBattle/Foe.cs @@ -66,6 +66,11 @@ public void SetHighlighted() public void SetUnhighlighted() { + if (gameObject == null) + { + return; + } + NMEPreviewInstance.Hide(); HighlightArrow.SetActive(false); } diff --git a/Assets/DCJam2022/EncounterBattle/FoeSelectionHandler.cs b/Assets/DCJam2022/EncounterBattle/FoeSelectionHandler.cs index 4bff494..38c7b2d 100644 --- a/Assets/DCJam2022/EncounterBattle/FoeSelectionHandler.cs +++ b/Assets/DCJam2022/EncounterBattle/FoeSelectionHandler.cs @@ -30,11 +30,8 @@ void Update() if (foundFoe == null) { - if (lastHighlighted != null && lastHighlighted.gameObject != null) - { - lastHighlighted?.SetUnhighlighted(); - } - + lastHighlighted?.SetUnhighlighted(); + lastHighlighted = null; return; } @@ -44,6 +41,7 @@ void Update() if (ChosenAction == null) { + lastHighlighted = foundFoe; return; } diff --git a/Assets/DCJam2022/Foes/Circles/Major Issue.asset b/Assets/DCJam2022/Foes/Circles/Major Issue.asset index b5ca491..610061d 100644 --- a/Assets/DCJam2022/Foes/Circles/Major Issue.asset +++ b/Assets/DCJam2022/Foes/Circles/Major Issue.asset @@ -17,4 +17,4 @@ MonoBehaviour: Health: 2 AttackPhases: - AppearenceInPhase: {fileID: 21300000, guid: b3d765e425ada6347a87fc3bf0b40e86, type: 3} - UsedMove: {fileID: 0} + UsedMove: {fileID: 11400000, guid: 90bb900dc23034f4fb67a6451d0f4fef, type: 2} diff --git a/Assets/DCJam2022/Foes/Pluses/Supply.asset b/Assets/DCJam2022/Foes/Pluses/Supply.asset index 5c60e34..0c3614b 100644 --- a/Assets/DCJam2022/Foes/Pluses/Supply.asset +++ b/Assets/DCJam2022/Foes/Pluses/Supply.asset @@ -14,7 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: Name: Supply Appearance: {fileID: 21300000, guid: e0155489cab68fc49a0cb50fd4505f7d, type: 3} - Health: 0 + Health: 6 AttackPhases: - AppearenceInPhase: {fileID: 21300000, guid: e0155489cab68fc49a0cb50fd4505f7d, type: 3} UsedMove: {fileID: 11400000, guid: dfc17bbafd395aa46bf592f1b6e5f86b, type: 2} diff --git a/Assets/DCJam2022/Moves/MoveTooltip.cs b/Assets/DCJam2022/Moves/MoveTooltip.cs index fd58909..f4d8c4c 100644 --- a/Assets/DCJam2022/Moves/MoveTooltip.cs +++ b/Assets/DCJam2022/Moves/MoveTooltip.cs @@ -52,6 +52,7 @@ public void Show() if (!nudged && pos.position.x > Screen.width / 2f) { pos.anchoredPosition = pos.anchoredPosition + Vector2.left * 300f; + nudged = true; } Root.SetActive(true); diff --git a/Assets/DCJam2022/Visual Assets/WarrencrawlBar.cs b/Assets/DCJam2022/Visual Assets/WarrencrawlBar.cs index a78ebfe..2d5f7d4 100644 --- a/Assets/DCJam2022/Visual Assets/WarrencrawlBar.cs +++ b/Assets/DCJam2022/Visual Assets/WarrencrawlBar.cs @@ -22,7 +22,15 @@ public virtual void SetValue(int newValue, int maxValue) } BaseSlider.maxValue = maxValue; - Backbar.fillAmount = curValuePointer / maxValue; + + if (maxValue >= 0) + { + Backbar.fillAmount = curValuePointer / maxValue; + } + else + { + Backbar.fillAmount = 1f; + } if (FadingCoroutine != null) {