1.1.0 release! many new features.

This commit is contained in:
msk
2022-01-30 03:16:24 -08:00
parent 1eb6628a37
commit d4c5e84404
22 changed files with 342 additions and 144 deletions
+44 -1
View File
@@ -1,4 +1,5 @@
using UnityEngine;
using HarmonyLib;
using UnityEngine;
using FistVR;
namespace TNHQoLImprovements
@@ -7,6 +8,7 @@ namespace TNHQoLImprovements
{
private GameObject holdCounter;
private GameObject tokenCounter;
private GameObject waveCounter;
public void Start()
{
@@ -14,7 +16,10 @@ namespace TNHQoLImprovements
holdCounter = Instantiate<GameObject>(MeatKitPlugin.bundle.LoadAsset<GameObject>("HoldCounter"), transform);
if (MeatKitPlugin.cfgShowTokens.Value)
tokenCounter = Instantiate<GameObject>(MeatKitPlugin.bundle.LoadAsset<GameObject>("TokenCounter"), transform);
if (MeatKitPlugin.cfgShowWaves.Value)
waveCounter = Instantiate<GameObject>(MeatKitPlugin.bundle.LoadAsset<GameObject>("WaveCounter"), transform);
PlayPos();
}
public void PlayPos()
@@ -24,6 +29,9 @@ namespace TNHQoLImprovements
if (tokenCounter != null)
tokenCounter.transform.localPosition = new Vector3(333, 0, -450);
if (waveCounter != null)
waveCounter.transform.localPosition = new Vector3(333, 0, -450);
}
public void GameOverPos()
@@ -33,6 +41,41 @@ namespace TNHQoLImprovements
if (tokenCounter != null)
tokenCounter.transform.localPosition = new Vector3(250, 0, 0);
if (waveCounter != null)
{
waveCounter.gameObject.GetComponent<RectTransform>().pivot = new Vector2(0.5f, 0);
waveCounter.transform.localPosition = new Vector3(0, 0, 140);
}
}
public void Update()
{
if (InPlay.tnhManager.Phase == TNH_Phase.Dead)
{
if (tokenCounter != null)
tokenCounter.SetActive(true);
return;
}
// we're in a hold; hide token count
if(InPlay.tnhManager.Phase == TNH_Phase.Hold)
{
if (tokenCounter != null)
tokenCounter.SetActive(false);
if (waveCounter != null)
waveCounter.SetActive(true);
}
else // show token count
{
if (tokenCounter != null)
tokenCounter.SetActive(true);
if (waveCounter != null)
waveCounter.SetActive(false);
}
}
}
}