Chronosを使用してトリガーを押している間はAreaClockが有効になるようにしている
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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