Upload files to "Classes"
This commit is contained in:
1 parent
520d582c8c
commit
35a1f0d2de
2 files changed
+158
No files matched your search
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace GorillaCaptions.Classes
|
||||
{
|
||||
public class SpeechBubble : MonoBehaviour
|
||||
{
|
||||
public VRRig Owner;
|
||||
private GameObject uiTarget;
|
||||
private float spawnTime;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
spawnTime = Time.time;
|
||||
uiTarget = transform.Find("Canvas").gameObject;
|
||||
gameObject.transform.localPosition = Vector3.up * 0.6f;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Time.time > spawnTime + 10f || Owner == null || !Owner.gameObject.activeInHierarchy)
|
||||
Managers.BubbleManager.instance.DestroyBubble(gameObject);
|
||||
}
|
||||
|
||||
void LateUpdate() =>
|
||||
uiTarget.transform.LookAt(GorillaTagger.Instance.headCollider.transform.position);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user