Commit 142d8389 authored by radow's avatar radow
Browse files

respawn mechanic

parent 3a8ce3d1
This diff is collapsed.
This diff is collapsed.
fileFormatVersion: 2
guid: c5127a0d8b31a764b89269b2a9cebfa6
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -1267,7 +1267,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2170919593137334243}
m_RootOrder: 20
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &202676859
BoxCollider:
......@@ -1804,7 +1804,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2170919593137334243}
m_RootOrder: 17
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &371612508
BoxCollider:
......@@ -1902,7 +1902,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 70767281}
m_RootOrder: 21
m_RootOrder: 20
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &373069662
MonoBehaviour:
......@@ -2647,7 +2647,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2170919593137334243}
m_RootOrder: 19
m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &694626023
BoxCollider:
......@@ -5242,7 +5242,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2170919593137334243}
m_RootOrder: 18
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1168175627
BoxCollider:
......@@ -6469,6 +6469,118 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9ae8261861511f74cba1dbea7dd8cd5f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1397420011
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1397420016}
- component: {fileID: 1397420015}
- component: {fileID: 1397420014}
- component: {fileID: 1397420013}
- component: {fileID: 1397420012}
m_Layer: 10
m_Name: global Deathzone
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1397420012
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397420011}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86420ab7801c1b444a1f667f75568af1, type: 3}
m_Name:
m_EditorClassIdentifier:
respawnpoint: {fileID: 0}
restList: []
--- !u!65 &1397420013
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397420011}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1397420014
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397420011}
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: 10303, guid: 0000000000000000f000000000000000, type: 0}
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!33 &1397420015
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397420011}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1397420016
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1397420011}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -31.1, y: -104.1, z: 158.2}
m_LocalScale: {x: 495.22443, y: 32.50776, z: 495.22443}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1399557180
GameObject:
m_ObjectHideFlags: 0
......@@ -6847,6 +6959,38 @@ Transform:
m_Father: {fileID: 809740255}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 165.997, z: 0}
--- !u!1 &1550925732
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1550925733}
m_Layer: 10
m_Name: Respawn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1550925733
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1550925732}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.4129, y: -0.4281, z: -0.0463}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1844484357}
m_Father: {fileID: 8608678073819248646}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1567785085
GameObject:
m_ObjectHideFlags: 0
......@@ -7895,7 +8039,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 70767281}
m_RootOrder: 20
m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1789812659
MonoBehaviour:
......@@ -8211,6 +8355,103 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9ae8261861511f74cba1dbea7dd8cd5f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1844484356
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1844484357}
- component: {fileID: 1844484360}
- component: {fileID: 1844484359}
- component: {fileID: 1844484358}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1844484357
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1844484356}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.0075131785, y: 0.0075131785, z: 0.0075131785}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1550925733}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1844484358
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1844484356}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1844484359
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1844484356}
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: 10303, guid: 0000000000000000f000000000000000, type: 0}
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!33 &1844484360
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1844484356}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1845512604
GameObject:
m_ObjectHideFlags: 0
......@@ -10410,6 +10651,10 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 286772217997680380, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_RootOrder
value: 22
objectReference: {fileID: 0}
- target: {fileID: 713366498646629386, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_IsActive
value: 0
......@@ -10424,7 +10669,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1549517535863977004, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_RootOrder
value: 22
value: 21
objectReference: {fileID: 0}
- target: {fileID: 1570001661796586768, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_LocalScale.z
......@@ -10564,7 +10809,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4199306977145115109, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_RootOrder
value: 20
value: 19
objectReference: {fileID: 0}
- target: {fileID: 4922357022347109168, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_IsActive
......@@ -10590,6 +10835,10 @@ PrefabInstance:
propertyPath: m_RootOrder
value: 21
objectReference: {fileID: 0}
- target: {fileID: 6571737291109419477, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_RootOrder
value: 22
objectReference: {fileID: 0}
- target: {fileID: 6924498585429798811, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_IsActive
value: 0
......@@ -10612,7 +10861,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 9203806014013603585, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
propertyPath: m_RootOrder
value: 21
value: 20
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 08aad6e33e89e3e47a2e2efda81a3b0a, type: 3}
......@@ -10962,10 +11211,22 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 191447828, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
- target: {fileID: 566093150, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
propertyPath: m_Layer
value: 10
objectReference: {fileID: 0}
- target: {fileID: 804291044, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
propertyPath: activatable
value:
objectReference: {fileID: 70767280}
- target: {fileID: 2030994648, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
propertyPath: respawnPoint
value:
objectReference: {fileID: 1550925733}
- target: {fileID: 4926340066240022600, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
propertyPath: deactivate
value:
......@@ -11018,8 +11279,17 @@ PrefabInstance:
propertyPath: m_Name
value: Dream Kitchen
objectReference: {fileID: 0}
- target: {fileID: 8608678073803752743, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
--- !u!4 &8608678073819248646 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2030994647, guid: ca7066f259a5cdc4a8bbf208db67418f, type: 3}
m_PrefabInstance: {fileID: 8608678073819248645}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8751306432443268893
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -11099,6 +11369,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2004406398226080032, guid: 6ca97b26d87177244b8bcf94a0107595, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6639459951301148690, guid: 6ca97b26d87177244b8bcf94a0107595, type: 3}
propertyPath: rotoffset.x
value: 30
......
......@@ -6,6 +6,7 @@ public class ActivateShortcut : MonoBehaviour
{
public GameObject shortcutGO;
public bool activated;
public string message = "Shortcut activated";
private void OnTriggerEnter(Collider other)
{
......@@ -19,6 +20,6 @@ public class ActivateShortcut : MonoBehaviour
{
activated = true;
shortcutGO.SetActive(true);
return "Shortcut activated";
return message;
}
}
......@@ -11,6 +11,16 @@ public class Deathvolume : MonoBehaviour
{
if (other.GetComponentInParent<PlayerController>())
{
if(respawnpoint == null)
{
if (Helproom.currentRoom)
{
PlayerController.instance.transform.position = Helproom.currentRoom.respawnPoint.position;
PlayerController.instance.transform.rotation = Helproom.currentRoom.respawnPoint.rotation;
}
return;
}
PlayerController.instance.transform.position = respawnpoint.position;
PlayerController.instance.transform.rotation = respawnpoint.rotation;
int i = 0;
......
......@@ -5,12 +5,18 @@ using UnityEngine;
public class Helproom : MonoBehaviour
{
public static Helproom currentRoom;
public Transform respawnPoint;
public List<ActivateShortcut> shortcuts = new List<ActivateShortcut>();
private void OnTriggerEnter(Collider other)
{
currentRoom = this;
if (other.GetComponentInParent<PlayerController>())
{
currentRoom = this;
Debug.Log($"Activated Helproom in {transform.parent.gameObject.name}");
}
}
public static string GetHelp()
......
Supports Markdown
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