diff --git a/Assets/Prefab/Gameplay/BaseSphere.prefab b/Assets/Prefab/Gameplay/BaseSphere.prefab new file mode 100644 index 0000000..4f8c9b9 --- /dev/null +++ b/Assets/Prefab/Gameplay/BaseSphere.prefab @@ -0,0 +1,176 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &7979385610396712053 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3168027658201720378} + - component: {fileID: 5246558747139728538} + - component: {fileID: 242555714111735108} + - component: {fileID: 4435893386940746007} + - component: {fileID: 2552293626926492943} + - component: {fileID: 3427371979469557628} + - component: {fileID: 1157280543463811332} + - component: {fileID: 9140300362975493256} + m_Layer: 0 + m_Name: BaseSphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3168027658201720378 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5246558747139728538 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &242555714111735108 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + 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!54 &4435893386940746007 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + serializedVersion: 4 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!135 &2552293626926492943 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &3427371979469557628 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1157280543463811332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3} + m_Name: + m_EditorClassIdentifier: + isActive: 1 +--- !u!114 &9140300362975493256 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7979385610396712053} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 06015834a0da4561ba47d104b73171a4, type: 3} + m_Name: + m_EditorClassIdentifier: + isActive: 1 diff --git a/Assets/Prefab/Gameplay/BaseSphere.prefab.meta b/Assets/Prefab/Gameplay/BaseSphere.prefab.meta new file mode 100644 index 0000000..331c099 --- /dev/null +++ b/Assets/Prefab/Gameplay/BaseSphere.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9fc63211af583b946b1f381e4bf38ddf +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefab/Gameplay/Emitter.prefab b/Assets/Prefab/Gameplay/Emitter.prefab new file mode 100644 index 0000000..5a77ddd --- /dev/null +++ b/Assets/Prefab/Gameplay/Emitter.prefab @@ -0,0 +1,185 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &355226479770162782 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 119873216418816890} + m_Layer: 0 + m_Name: EmitPoint + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &119873216418816890 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 355226479770162782} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.31} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6816993876749013545} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &5873928673589519195 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6816993876749013545} + - component: {fileID: 7587903706495042174} + - component: {fileID: 9191155306757799119} + - component: {fileID: 8846970934275178021} + - component: {fileID: 1219148107627415208} + - component: {fileID: 8496958603087533895} + - component: {fileID: 7351527485767933101} + m_Layer: 0 + m_Name: Emitter + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6816993876749013545 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 20, y: 1.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 119873216418816890} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &7587903706495042174 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &9191155306757799119 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + 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!65 &8846970934275178021 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &1219148107627415208 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7986c88b8e1d4944832af56e23188597, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &8496958603087533895 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2791e039b8344f45ad6dc86f5188d82d, type: 3} + m_Name: + m_EditorClassIdentifier: + isActive: 1 +--- !u!114 &7351527485767933101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5873928673589519195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1a5a563132c84e50b983b557eb3da442, type: 3} + m_Name: + m_EditorClassIdentifier: + prefabToEmit: {fileID: 7979385610396712053, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + emitPoint: {fileID: 119873216418816890} + emitDirection: {x: 0, y: 0, z: 1} + emitForce: 10 + emitInterval: 1 diff --git a/Assets/Prefab/Gameplay/Emitter.prefab.meta b/Assets/Prefab/Gameplay/Emitter.prefab.meta new file mode 100644 index 0000000..f515885 --- /dev/null +++ b/Assets/Prefab/Gameplay/Emitter.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dbf59764203ca4645a295e650a306b7b +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Test.unity b/Assets/Scenes/Test.unity index 4252e5c..286bede 100644 --- a/Assets/Scenes/Test.unity +++ b/Assets/Scenes/Test.unity @@ -916,6 +916,74 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 781c629235eee4f4eb34f1e763aa7f67, type: 3} +--- !u!1001 &1549323716 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalPosition.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.8 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalPosition.z + value: -5 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2356242250385391551, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6227019518059310355, guid: be07db3098b709a40a6965f50f8c9640, + type: 3} + propertyPath: m_Name + value: Lever (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: be07db3098b709a40a6965f50f8c9640, type: 3} --- !u!1001 &1751629950 PrefabInstance: m_ObjectHideFlags: 0 @@ -1219,6 +1287,74 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b259f2c2ad8200d49b8ba9163724d69a, type: 3} +--- !u!1001 &1035971231385273297 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3168027658201720378, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7979385610396712053, guid: 9fc63211af583b946b1f381e4bf38ddf, + type: 3} + propertyPath: m_Name + value: BaseSphere + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9fc63211af583b946b1f381e4bf38ddf, type: 3} --- !u!1001 &1781028406820323425 PrefabInstance: m_ObjectHideFlags: 0 @@ -1423,6 +1559,74 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 17ad2833fef1bc044bcc25a227730d74, type: 3} +--- !u!1001 &4550639332017178188 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 5873928673589519195, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_Name + value: Emitter + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalPosition.x + value: 20 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalPosition.y + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6816993876749013545, guid: dbf59764203ca4645a295e650a306b7b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: dbf59764203ca4645a295e650a306b7b, type: 3} --- !u!1001 &6191742170513974480 PrefabInstance: m_ObjectHideFlags: 0 @@ -1728,11 +1932,14 @@ SceneRoots: - {fileID: 1948851238} - {fileID: 993640446} - {fileID: 2032802597} + - {fileID: 4550639332017178188} - {fileID: 1781028406820323425} + - {fileID: 1035971231385273297} - {fileID: 366996911271636373} - {fileID: 6191742170513974480} - {fileID: 1240498723} - {fileID: 473911345} - {fileID: 865274353} - {fileID: 6350903300567888677} + - {fileID: 1549323716} - {fileID: 3372472533242412945} diff --git a/Assets/Script/Gameplay/Facility/ButtonInteractController.cs b/Assets/Script/Gameplay/Facility/ButtonInteractController.cs index 8a166cb..c442692 100644 --- a/Assets/Script/Gameplay/Facility/ButtonInteractController.cs +++ b/Assets/Script/Gameplay/Facility/ButtonInteractController.cs @@ -53,7 +53,7 @@ namespace Script.Gameplay.Facility [SerializeField] private bool isActive = true; - public bool IsActive + public bool IsEditableActive { get => isActive; set diff --git a/Assets/Script/Gameplay/Facility/ColliderEditableController.cs b/Assets/Script/Gameplay/Facility/ColliderEditableController.cs index 3eb87b6..7e14ac1 100644 --- a/Assets/Script/Gameplay/Facility/ColliderEditableController.cs +++ b/Assets/Script/Gameplay/Facility/ColliderEditableController.cs @@ -8,7 +8,7 @@ namespace Script.Gameplay.Facility { [SerializeField] private bool isActive = true; - public bool IsActive + public bool IsEditableActive { get => isActive; set diff --git a/Assets/Script/Gameplay/Facility/DoorInteractController.cs b/Assets/Script/Gameplay/Facility/DoorInteractController.cs index 92de6a1..f105438 100644 --- a/Assets/Script/Gameplay/Facility/DoorInteractController.cs +++ b/Assets/Script/Gameplay/Facility/DoorInteractController.cs @@ -62,9 +62,9 @@ namespace Script.Gameplay.Facility #region EditableComponent - [SerializeField] private bool isActive = true; + private bool isActive = true; - public bool IsActive + public bool IsEditableActive { get => isActive; set diff --git a/Assets/Script/Gameplay/Facility/EmitterController.cs b/Assets/Script/Gameplay/Facility/EmitterController.cs new file mode 100644 index 0000000..08b8188 --- /dev/null +++ b/Assets/Script/Gameplay/Facility/EmitterController.cs @@ -0,0 +1,77 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Script.Gameplay.Connect; +using Script.Gameplay.Interface; + +namespace Script.Gameplay.Facility +{ + public class EmitterController : MonoBehaviour, IEditableComponent, IConnectable + { + [Header("发射器设置")] + [SerializeField] private GameObject prefabToEmit; + [SerializeField] private Transform emitPoint; + [SerializeField] private Vector3 emitDirection = Vector3.forward; + [SerializeField] private float emitForce = 10f; + [SerializeField] private float emitInterval = 1f; + [Header("生成对象销毁时间")] + [SerializeField] private float destroyDelay = 5f; // 生成对象多少秒后销毁 + + private Coroutine emitCoroutine; + + // 不可交互 + // 可编辑 + public bool IsEditableActive { get; set; } = true; + public string ComponentName { get; set; } = "Emitter"; + public LockLevel LockLevel => LockLevel.Red; + + // 可连线 + public List ConnectionLines { get; set; } = new List(); + public void OnGazeEnter() { } + public void OnGazeExit() { } + public Vector3 GetPosition() => transform.position; + public GameObject GetGameObject() => gameObject; + public string GetConnectableName() => gameObject.name; + + // 接收信号 + public void SignalActive(bool active, GameObject sender) + { + if(!IsEditableActive) return; + if (active) + { + if (emitCoroutine == null) + emitCoroutine = StartCoroutine(EmitRoutine()); + } + else + { + if (emitCoroutine != null) + { + StopCoroutine(emitCoroutine); + emitCoroutine = null; + } + } + } + + private IEnumerator EmitRoutine() + { + while (true) + { + Emit(); + yield return new WaitForSeconds(emitInterval); + } + } + + private void Emit() + { + if (prefabToEmit == null || emitPoint == null) return; + var obj = Instantiate(prefabToEmit, emitPoint.position, emitPoint.rotation); + var rb = obj.GetComponent(); + if (rb != null) + { + rb.AddForce(emitPoint.TransformDirection(emitDirection.normalized) * emitForce, ForceMode.Impulse); + } + // 添加销毁逻辑 + Destroy(obj, destroyDelay); + } + } +} diff --git a/Assets/Script/Gameplay/Facility/EmitterController.cs.meta b/Assets/Script/Gameplay/Facility/EmitterController.cs.meta new file mode 100644 index 0000000..fc08408 --- /dev/null +++ b/Assets/Script/Gameplay/Facility/EmitterController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1a5a563132c84e50b983b557eb3da442 +timeCreated: 1761028056 \ No newline at end of file diff --git a/Assets/Script/Gameplay/Facility/LeverInteractController.cs b/Assets/Script/Gameplay/Facility/LeverInteractController.cs index 3ff43e6..d9fe86c 100644 --- a/Assets/Script/Gameplay/Facility/LeverInteractController.cs +++ b/Assets/Script/Gameplay/Facility/LeverInteractController.cs @@ -42,7 +42,7 @@ namespace Script.Gameplay.Facility [SerializeField] private bool isActive = true; - public bool IsActive + public bool IsEditableActive { get => isActive; set diff --git a/Assets/Script/Gameplay/Facility/PressurePlateController.cs b/Assets/Script/Gameplay/Facility/PressurePlateController.cs index 657c25d..cd1b457 100644 --- a/Assets/Script/Gameplay/Facility/PressurePlateController.cs +++ b/Assets/Script/Gameplay/Facility/PressurePlateController.cs @@ -28,7 +28,7 @@ namespace Script.Gameplay.Facility #region EditableComponent - public bool IsActive + public bool IsEditableActive { get => isActive; set => isActive = value; diff --git a/Assets/Script/Gameplay/Facility/RigidbodyEditableController.cs b/Assets/Script/Gameplay/Facility/RigidbodyEditableController.cs index cdf43dc..6346875 100644 --- a/Assets/Script/Gameplay/Facility/RigidbodyEditableController.cs +++ b/Assets/Script/Gameplay/Facility/RigidbodyEditableController.cs @@ -8,7 +8,7 @@ namespace Script.Gameplay.Facility { [SerializeField] private bool isActive = true; - public bool IsActive + public bool IsEditableActive { get => isActive; set diff --git a/Assets/Script/Gameplay/Interface/IEditableComponent.cs b/Assets/Script/Gameplay/Interface/IEditableComponent.cs index ab069b0..cb59fbe 100644 --- a/Assets/Script/Gameplay/Interface/IEditableComponent.cs +++ b/Assets/Script/Gameplay/Interface/IEditableComponent.cs @@ -9,7 +9,7 @@ namespace Script.Gameplay.Interface public interface IEditableComponent { - public bool IsActive { get; set; } + public bool IsEditableActive { get; set; } public string ComponentName { get; set; } public LockLevel LockLevel { get; } } diff --git a/Assets/Script/Gameplay/Player/PlayerInteractorController.cs b/Assets/Script/Gameplay/Player/PlayerInteractorController.cs index 524a540..812ec55 100644 --- a/Assets/Script/Gameplay/Player/PlayerInteractorController.cs +++ b/Assets/Script/Gameplay/Player/PlayerInteractorController.cs @@ -81,7 +81,7 @@ namespace Script.Gameplay.Player { hitInteractable.OnGazeEnter(this.gameObject); // 这里可以显示交互提示UI,例如 “E - 开门” - Debug.Log(hitInteractable.GetInteractPrompt()); + //Debug.Log(hitInteractable.GetInteractPrompt()); } previousGazedTarget = hitInteractable; diff --git a/Assets/Script/Gameplay/UI/EditableComponentViewer.cs b/Assets/Script/Gameplay/UI/EditableComponentViewer.cs index 133c8c4..1fe6d61 100644 --- a/Assets/Script/Gameplay/UI/EditableComponentViewer.cs +++ b/Assets/Script/Gameplay/UI/EditableComponentViewer.cs @@ -24,7 +24,7 @@ namespace UI private void OnClickButton() { - _component.IsActive = !_component.IsActive; + _component.IsEditableActive = !_component.IsEditableActive; RefreshUI(); } @@ -33,7 +33,7 @@ namespace UI if (_component != null) { componentName.text = _component.ComponentName; - componentState.text = _component.IsActive ? "Active" : "Inactive"; + componentState.text = _component.IsEditableActive ? "Active" : "Inactive"; } } }