Last active
January 7, 2019 14:16
-
-
Save chittai/2c9959a16b433e7e0d8b1ffff9907324 to your computer and use it in GitHub Desktop.
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