Changed Artefact and ArtefactInventory to Scriptable objects

Added artefact prefab
This commit is contained in:
Novvator 2021-02-19 15:14:14 +00:00
parent 7ff4569fde
commit 4397ec0326
16 changed files with 548 additions and 558 deletions

8
game/Assets/Prefabs.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: daa7df1d74482674f9d3277a44cd93bd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8ba1397828f5976449e5413e38108cfd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,222 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8781564213167799763
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8781564213167799764}
- component: {fileID: 8781564213167799767}
- component: {fileID: 8781564213167799766}
- component: {fileID: 8781564213167799761}
- component: {fileID: 8781564214016862072}
m_Layer: 0
m_Name: New Artefact
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8781564213167799764
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564213167799763}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.38, y: 0.5, z: 38.53155}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 8781564214893312960}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8781564213167799767
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564213167799763}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &8781564213167799766
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564213167799763}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
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!136 &8781564213167799761
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564213167799763}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!114 &8781564214016862072
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564213167799763}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7d3ed39e75807bc4d865f39b2ef9ea69, type: 3}
m_Name:
m_EditorClassIdentifier:
data: {fileID: 0}
--- !u!1 &8781564214893312975
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8781564214893312960}
- component: {fileID: 8781564214893312963}
- component: {fileID: 8781564214893312962}
- component: {fileID: 8781564214893312973}
- component: {fileID: 8781564214893312972}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8781564214893312960
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564214893312975}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 8781564213167799764}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8781564214893312963
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564214893312975}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &8781564214893312962
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564214893312975}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
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 &8781564214893312973
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564214893312975}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 4
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &8781564214893312972
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8781564214893312975}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44966bb2b773ce145a9d6c7c9f42aeba, type: 3}
m_Name:
m_EditorClassIdentifier:
_id: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2dae894ec500e524a88f985657f9682d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -164,117 +164,73 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 9 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &183708901 --- !u!1001 &117285705
GameObject: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 183708906}
- component: {fileID: 183708905}
- component: {fileID: 183708904}
- component: {fileID: 183708903}
- component: {fileID: 183708902}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &183708902
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 183708901}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44966bb2b773ce145a9d6c7c9f42aeba, type: 3}
m_Name:
m_EditorClassIdentifier:
id: 0
--- !u!135 &183708903
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 183708901}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_Radius: 4 m_Modification:
m_Center: {x: 0, y: 0, z: 0} m_TransformParent: {fileID: 0}
--- !u!23 &183708904 m_Modifications:
MeshRenderer: - target: {fileID: 8781564213167799763, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_ObjectHideFlags: 0 propertyPath: m_Name
m_CorrespondingSourceObject: {fileID: 0} value: Artefact1
m_PrefabInstance: {fileID: 0} objectReference: {fileID: 0}
m_PrefabAsset: {fileID: 0} - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_GameObject: {fileID: 183708901} propertyPath: m_RootOrder
m_Enabled: 0 value: 9
m_CastShadows: 1 objectReference: {fileID: 0}
m_ReceiveShadows: 1 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_DynamicOccludee: 1 propertyPath: m_LocalPosition.x
m_MotionVectors: 1 value: -1.38
m_LightProbeUsage: 1 objectReference: {fileID: 0}
m_ReflectionProbeUsage: 1 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_RayTracingMode: 2 propertyPath: m_LocalPosition.y
m_RayTraceProcedural: 0 value: 0.5
m_RenderingLayerMask: 1 objectReference: {fileID: 0}
m_RendererPriority: 0 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_Materials: propertyPath: m_LocalPosition.z
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} value: 38.53155
m_StaticBatchInfo: objectReference: {fileID: 0}
firstSubMesh: 0 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
subMeshCount: 0 propertyPath: m_LocalRotation.w
m_StaticBatchRoot: {fileID: 0} value: 1
m_ProbeAnchor: {fileID: 0} objectReference: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0} - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_ScaleInLightmap: 1 propertyPath: m_LocalRotation.x
m_ReceiveGI: 1 value: 0
m_PreserveUVs: 0 objectReference: {fileID: 0}
m_IgnoreNormalsForChartDetection: 0 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_ImportantGI: 0 propertyPath: m_LocalRotation.y
m_StitchLightmapSeams: 1 value: 0
m_SelectedEditorRenderState: 3 objectReference: {fileID: 0}
m_MinimumChartSize: 4 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_AutoUVMaxDistance: 0.5 propertyPath: m_LocalRotation.z
m_AutoUVMaxAngle: 89 value: 0
m_LightmapParameters: {fileID: 0} objectReference: {fileID: 0}
m_SortingLayerID: 0 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_SortingLayer: 0 propertyPath: m_LocalEulerAnglesHint.x
m_SortingOrder: 0 value: 0
m_AdditionalVertexStreams: {fileID: 0} objectReference: {fileID: 0}
--- !u!33 &183708905 - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
MeshFilter: propertyPath: m_LocalEulerAnglesHint.y
m_ObjectHideFlags: 0 value: 0
m_CorrespondingSourceObject: {fileID: 0} objectReference: {fileID: 0}
m_PrefabInstance: {fileID: 0} - target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_PrefabAsset: {fileID: 0} propertyPath: m_LocalEulerAnglesHint.z
m_GameObject: {fileID: 183708901} value: 0
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} objectReference: {fileID: 0}
--- !u!4 &183708906 - target: {fileID: 8781564214016862072, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
Transform: propertyPath: data
m_ObjectHideFlags: 0 value:
m_CorrespondingSourceObject: {fileID: 0} objectReference: {fileID: 11400000, guid: 38f76e60d5df1d445a455c63a88da8e1, type: 2}
m_PrefabInstance: {fileID: 0} - target: {fileID: 8781564214893312972, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_PrefabAsset: {fileID: 0} propertyPath: _id
m_GameObject: {fileID: 183708901} value: 1
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} objectReference: {fileID: 0}
m_LocalPosition: {x: 0, y: 0, z: 0} m_RemovedComponents: []
m_LocalScale: {x: 2, y: 2, z: 2} m_SourcePrefab: {fileID: 100100000, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
m_Children: []
m_Father: {fileID: 1881828094}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &349701919 --- !u!1 &349701919
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -891,6 +847,71 @@ Rigidbody:
m_Interpolate: 0 m_Interpolate: 0
m_Constraints: 112 m_Constraints: 112
m_CollisionDetection: 1 m_CollisionDetection: 1
--- !u!1001 &1390721954
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 8781564213167799763, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_Name
value: Artefact2
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_RootOrder
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalPosition.x
value: -22.13
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalPosition.z
value: 38.53155
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8781564213167799764, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8781564214016862072, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: data
value:
objectReference: {fileID: 11400000, guid: 4c18fa3513891124282e56285b09c211, type: 2}
- target: {fileID: 8781564214893312972, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
propertyPath: _id
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2dae894ec500e524a88f985657f9682d, type: 3}
--- !u!1 &1444606336 --- !u!1 &1444606336
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1198,162 +1219,6 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 4 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1553332533
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1553332535}
- component: {fileID: 1553332534}
m_Layer: 0
m_Name: Inventory
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1553332534
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553332533}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6be0ffc922ae4ac4cb7568e04674a61c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1553332535
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1553332533}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.079972744, y: -0.13946426, z: 32.651897}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1881828089
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1881828094}
- component: {fileID: 1881828093}
- component: {fileID: 1881828092}
- component: {fileID: 1881828091}
- component: {fileID: 1881828090}
m_Layer: 0
m_Name: Artefact
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1881828090
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1881828089}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e26cf8dbdb474db49ac6dadf49ceade2, type: 3}
m_Name:
m_EditorClassIdentifier:
artefactID: 0
artefactDialogue:
canInteract: 0
--- !u!136 &1881828091
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1881828089}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!23 &1881828092
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1881828089}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
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!33 &1881828093
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1881828089}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1881828094
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1881828089}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.38, y: 0.5, z: 38.53155}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 183708906}
m_Father: {fileID: 0}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1908415559 --- !u!1 &1908415559
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1449,225 +1314,3 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1932564749
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1932564754}
- component: {fileID: 1932564753}
- component: {fileID: 1932564752}
- component: {fileID: 1932564751}
- component: {fileID: 1932564750}
m_Layer: 0
m_Name: Artefact (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1932564750
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932564749}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e26cf8dbdb474db49ac6dadf49ceade2, type: 3}
m_Name:
m_EditorClassIdentifier:
artefactID: 1
artefactDialogue:
canInteract: 0
--- !u!136 &1932564751
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932564749}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 0.5000001
m_Height: 2
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!23 &1932564752
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932564749}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
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!33 &1932564753
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932564749}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1932564754
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932564749}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -12, y: 0.5, z: 46.5}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 2142420295}
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2142420290
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2142420295}
- component: {fileID: 2142420294}
- component: {fileID: 2142420293}
- component: {fileID: 2142420292}
- component: {fileID: 2142420291}
m_Layer: 0
m_Name: Sphere (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2142420291
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142420290}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 44966bb2b773ce145a9d6c7c9f42aeba, type: 3}
m_Name:
m_EditorClassIdentifier:
id: 1
--- !u!135 &2142420292
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142420290}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 4
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &2142420293
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142420290}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
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!33 &2142420294
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142420290}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &2142420295
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2142420290}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 1932564754}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -2,68 +2,18 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class Artefact : MonoBehaviour [CreateAssetMenu(fileName = "New Artefact", menuName = "Artefact", order = 51)]
public class Artefact : ScriptableObject
{ {
public int artefactID; public int artefactID => _artefactID;
public enum Type { PhysicalArtefact, PowerArtefact, WrittenArtefact } [SerializeField] private int _artefactID;
public string artefactDialogue; public string artefactDialogue => _artefactDialogue;
[SerializeField] private string _artefactDialogue;
private bool show = false; public bool show => _show;
public bool canInteract = false; private bool _show = false;
public bool canInteract => _canInteract;
private void Start() private bool _canInteract = false;
{
EventHandler.current.onArtefactTriggerEnter += NearArtefact;
EventHandler.current.onArtefactTriggerExit += AwayArtefact;
EventHandler.current.onArtefactPickUp += PickUp;
}
private void NearArtefact(int id)
{
if(id == this.artefactID)
{
show = true;
this.canInteract = true;
}
}
private void AwayArtefact(int id)
{
if(id == this.artefactID)
{
show = false;
this.canInteract = false;
}
}
private void PickUp(int id)
{
if (id == this.artefactID)
{
if ( canInteract == true )
{
foreach (var x in ArtefactInventory.artefactList)
{
Debug.Log(x.ToString());
}
ArtefactInventory.addA(this);
}
//show artifact dialogue
}
}
void OnGUI()
{
if(show)
{
GUI.Label(new Rect(Screen.width / 2 - 50, 5, 100, 100), "Press E to pickup");
}
}
} }

View File

@ -0,0 +1,81 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ArtefactControl : MonoBehaviour
{
private bool _show;
private bool _canInteract;
[SerializeField]
private Artefact data;
public int artefactID => _artefactID;
private int _artefactID;
private string _artefactDialogue;
private void Start()
{
_artefactID = data.artefactID;
_artefactDialogue = data.artefactDialogue;
_show = data.show;
_canInteract = data.canInteract;
EventHandler.current.onArtefactTriggerEnter += NearArtefact;
EventHandler.current.onArtefactTriggerExit += AwayArtefact;
EventHandler.current.onArtefactPickUp += PickUp;
}
private void NearArtefact(int id)
{
if (id == this._artefactID)
{
_show = true;
this._canInteract = true;
}
}
private void AwayArtefact(int id)
{
if (id == this._artefactID)
{
_show = false;
this._canInteract = false;
}
}
private void PickUp(int id)
{
if (id == this._artefactID)
{
if (_canInteract == true)
{
ArtefactInventory.addA(data);
foreach (var x in ArtefactInventory.artefactList)
{
Debug.Log(x.ToString());
}
}
//here put 'show artifact dialogue'
if (this.gameObject != null)
Destroy(this.gameObject);
PlayerInputHandler.id = 0;
}
}
void OnGUI()
{
if (_show)
{
GUI.Label(new Rect(Screen.width / 2 - 50, 5, 100, 100), "Press E to pickup");
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7d3ed39e75807bc4d865f39b2ef9ea69
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -3,7 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class ArtefactInventory : MonoBehaviour public class ArtefactInventory : ScriptableObject
{ {
public static List<Artefact> artefactList = new List<Artefact>(); public static List<Artefact> artefactList = new List<Artefact>();
private static bool exists = false; private static bool exists = false;
@ -23,8 +23,6 @@ public class ArtefactInventory : MonoBehaviour
artefactList.Add(a); artefactList.Add(a);
} }
} }

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 73c4cfa51bc2a6b40810cb5b784f15a8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e26cf8dbdb474db49ac6dadf49ceade2, type: 3}
m_Name: Artefact1
m_EditorClassIdentifier:
_artefactID: 1
_artefactDialogue:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 38f76e60d5df1d445a455c63a88da8e1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e26cf8dbdb474db49ac6dadf49ceade2, type: 3}
m_Name: Artefact2
m_EditorClassIdentifier:
_artefactID: 2
_artefactDialogue:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4c18fa3513891124282e56285b09c211
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -4,16 +4,19 @@ using UnityEngine;
public class ArtefactTriggerArea : MonoBehaviour public class ArtefactTriggerArea : MonoBehaviour
{ {
public int id; public int id => _id;
[SerializeField] private int _id;
private void OnTriggerEnter(Collider Player) private void OnTriggerEnter(Collider Player)
{ {
EventHandler.current.ArtefactTriggerEnter(id); EventHandler.current.ArtefactTriggerEnter(_id);
PlayerInputHandler.id = id; PlayerInputHandler.id = _id;
} }
private void OnTriggerExit(Collider Player) private void OnTriggerExit(Collider Player)
{ {
EventHandler.current.ArtefactTriggerExit(id); EventHandler.current.ArtefactTriggerExit(_id);
PlayerInputHandler.id = 0;
} }
} }

View File

@ -7,7 +7,12 @@ using UnityEngine.InputSystem;
public class PlayerInputHandler : MonoBehaviour public class PlayerInputHandler : MonoBehaviour
{ {
//to get the artifact id you are near to //to get the artifact id you are near to
public static int id; private static int _id;
public static int id
{
get { return _id; }
set { _id = value; }
}
[SerializeField] [SerializeField]
private PlayerInputSettings _inputSettings; private PlayerInputSettings _inputSettings;
@ -55,11 +60,9 @@ public class PlayerInputHandler : MonoBehaviour
public void Jump(InputAction.CallbackContext context) public void Jump(InputAction.CallbackContext context)
=> _state.Jump.Set(context.ReadValue<float>() > 0.5f); => _state.Jump.Set(context.ReadValue<float>() > 0.5f);
// public void Use( InputAction.CallbackContext context )
// => _state.Use.Set( context.ReadValue<float>() > 0.5f );
public void Use(InputAction.CallbackContext context) public void Use(InputAction.CallbackContext context)
{ {
//Debug.Log("pressed e"); if(context.started)
EventHandler.current.ArtefactPickUp(id); EventHandler.current.ArtefactPickUp(_id);
} }
} }