mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-02 20:24:26 -07:00
implement stats tilt
encompasses releases 1.1.2 and 1.1.3
This commit is contained in:
@@ -24,23 +24,34 @@ namespace TNHQoLImprovements
|
||||
|
||||
public void PlayPos()
|
||||
{
|
||||
transform.localPosition = new Vector3(0, 0, -1.2f);
|
||||
if (holdCounter != null)
|
||||
holdCounter.transform.localPosition = new Vector3(-333, 0, -450);
|
||||
holdCounter.transform.localPosition = new Vector3(-333, 0, 0);
|
||||
|
||||
if (tokenCounter != null)
|
||||
tokenCounter.transform.localPosition = new Vector3(333, 0, -450);
|
||||
tokenCounter.transform.localPosition = new Vector3(333, 0, 0);
|
||||
|
||||
if (waveCounter != null)
|
||||
waveCounter.transform.localPosition = new Vector3(333, 0, -450);
|
||||
waveCounter.transform.localPosition = new Vector3(333, 0, 0);
|
||||
}
|
||||
|
||||
public void GameOverPos()
|
||||
{
|
||||
transform.localScale = new Vector3(.0002f, .0002f, .0002f);
|
||||
transform.localPosition = Vector3.zero;
|
||||
transform.localRotation = Quaternion.identity;
|
||||
|
||||
if (holdCounter != null)
|
||||
{
|
||||
holdCounter.gameObject.GetComponent<RectTransform>().pivot = new Vector2(1, 1);
|
||||
holdCounter.transform.localPosition = new Vector3(-250, 0, 0);
|
||||
}
|
||||
|
||||
if (tokenCounter != null)
|
||||
{
|
||||
tokenCounter.gameObject.GetComponent<RectTransform>().pivot = new Vector2(0, 1);
|
||||
tokenCounter.transform.localPosition = new Vector3(250, 0, 0);
|
||||
}
|
||||
|
||||
if (waveCounter != null)
|
||||
{
|
||||
@@ -51,7 +62,8 @@ namespace TNHQoLImprovements
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (InPlay.tnhManager.Phase == TNH_Phase.Dead)
|
||||
// game over area; do not update anything else
|
||||
if (InPlay.tnhManager.Phase == TNH_Phase.Dead || InPlay.tnhManager.Phase == TNH_Phase.Completed)
|
||||
{
|
||||
if (tokenCounter != null)
|
||||
tokenCounter.SetActive(true);
|
||||
@@ -59,8 +71,19 @@ namespace TNHQoLImprovements
|
||||
return;
|
||||
}
|
||||
|
||||
// we're in a hold; hide token count
|
||||
if(InPlay.tnhManager.Phase == TNH_Phase.Hold)
|
||||
// TNHInfo rotate to player camera
|
||||
if (MeatKitPlugin.cfgInfoFollowCamera.Value)
|
||||
{
|
||||
transform.LookAt(MeatKitPlugin.playerCamera.transform);
|
||||
var rotLook = transform.localEulerAngles;
|
||||
var rot = Vector3.zero;
|
||||
|
||||
rot.x = -rotLook.x - 90;
|
||||
transform.localRotation = Quaternion.Euler(rot);
|
||||
}
|
||||
|
||||
// we're in a hold; hide token count and show wave count
|
||||
if (InPlay.tnhManager.Phase == TNH_Phase.Hold)
|
||||
{
|
||||
if (tokenCounter != null)
|
||||
tokenCounter.SetActive(false);
|
||||
@@ -68,7 +91,7 @@ namespace TNHQoLImprovements
|
||||
if (waveCounter != null)
|
||||
waveCounter.SetActive(true);
|
||||
}
|
||||
else // show token count
|
||||
else // NOT in hold; do the inverse
|
||||
{
|
||||
if (tokenCounter != null)
|
||||
tokenCounter.SetActive(true);
|
||||
|
||||
Reference in New Issue
Block a user