Current version of pause menu panel to change settings while gameplay.
This commit is contained in:
@@ -8,6 +8,7 @@ public class ArmSwingLocomotion : MonoBehaviour
|
||||
public GameObject RightHand;
|
||||
public GameObject CenterEyeCamera;
|
||||
public GameObject ForwardDirection;
|
||||
public GameObject Player;
|
||||
|
||||
private Vector3 PositionPreviousFrameLeftHand;
|
||||
private Vector3 PositionPreviousFrameRightHand;
|
||||
@@ -22,7 +23,7 @@ public class ArmSwingLocomotion : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
PlayerPositionPreviousFrame = transform.position;
|
||||
PlayerPositionPreviousFrame = Player.transform.position;
|
||||
PositionPreviousFrameLeftHand = LeftHand.transform.position;
|
||||
PlayerPositionPreviousFrame = RightHand.transform.position;
|
||||
}
|
||||
@@ -39,7 +40,7 @@ public class ArmSwingLocomotion : MonoBehaviour
|
||||
PositionCurrentFrameLeftHand = LeftHand.transform.position;
|
||||
PositionCurrentFrameRightHand = RightHand.transform.position;
|
||||
|
||||
PlayerPositionCurrentFrame = transform.position;
|
||||
PlayerPositionCurrentFrame = Player.transform.position;
|
||||
|
||||
//Debug.Log("Previous" + PositionPreviousFrameLeftHand);
|
||||
//Debug.Log("Current" + PositionCurrentFrameLeftHand);
|
||||
@@ -52,7 +53,7 @@ public class ArmSwingLocomotion : MonoBehaviour
|
||||
|
||||
if (Time.timeSinceLevelLoad > 1f)
|
||||
{
|
||||
transform.position += ForwardDirection.transform.forward * HandSpeed * Speed * Time.deltaTime;
|
||||
Player.transform.position += ForwardDirection.transform.forward * HandSpeed * Speed * Time.deltaTime;
|
||||
}
|
||||
|
||||
PositionPreviousFrameLeftHand = PositionCurrentFrameLeftHand;
|
||||
|
||||
38
Assets/Project Files/Scripts/Shumpei/ChangeButtonColor.cs
Normal file
38
Assets/Project Files/Scripts/Shumpei/ChangeButtonColor.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ChangeButtonColor : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Color enterColor = Color.white;
|
||||
[SerializeField] private Color exitColor = Color.white;
|
||||
|
||||
private MeshCollider _collider;
|
||||
private MeshRenderer _renderer;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_collider = GetComponent<MeshCollider>();
|
||||
_renderer = GetComponent<MeshRenderer>();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
_renderer.material.color = enterColor;
|
||||
Debug.Log("Touched!");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
_renderer.material.color = exitColor;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a16108a6f7081d14f9f5a046ac04b8c2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ChangeButtonColorLocomotion : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Color enterColor = Color.white;
|
||||
[SerializeField] private Color exitColor = Color.white;
|
||||
|
||||
private MeshCollider _collider;
|
||||
private MeshRenderer _renderer;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_collider = GetComponent<MeshCollider>();
|
||||
_renderer = GetComponent<MeshRenderer>();
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
if(_renderer.material.color != enterColor)
|
||||
_renderer.material.color = enterColor;
|
||||
else
|
||||
_renderer.material.color = exitColor;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae634ea4fe8cb874487372a3d7c595bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Assets/Project Files/Scripts/Shumpei/ControllLocomotion.cs
Normal file
22
Assets/Project Files/Scripts/Shumpei/ControllLocomotion.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ControllLocomotion : MonoBehaviour
|
||||
{
|
||||
public GameObject XRorigin;
|
||||
public GameObject ArmSwingButton;
|
||||
public GameObject JoyStickButton;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca1db91ee57976944aa22ed347811963
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/Project Files/Scripts/Shumpei/EnableArmSwing.cs
Normal file
32
Assets/Project Files/Scripts/Shumpei/EnableArmSwing.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EnableArmSwing : MonoBehaviour
|
||||
{
|
||||
|
||||
private MeshCollider _collider;
|
||||
private MeshRenderer _renderer;
|
||||
|
||||
public GameObject Player;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_collider = GetComponent<MeshCollider>();
|
||||
_renderer = GetComponent<MeshRenderer>();
|
||||
Player.GetComponent<ArmSwingLocomotion>().enabled = false;
|
||||
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
if(_renderer.material.color == Color.white)
|
||||
Player.GetComponent<ArmSwingLocomotion>().enabled = true;
|
||||
else
|
||||
Player.GetComponent<ArmSwingLocomotion>().enabled = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Project Files/Scripts/Shumpei/EnableArmSwing.cs.meta
Normal file
11
Assets/Project Files/Scripts/Shumpei/EnableArmSwing.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 696a55bfea145fa4b9029ff2d359c16d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
32
Assets/Project Files/Scripts/Shumpei/EnableDash.cs
Normal file
32
Assets/Project Files/Scripts/Shumpei/EnableDash.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EnableDash : MonoBehaviour
|
||||
{
|
||||
|
||||
private MeshCollider _collider;
|
||||
private MeshRenderer _renderer;
|
||||
|
||||
public GameObject Player;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_collider = GetComponent<MeshCollider>();
|
||||
_renderer = GetComponent<MeshRenderer>();
|
||||
Player.GetComponent<Dash>().enabled = false;
|
||||
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
if (_renderer.material.color == Color.white)
|
||||
Player.GetComponent<Dash>().enabled = true;
|
||||
else
|
||||
Player.GetComponent<Dash>().enabled = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Project Files/Scripts/Shumpei/EnableDash.cs.meta
Normal file
11
Assets/Project Files/Scripts/Shumpei/EnableDash.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84e3386cbd3fd2c418ecf357af19ba5f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
27
Assets/Project Files/Scripts/Shumpei/EnableJoyStick.cs
Normal file
27
Assets/Project Files/Scripts/Shumpei/EnableJoyStick.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EnableJoyStick : MonoBehaviour
|
||||
{
|
||||
|
||||
private MeshCollider _collider;
|
||||
|
||||
public GameObject LocomotionSystem;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_collider = GetComponent<MeshCollider>();
|
||||
LocomotionSystem.SetActive(false);
|
||||
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
LocomotionSystem.SetActive(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Project Files/Scripts/Shumpei/EnableJoyStick.cs.meta
Normal file
11
Assets/Project Files/Scripts/Shumpei/EnableJoyStick.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a63e1d5bde5a60c45aa409546e55b920
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class LocomotionSettingButton : MonoBehaviour
|
||||
{
|
||||
|
||||
private MeshCollider _collider;
|
||||
|
||||
public GameObject LocomotionPanel;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_collider = GetComponent<MeshCollider>();
|
||||
LocomotionPanel.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "Hand")
|
||||
{
|
||||
LocomotionPanel.SetActive(!LocomotionPanel.activeSelf);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ac280753a1d95a43a1fbcfd69708d7a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user