Skip to content

Commit

Permalink
NME Preview Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
WispyMouse committed Apr 15, 2022
1 parent 449e51f commit 8d2d9f1
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 8 deletions.
10 changes: 10 additions & 0 deletions Assets/AddressableAssetsData/link.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<linker>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
</linker>
7 changes: 7 additions & 0 deletions Assets/AddressableAssetsData/link.xml.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Assets/DCJam2022/EncounterBattle/Foe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public void SetHighlighted()

public void SetUnhighlighted()
{
if (gameObject == null)
{
return;
}

NMEPreviewInstance.Hide();
HighlightArrow.SetActive(false);
}
Expand Down
8 changes: 3 additions & 5 deletions Assets/DCJam2022/EncounterBattle/FoeSelectionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ void Update()

if (foundFoe == null)
{
if (lastHighlighted != null && lastHighlighted.gameObject != null)
{
lastHighlighted?.SetUnhighlighted();
}

lastHighlighted?.SetUnhighlighted();

lastHighlighted = null;
return;
}
Expand All @@ -44,6 +41,7 @@ void Update()

if (ChosenAction == null)
{
lastHighlighted = foundFoe;
return;
}

Expand Down
2 changes: 1 addition & 1 deletion Assets/DCJam2022/Foes/Circles/Major Issue.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion Assets/DCJam2022/Foes/Pluses/Supply.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 1 addition & 0 deletions Assets/DCJam2022/Moves/MoveTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 9 additions & 1 deletion Assets/DCJam2022/Visual Assets/WarrencrawlBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 8d2d9f1

Please sign in to comment.