forked from cgvr/DeltaVR
added cheat keys to teleport player to minigames
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
### TODO
|
### TODO
|
||||||
* klaviatuuriga võiks saada teleportida mängijat interactionite algustesse
|
* klaviatuuriga võiks saada teleportida mängijat interactionite algustesse
|
||||||
* quest marker peaks jätma nähtavad noolekesed enda liikumise teele
|
* quest marker peaks jätma nähtavad noolekesed enda liikumise teele
|
||||||
|
* korralik teleportation minigame'idesse, kasutades TeleportProviderit, nagu button
|
||||||
* igal pool, kus mängija peab rääkima, peaks olema:
|
* igal pool, kus mängija peab rääkima, peaks olema:
|
||||||
* helilained räägitava heli amplituudi põhjal
|
* helilained räägitava heli amplituudi põhjal
|
||||||
* "loading" dünaamiline ikoon kui mängija ootab protsessimise järel
|
* "loading" dünaamiline ikoon kui mängija ootab protsessimise järel
|
||||||
|
|||||||
Binary file not shown.
@@ -3,11 +3,15 @@ using System;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Unity.XR.CoreUtils;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.InputSystem;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
public class ModelGenerationUtils : MonoBehaviour
|
public class ModelGenerationUtils : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static ModelGenerationUtils Instance { get; private set; }
|
public static ModelGenerationUtils Instance { get; private set; }
|
||||||
|
public Transform[] minigamePoints;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@@ -23,9 +27,38 @@ public class ModelGenerationUtils : MonoBehaviour
|
|||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
// For teleporting player to different minigames, used during expos
|
||||||
|
|
||||||
|
// No keyboard present (e.g., Quest standalone without a paired keyboard)
|
||||||
|
if (Keyboard.current == null) return;
|
||||||
|
|
||||||
|
if (Keyboard.current.digit1Key.wasPressedThisFrame)
|
||||||
|
{
|
||||||
|
XROrigin xrOrigin = FindObjectOfType<XROrigin>(includeInactive: true);
|
||||||
|
xrOrigin.transform.position = minigamePoints[0].position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Keyboard.current.digit2Key.wasPressedThisFrame)
|
||||||
|
{
|
||||||
|
XROrigin xrOrigin = FindObjectOfType<XROrigin>(includeInactive: true);
|
||||||
|
xrOrigin.transform.position = minigamePoints[1].position;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Keyboard.current.digit3Key.wasPressedThisFrame)
|
||||||
|
{
|
||||||
|
XROrigin xrOrigin = FindObjectOfType<XROrigin>(includeInactive: true);
|
||||||
|
xrOrigin.transform.position = minigamePoints[2].position;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Keyboard.current.digit0Key.wasPressedThisFrame)
|
||||||
|
{
|
||||||
|
string currentSceneName = SceneManager.GetActiveScene().name;
|
||||||
|
SceneManager.LoadScene(currentSceneName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate model by starting a new Python subprocess
|
* Generate model by starting a new Python subprocess
|
||||||
* NOT USED IN LATEST VERSION
|
* NOT USED IN LATEST VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user