-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpriteSystem.cs
More file actions
85 lines (71 loc) · 2.16 KB
/
SpriteSystem.cs
File metadata and controls
85 lines (71 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Collections;
using UnityEngine;
public class SpriteSystem : MonoBehaviour
{
[Header("General Settings")]
public Rigidbody rb;
public EyeContact eyeContactR;
public EyeContact eyeContactL;
public Transform eyesLocation;
public bool eyesFollow = false;
public GameObject player;
public bool buttonsEnabled = true;
public bool toHand = false;
[Header("Hand Settings")]
public Transform dominantHand;
public float dominantHandRange;
public GameObject nonDominantHand;
public float allowedDist = 0.05f;
[Header("Descend Settings")]
public GameObject DescentStart;
[Header("Target Settings")]
public Transform target;
[Header("Temporary Settings")]
public Vector3 destination;
public Renderer groundRen;
public bool doNotContinue; //for testing the flight state only
public State state;
public void SetState(State currState)
{
state = currState;
}
public void Update()
{
/*
OVRInput.Update();
if (OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger) == 1f)
{
if (buttonsEnabled)
{
StopAllCoroutines();
SetState(new Flight(this));
toHand = true;
StartCoroutine(state.FlightCoroutine(rb, nonDominantHand.transform.position));
buttonsEnabled = false;
}
}
if (OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger) == 1f)
{
if (buttonsEnabled)
{
StopAllCoroutines();
SetState(new Ascend(this));
StartCoroutine(state.AscendCoroutine(rb, transform));
buttonsEnabled = false;
}
}
if (OVRInput.Get(OVRInput.Button.One))
{
if (buttonsEnabled)
{
doNotContinue = true;
StopAllCoroutines();
SetState(new Flight(this));
StartCoroutine(state.FlightCoroutine(rb, DescentStart.transform.position));
buttonsEnabled = false;
}
}
*/
}
}