24 lines
458 B
C#
24 lines
458 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class VrPressureView : MonoBehaviour
|
|
{
|
|
[SerializeField] private Image Bar;
|
|
private Player player;
|
|
private bool initailized = false;
|
|
|
|
public void Initialize()
|
|
{
|
|
player = G.PlayerStateModel.PlayerComponent;
|
|
initailized = true;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (!initailized) return;
|
|
|
|
Bar.fillAmount = 1-player.DiveSystem.PressurePercent;
|
|
|
|
}
|
|
}
|