staging2 #26
|
@ -2104,6 +2104,7 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 4421233779495850}
|
||||
- {fileID: 476420}
|
||||
- {fileID: 4164307110522025874}
|
||||
m_Father: {fileID: 4580479270500170}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -2387,3 +2388,117 @@ Transform:
|
|||
m_Father: {fileID: 4207000969376662}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &972614495230819995
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4164307110522025874}
|
||||
- component: {fileID: 2024636151888384740}
|
||||
- component: {fileID: 406863439724310501}
|
||||
- component: {fileID: 6269533531215649841}
|
||||
- component: {fileID: 4053915464836275328}
|
||||
m_Layer: 0
|
||||
m_Name: Sphere
|
||||
m_TagString: Hand
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4164307110522025874
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 972614495230819995}
|
||||
m_LocalRotation: {x: 0.3485921, y: 0.6135567, z: 0.49798086, w: 0.5040306}
|
||||
m_LocalPosition: {x: 0.102, y: -0.014, z: 0}
|
||||
m_LocalScale: {x: 0.02, y: 0.02, z: 0.02}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4166430797808258}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &2024636151888384740
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 972614495230819995}
|
||||
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!23 &406863439724310501
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 972614495230819995}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!135 &6269533531215649841
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 972614495230819995}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Radius: 0.5
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!54 &4053915464836275328
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 972614495230819995}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
|
@ -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:
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 696a55bfea145fa4b9029ff2d359c16d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 84e3386cbd3fd2c418ecf357af19ba5f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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:
|
File diff suppressed because it is too large
Load Diff
|
@ -8,6 +8,7 @@ TagManager:
|
|||
- Throwable
|
||||
- Bullet
|
||||
- IceBolt
|
||||
- Hand
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
|
Loading…
Reference in New Issue