Commit 6a86ec92 authored by radow's avatar radow
Browse files

systems

parent 24d79f56
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Disolving chain
m_Shader: {fileID: 4800000, guid: 6f40288e2fc4b804b91d3464810e21ba, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DissolveTex:
m_Texture: {fileID: 2800000, guid: 38f75f5c96cf4734eaf03828d7d4aa29, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 698ba6fa62b94eb42855c21ec1b7b5cf, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Metallic:
m_Texture: {fileID: 2800000, guid: aca4f60e7389d814d9f6f80ae5437ef3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Normal:
m_Texture: {fileID: 2800000, guid: 1d6df1ccf3f0ccb41af0bb3ed77f0d0f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DissolveAmount: 0
- _DissolveScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _NormalIntensity: -2
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
......@@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Disolvinglick
m_Name: Disolvinglick 1
m_Shader: {fileID: 4800000, guid: 6f40288e2fc4b804b91d3464810e21ba, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
......@@ -79,7 +79,7 @@ Material:
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _NormalIntensity: 1
- _NormalIntensity: 0.89
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
......
fileFormatVersion: 2
guid: 0cbffcde1eb01194888a3a806de95483
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
This diff is collapsed.
......@@ -24,6 +24,12 @@ public class Gate : MonoBehaviour
private void Start()
{
gateSound = GetComponent<AudioSource>();
foreach(Renderer r in renderers)
{
Material mat = new Material(r.material);
r.material = mat;
}
}
void Update()
......@@ -151,6 +157,8 @@ public class Gate : MonoBehaviour
public Transform lockF2;
float keyProgress = 0;
public List<Renderer> renderers = new List<Renderer>();
void KeyAnimation()
{
keyProgress += Time.deltaTime * (sequence>2?3f:1f);
......@@ -192,6 +200,9 @@ public class Gate : MonoBehaviour
lockBit.position = Vector3.Lerp(lockF1.position, lockF2.position, keyProgress);
lockBit.rotation = Quaternion.Lerp(lockF1.rotation, lockF2.rotation, keyProgress);
break;
case 6:
foreach(Renderer r in renderers) r.material.SetFloat("_DissolveAmount", keyProgress);
break;
}
}
......
......@@ -26,6 +26,6 @@ public class LocomotionController : MonoBehaviour
public bool CheckIfActivated(XRController controller)
{
InputHelpers.IsPressed(controller.inputDevice, teleportActivationButton, out bool isActivated, activationthreshold);
return isActivated;
return (isActivated && !SettingsData.instance.paused);
}
}
......@@ -30,5 +30,10 @@ public class VRWindowfocus : MonoBehaviour, IPointerEnterHandler, IPointerExitHa
{
}
private void OnDestroy()
{
windows.Remove(this);
}
}
......@@ -29,22 +29,7 @@ public class VRPauseMenu : MonoBehaviour
{
if (lastFrameState) return;
lastFrameState = true;
if (!menuActive)
{
menuActive = true;
SettingsData.instance.paused = true;
transform.position = rig.cameraGameObject.transform.position;
transform.eulerAngles = new Vector3(0, rig.cameraGameObject.transform.eulerAngles.y, 0);
pauseMenuCanvas.SetActive(true);
vrUIRay.SetActive(true);
}
else
{
menuActive = false;
SettingsData.instance.paused = false;
pauseMenuCanvas.SetActive(false);
vrUIRay.SetActive(false);
}
De_ActivateVRMenu();
}
else lastFrameState = false;
}
......@@ -54,4 +39,24 @@ public class VRPauseMenu : MonoBehaviour
transform.position = rig.cameraGameObject.transform.position;
transform.eulerAngles = new Vector3(0, rig.cameraGameObject.transform.eulerAngles.y, 0);
}
public void De_ActivateVRMenu()
{
if (!menuActive)
{
menuActive = true;
SettingsData.instance.paused = true;
transform.position = rig.cameraGameObject.transform.position;
transform.eulerAngles = new Vector3(0, rig.cameraGameObject.transform.eulerAngles.y, 0);
pauseMenuCanvas.SetActive(true);
vrUIRay.SetActive(true);
}
else
{
menuActive = false;
SettingsData.instance.paused = false;
pauseMenuCanvas.SetActive(false);
vrUIRay.SetActive(false);
}
}
}
This diff is collapsed.
fileFormatVersion: 2
guid: fb659fcf47586fa43a4f7c26b4a408b3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment