Hide UI during play

master
D4VID 4 months ago
parent 5a0da3e28f
commit da60751b32

@ -1,7 +1,7 @@
ID: D4VID_CameraRoll ID: D4VID_CameraRoll
Name: CameraRoll Name: CameraRoll
Author: D4VID Author: D4VID
Version: 0.2.5 Version: 0.3.0
Priority: 0 Priority: 0
ClientOnly: true ClientOnly: true
Dependencies: Dependencies:

@ -1,11 +1,15 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection;
using EccsLogicWorldAPI.Shared.AccessHelper;
using LogicLog; using LogicLog;
using LogicWorld;
using UnityEngine; using UnityEngine;
namespace CameraRoll.Client.Tool { namespace CameraRoll.Client.Tool {
public class CameraRollTool { public class CameraRollTool {
private static ILogicLogger _logger = null!; private static ILogicLogger _logger = null!;
private static Camera _cam; private static Camera _cam;
private static PropertyInfo _showBuildingUI;
/// <summary> /// <summary>
/// How fast does it interpolate between points /// How fast does it interpolate between points
@ -38,6 +42,7 @@ namespace CameraRoll.Client.Tool {
_logger = logger; _logger = logger;
PathPoints.Clear(); PathPoints.Clear();
_playing = false; _playing = false;
_showBuildingUI = Properties.getPrivateStatic(typeof(FirstPersonInteraction), "ShowBuildingUI");
} }
public static void OnEnter() { public static void OnEnter() {
@ -77,6 +82,8 @@ namespace CameraRoll.Client.Tool {
_interpolationState = 0.0f; _interpolationState = 0.0f;
SetPointsVisible(false); SetPointsVisible(false);
_showBuildingUI.SetValue(null, false); // Hide UI
_playing = true; _playing = true;
} }
@ -88,6 +95,7 @@ namespace CameraRoll.Client.Tool {
_cam.transform.localRotation = _originalRotation; _cam.transform.localRotation = _originalRotation;
SetPointsVisible(true); SetPointsVisible(true);
_showBuildingUI.SetValue(null, true); // Show UI
} }
public static void Clear() { public static void Clear() {

Loading…
Cancel
Save