Tanoda
FingerRestorer.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
4
5public class FingerRestorer : MonoBehaviour
6{
7 private bool leftLastFrame, rightLastFrame;
8 public GameObject leftHud, rightHud;
9
10#if DANA
11 void Update()
12 {
13 if (!leftHud.activeSelf)
14 {
15 if (leftLastFrame)
16 {
17 HandHintSystem.instance.RestoreFingers(true);
18 }
19 }
20 else
21 {
22 if (!leftLastFrame)
23 {
24 HandHintSystem.instance.StopMovingFinger();
25 }
26 }
27
28 if (!rightHud.activeSelf)
29 {
30 if (rightLastFrame)
31 {
32 HandHintSystem.instance.RestoreFingers(false);
33 }
34 }
35 else
36 {
37 if (!rightLastFrame)
38 {
39 HandHintSystem.instance.StopMovingFinger();
40 }
41 }
42 leftLastFrame = leftHud.activeSelf;
43 rightLastFrame = rightHud.activeSelf;
44 }
45#endif
46}
GameObject rightHud
GameObject leftHud
static HandHintSystem instance