mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[Blackout] Cleanup
This commit is contained in:
parent
5b40a2a185
commit
c9d77dc034
3 changed files with 9 additions and 10 deletions
|
@ -12,16 +12,15 @@ namespace NAK.Blackout;
|
|||
|
||||
*/
|
||||
|
||||
|
||||
static class AssetsHandler
|
||||
internal static class AssetsHandler
|
||||
{
|
||||
static readonly List<string> ms_assets = new List<string>()
|
||||
private static readonly List<string> ms_assets = new List<string>()
|
||||
{
|
||||
"blackout_controller.asset"
|
||||
};
|
||||
|
||||
static Dictionary<string, AssetBundle> ms_loadedAssets = new Dictionary<string, AssetBundle>();
|
||||
static Dictionary<string, GameObject> ms_loadedObjects = new Dictionary<string, GameObject>();
|
||||
private static Dictionary<string, AssetBundle> ms_loadedAssets = new Dictionary<string, AssetBundle>();
|
||||
private static Dictionary<string, GameObject> ms_loadedObjects = new Dictionary<string, GameObject>();
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ public class BlackoutController : MonoBehaviour
|
|||
}
|
||||
|
||||
// Initialize the BlackoutInstance object.
|
||||
void Start()
|
||||
private void Start()
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
|
@ -146,7 +146,7 @@ public class BlackoutController : MonoBehaviour
|
|||
}
|
||||
|
||||
//Automatic State Change
|
||||
void Update()
|
||||
private void Update()
|
||||
{
|
||||
//get the current position of the player's head
|
||||
Vector3 curHeadPos = activeModeCam.transform.position;
|
||||
|
@ -191,13 +191,13 @@ public class BlackoutController : MonoBehaviour
|
|||
ChangeBlackoutState(BlackoutState.Awake);
|
||||
}
|
||||
|
||||
void OnPreRender(Camera cam)
|
||||
private void OnPreRender(Camera cam)
|
||||
{
|
||||
if (cam == activeModeCam) return;
|
||||
blackoutAnimator.transform.localScale = Vector3.zero;
|
||||
}
|
||||
|
||||
void OnPostRender(Camera cam)
|
||||
private void OnPostRender(Camera cam)
|
||||
{
|
||||
blackoutAnimator.transform.localScale = Vector3.one;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public class Blackout : MelonMod
|
|||
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator WaitForLocalPlayer()
|
||||
private System.Collections.IEnumerator WaitForLocalPlayer()
|
||||
{
|
||||
//load blackout_controller.asset
|
||||
AssetsHandler.Load();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue