mirror of
https://github.com/muskit/H3VR-TNH-Quality-of-Life-Improvements.git
synced 2026-06-02 20:24:26 -07:00
change initialization approach, refactoring
should resolve errors occurring on both Atlas and WurstMod maps
This commit is contained in:
Generated
+9
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7e0925cb0a2d20488bcb5d230cf74f7
|
||||
folderAsset: yes
|
||||
timeCreated: 1690792321
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using FistVR;
|
||||
|
||||
// To be attached to FVRHealthBar object
|
||||
public class HPHideWhenAiming : MonoBehaviour {
|
||||
public class HPHideWhenAiming : MonoBehaviour
|
||||
{
|
||||
CanvasGroup canvasGroup;
|
||||
|
||||
GameObject gObjHUD;
|
||||
@@ -25,7 +24,8 @@ public class HPHideWhenAiming : MonoBehaviour {
|
||||
//LineRenderer colliderRenderer;
|
||||
|
||||
// Use this for initialization
|
||||
void Start() {
|
||||
void Start()
|
||||
{
|
||||
gObjHUD = transform.GetChild(0).gameObject;
|
||||
leftHand = MeatKitPlugin.playerCamera.transform.parent.GetChild(1).GetComponent<FVRViveHand>();
|
||||
rightHand = MeatKitPlugin.playerCamera.transform.parent.GetChild(0).GetComponent<FVRViveHand>();
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using FistVR;
|
||||
|
||||
namespace TNHQoLImprovements
|
||||
@@ -32,7 +30,6 @@ namespace TNHQoLImprovements
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
// Destroy statics
|
||||
tnhManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ namespace TNHQoLImprovements
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// game over area; do not update anything else
|
||||
if (InPlay.tnhManager.Phase == TNH_Phase.Dead || InPlay.tnhManager.Phase == TNH_Phase.Completed)
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user