Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chronosを使用してトリガーを押している間はAreaClockが有効になるようにしている
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AreaClockMaking : MonoBehaviour {
public GameObject areaClock;
private GuageDecreasing _guageDecreasing;
void Start () {
_guageDecreasing = GetComponent<GuageDecreasing>();
}
void Update () {
if (OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger) && _guageDecreasing.restGuage >= 0)
{
areaClock.SetActive(true);
_guageDecreasing.Decreasing();
}
else
{
areaClock.SetActive(false);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment