diff --git a/Assets/GameData/Game/BreakableCrystal.meta b/Assets/GameData/Game/BreakableCrystal.meta new file mode 100644 index 0000000000..3157716879 --- /dev/null +++ b/Assets/GameData/Game/BreakableCrystal.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71461e10ac53f4c11868aed1435fc130 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/Game/BreakableCrystal/BaseHP.asset b/Assets/GameData/Game/BreakableCrystal/BaseHP.asset new file mode 100644 index 0000000000..11134efb85 --- /dev/null +++ b/Assets/GameData/Game/BreakableCrystal/BaseHP.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91d0103ab97ba1ce721cb53fb473898e223278cd299827570eb2ec9d344f163a +size 407 diff --git a/Assets/GameData/Game/BreakableCrystal/BaseHP.asset.meta b/Assets/GameData/Game/BreakableCrystal/BaseHP.asset.meta new file mode 100644 index 0000000000..903b8f0f5d --- /dev/null +++ b/Assets/GameData/Game/BreakableCrystal/BaseHP.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35bb8d80ab89bf64aa87c6e1a7863370 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/Game/BreakablePillar.meta b/Assets/GameData/Game/BreakablePillar.meta new file mode 100644 index 0000000000..48a5dd901a --- /dev/null +++ b/Assets/GameData/Game/BreakablePillar.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba81fbd6f5a39475a834b654373f9a87 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/Game/BreakablePillar/BaseHP.asset b/Assets/GameData/Game/BreakablePillar/BaseHP.asset new file mode 100644 index 0000000000..43ec6dd747 --- /dev/null +++ b/Assets/GameData/Game/BreakablePillar/BaseHP.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94d6f2f66c38f80b44fb3c2451fc2120736b8685ed93b3223eb6b1545380f727 +size 406 diff --git a/Assets/GameData/Game/BreakablePillar/BaseHP.asset.meta b/Assets/GameData/Game/BreakablePillar/BaseHP.asset.meta new file mode 100644 index 0000000000..1f08b943c9 --- /dev/null +++ b/Assets/GameData/Game/BreakablePillar/BaseHP.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e56e91693df2421190b5c79ce9630a6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/Game/BreakablePot.meta b/Assets/GameData/Game/BreakablePot.meta new file mode 100644 index 0000000000..4d09c19ad6 --- /dev/null +++ b/Assets/GameData/Game/BreakablePot.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e8f7cd106c2404c76819baf4b3e20c4d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/Game/BreakablePot/BaseHP.asset b/Assets/GameData/Game/BreakablePot/BaseHP.asset new file mode 100644 index 0000000000..b995eff1e3 --- /dev/null +++ b/Assets/GameData/Game/BreakablePot/BaseHP.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4ee715ca09c30156b890781af1d726fce76d34784a8b9bd62e84572dc13663c +size 406 diff --git a/Assets/GameData/Game/BreakablePot/BaseHP.asset.meta b/Assets/GameData/Game/BreakablePot/BaseHP.asset.meta new file mode 100644 index 0000000000..5147455497 --- /dev/null +++ b/Assets/GameData/Game/BreakablePot/BaseHP.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c38b94dde37df4242a38c9257c303417 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameData/Game/EnemySpawner/BaseHP.asset b/Assets/GameData/Game/EnemySpawner/BaseHP.asset index 11134efb85..43ec6dd747 100644 --- a/Assets/GameData/Game/EnemySpawner/BaseHP.asset +++ b/Assets/GameData/Game/EnemySpawner/BaseHP.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:91d0103ab97ba1ce721cb53fb473898e223278cd299827570eb2ec9d344f163a -size 407 +oid sha256:94d6f2f66c38f80b44fb3c2451fc2120736b8685ed93b3223eb6b1545380f727 +size 406 diff --git a/Assets/GameData/Game/EnemySpawner/BaseHP.asset.meta b/Assets/GameData/Game/EnemySpawner/BaseHP.asset.meta index 903b8f0f5d..d67ccf07fe 100644 --- a/Assets/GameData/Game/EnemySpawner/BaseHP.asset.meta +++ b/Assets/GameData/Game/EnemySpawner/BaseHP.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 35bb8d80ab89bf64aa87c6e1a7863370 +guid: 0ea073444920f455e9b4769e970d81d8 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Prefabs/Game/BreakablePillar.prefab b/Assets/Prefabs/Game/BreakablePillar.prefab index 7aee6489b7..c6b52761e1 100644 --- a/Assets/Prefabs/Game/BreakablePillar.prefab +++ b/Assets/Prefabs/Game/BreakablePillar.prefab @@ -13,6 +13,7 @@ GameObject: - component: {fileID: -8903857516321632127} - component: {fileID: 1460791283510277443} - component: {fileID: 6825752226794478105} + - component: {fileID: 3685607156052711833} m_Layer: 6 m_Name: BreakablePillar m_TagString: Untagged @@ -27,6 +28,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 884761565141663561} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} @@ -34,7 +36,6 @@ Transform: m_Children: - {fileID: 5054035021295717131} m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &-8668463530818694599 MonoBehaviour: @@ -48,10 +49,19 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} m_Name: m_EditorClassIdentifier: - GlobalObjectIdHash: 951099334 + GlobalObjectIdHash: 2025222722 + InScenePlacedSourceGlobalObjectIdHash: 0 + DeferredDespawnTick: 0 + Ownership: 1 AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 1 + SpawnWithObservers: 1 DontDestroyWithOwner: 0 AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 --- !u!114 &-8903857516321632127 MonoBehaviour: m_ObjectHideFlags: 0 @@ -64,8 +74,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eb44a31731a459546bdf01f1af48173c, type: 3} m_Name: m_EditorClassIdentifier: - m_MaxHealth: {fileID: 0} - m_NetworkHealthState: {fileID: 0} + ShowTopMostFoldoutHeaderGroup: 1 + m_MaxHealth: {fileID: 11400000, guid: 8e56e91693df2421190b5c79ce9630a6, type: 2} + m_NetworkHealthState: {fileID: 3685607156052711833} m_Collider: {fileID: 1460791283510277443} m_SpecialDamageFlags: 6 m_BrokenPrefab: {fileID: 6418514439632820891, guid: 78436b90c00aaab49b4d522550dd9250, type: 3} @@ -73,8 +84,6 @@ MonoBehaviour: m_BrokenPrefabPos: {fileID: 4505851899529102149} m_UnbrokenGameObjects: - {fileID: 3658718798844854089} - IsBroken: - m_InternalValue: 0 --- !u!65 &1460791283510277443 BoxCollider: m_ObjectHideFlags: 0 @@ -83,9 +92,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 884761565141663561} 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: 2 + serializedVersion: 3 m_Size: {x: 3.54, y: 8.287147, z: 3.8} m_Center: {x: 1.18, y: 4.1465364, z: 2} --- !u!54 &6825752226794478105 @@ -95,20 +112,47 @@ Rigidbody: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 884761565141663561} - serializedVersion: 2 + 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: 126 m_CollisionDetection: 0 +--- !u!114 &3685607156052711833 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 884761565141663561} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6733907396f36c44891916e5c62f25a0, type: 3} + m_Name: + m_EditorClassIdentifier: + ShowTopMostFoldoutHeaderGroup: 1 + HitPoints: + m_InternalValue: 0 --- !u!1001 &2926384259182416435 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 4505851899529102149} m_Modifications: - target: {fileID: 1899106884463111546, guid: db56f0a4295d95540b4d07fcd18c49e9, type: 3} @@ -160,12 +204,15 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} - target: {fileID: 8184890942973508939, guid: db56f0a4295d95540b4d07fcd18c49e9, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 08a6ed3e19879c844a1bb6d8f07e2653, type: 2} m_RemovedComponents: - {fileID: 0} - {fileID: 0} + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: db56f0a4295d95540b4d07fcd18c49e9, type: 3} --- !u!1 &3658718798844854089 stripped GameObject: diff --git a/Assets/Prefabs/Game/BreakablePot.prefab b/Assets/Prefabs/Game/BreakablePot.prefab index 0abf296629..75a0b47572 100644 --- a/Assets/Prefabs/Game/BreakablePot.prefab +++ b/Assets/Prefabs/Game/BreakablePot.prefab @@ -12,6 +12,7 @@ GameObject: - component: {fileID: -8668463530818694599} - component: {fileID: -8903857516321632127} - component: {fileID: 8991873088713291135} + - component: {fileID: 5185361255833847072} m_Layer: 6 m_Name: BreakablePot m_TagString: Untagged @@ -26,6 +27,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 884761565141663561} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} @@ -33,7 +35,6 @@ Transform: m_Children: - {fileID: 1927651668276376163} m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &-8668463530818694599 MonoBehaviour: @@ -47,10 +48,19 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} m_Name: m_EditorClassIdentifier: - GlobalObjectIdHash: 951099334 + GlobalObjectIdHash: 2007482658 + InScenePlacedSourceGlobalObjectIdHash: 0 + DeferredDespawnTick: 0 + Ownership: 0 AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 1 + SpawnWithObservers: 1 DontDestroyWithOwner: 0 AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 --- !u!114 &-8903857516321632127 MonoBehaviour: m_ObjectHideFlags: 0 @@ -63,8 +73,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eb44a31731a459546bdf01f1af48173c, type: 3} m_Name: m_EditorClassIdentifier: - m_MaxHealth: {fileID: 0} - m_NetworkHealthState: {fileID: 0} + ShowTopMostFoldoutHeaderGroup: 1 + m_MaxHealth: {fileID: 11400000, guid: 0ea073444920f455e9b4769e970d81d8, type: 2} + m_NetworkHealthState: {fileID: 5185361255833847072} m_Collider: {fileID: 8991873088713291135} m_SpecialDamageFlags: 0 m_BrokenPrefab: {fileID: 1001931975397017578, guid: 03e282e700b05664daab32d4e7965212, type: 3} @@ -72,8 +83,6 @@ MonoBehaviour: m_BrokenPrefabPos: {fileID: 1927651668276376163} m_UnbrokenGameObjects: - {fileID: 598843305552521647} - IsBroken: - m_InternalValue: 0 --- !u!136 &8991873088713291135 CapsuleCollider: m_ObjectHideFlags: 0 @@ -82,17 +91,42 @@ CapsuleCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 884761565141663561} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 + serializedVersion: 2 m_Radius: 1 m_Height: 2 m_Direction: 1 m_Center: {x: 0, y: 1, z: 0} +--- !u!114 &5185361255833847072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 884761565141663561} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6733907396f36c44891916e5c62f25a0, type: 3} + m_Name: + m_EditorClassIdentifier: + ShowTopMostFoldoutHeaderGroup: 1 + HitPoints: + m_InternalValue: 0 --- !u!1001 &3811502052812393529 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 4505851899529102149} m_Modifications: - target: {fileID: -2116509465241817417, guid: e5e46d03def7870439c2e42d5601394c, type: 3} @@ -153,6 +187,9 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: - {fileID: -2116509465241817417, guid: e5e46d03def7870439c2e42d5601394c, type: 3} + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: e5e46d03def7870439c2e42d5601394c, type: 3} --- !u!1 &598843305552521647 stripped GameObject: diff --git a/Assets/Prefabs/Game/EnemySpawner.prefab b/Assets/Prefabs/Game/EnemySpawner.prefab index 0e18d957f9..a37b84602f 100644 --- a/Assets/Prefabs/Game/EnemySpawner.prefab +++ b/Assets/Prefabs/Game/EnemySpawner.prefab @@ -23,13 +23,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 155104353979914249} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -0.126, y: 0, z: 3.961} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &572801228535962899 GameObject: @@ -54,13 +54,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 572801228535962899} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: 0.721057, y: 0, z: 3.167} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &1898120149362029613 GameObject: @@ -85,13 +85,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1898120149362029613} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -0.87499994, y: 0, z: 1.73} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &2091269911110589480 GameObject: @@ -116,13 +116,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2091269911110589480} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: 0.721057, y: 0, z: 1.73} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &2959670893143433028 GameObject: @@ -147,13 +147,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2959670893143433028} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -0.126, y: 0, z: 2.298} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &3496698763770893301 GameObject: @@ -178,13 +178,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3496698763770893301} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -1.722057, y: 0, z: 2.298} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &3529278057740772152 GameObject: @@ -209,13 +209,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3529278057740772152} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: 0.72, y: 0, z: 4.495} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &5320772107039249662 GameObject: @@ -243,13 +243,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5320772107039249662} + serializedVersion: 2 m_LocalRotation: {x: 0.101853095, y: 0.6945488, z: -0.09773653, w: 0.7054613} m_LocalPosition: {x: -3.04, y: 4.15, z: 3.38} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 16.229, y: 89.137, z: 0.214} --- !u!108 &8359276894067931483 Light: @@ -259,9 +259,8 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5320772107039249662} m_Enabled: 1 - serializedVersion: 10 + serializedVersion: 11 m_Type: 0 - m_Shape: 0 m_Color: {r: 1, g: 0.38823533, b: 0.6023529, a: 1} m_Intensity: 226.45 m_Range: 22.1 @@ -311,8 +310,12 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 --- !u!114 &994603640378809307 MonoBehaviour: m_ObjectHideFlags: 0 @@ -341,14 +344,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 + m_Version: 3 m_UsePipelineSettings: 1 m_AdditionalLightsShadowResolutionTier: 2 m_LightLayerMask: 1 + m_RenderingLayers: 1 m_CustomShadowLayers: 0 m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 1 --- !u!1 &6205854018081152875 GameObject: m_ObjectHideFlags: 0 @@ -362,6 +368,7 @@ GameObject: - component: {fileID: 4844841199312666291} - component: {fileID: 4501025776099328933} - component: {fileID: 5343699662503375493} + - component: {fileID: 6564491022050697330} m_Layer: 6 m_Name: EnemySpawner m_TagString: Untagged @@ -376,6 +383,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6205854018081152875} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} @@ -395,7 +403,6 @@ Transform: - {fileID: 3127061543440710862} - {fileID: 5949595974590154644} m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &-1287160331463954971 MonoBehaviour: @@ -409,10 +416,19 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} m_Name: m_EditorClassIdentifier: - GlobalObjectIdHash: 951099334 + GlobalObjectIdHash: 3580920066 + InScenePlacedSourceGlobalObjectIdHash: 0 + DeferredDespawnTick: 0 + Ownership: 1 AlwaysReplicateAsRoot: 0 + SynchronizeTransform: 1 + ActiveSceneSynchronization: 0 + SceneMigrationSynchronization: 1 + SpawnWithObservers: 1 DontDestroyWithOwner: 0 AutoObjectParentSync: 1 + SyncOwnerTransformWhenParented: 1 + AllowOwnerToParent: 0 --- !u!114 &4844841199312666291 MonoBehaviour: m_ObjectHideFlags: 0 @@ -425,6 +441,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 49b962917cae99f48a2a598485996b8d, type: 3} m_Name: m_EditorClassIdentifier: + ShowTopMostFoldoutHeaderGroup: 1 m_NetworkedPrefab: {fileID: 3713729372785093435, guid: 6cdd52f1fa2ed34469a487ae6477eded, type: 3} m_SpawnPositions: - {fileID: 1718014208199866548} @@ -464,9 +481,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9a7ed35fc071575449a96ece1cc1ae16, type: 3} m_Name: m_EditorClassIdentifier: + ShowTopMostFoldoutHeaderGroup: 1 m_BreakableElements: [] m_DormantCooldown: 180 - m_Breakable: {fileID: 5343699662503375493} + m_PortalBreakable: {fileID: 5343699662503375493} m_WaveSpawner: {fileID: 4844841199312666291} --- !u!114 &5343699662503375493 MonoBehaviour: @@ -480,8 +498,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eb44a31731a459546bdf01f1af48173c, type: 3} m_Name: m_EditorClassIdentifier: - m_MaxHealth: {fileID: 0} - m_NetworkHealthState: {fileID: 0} + ShowTopMostFoldoutHeaderGroup: 1 + m_MaxHealth: {fileID: 11400000, guid: 0ea073444920f455e9b4769e970d81d8, type: 2} + m_NetworkHealthState: {fileID: 6564491022050697330} m_Collider: {fileID: 0} m_SpecialDamageFlags: 0 m_BrokenPrefab: {fileID: 0} @@ -491,7 +510,20 @@ MonoBehaviour: - {fileID: 6584753279329625147} - {fileID: 3587901247331972367} - {fileID: 5320772107039249662} - IsBroken: +--- !u!114 &6564491022050697330 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6205854018081152875} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6733907396f36c44891916e5c62f25a0, type: 3} + m_Name: + m_EditorClassIdentifier: + ShowTopMostFoldoutHeaderGroup: 1 + HitPoints: m_InternalValue: 0 --- !u!1 &6584753279329625147 GameObject: @@ -518,13 +550,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6584753279329625147} + serializedVersion: 2 m_LocalRotation: {x: 0.0000000032984317, y: -0.7071068, z: 0.00000006991402, w: 0.7071067} m_LocalPosition: {x: -0.49, y: 1.8907726, z: 3.22} m_LocalScale: {x: 5.4186263, y: 7.5308495, z: 7.5308475} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: -90, z: 0} --- !u!33 &3943268755573492112 MeshFilter: @@ -551,6 +583,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -599,13 +634,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6585344981094142531} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -0.875, y: 0, z: 3.167} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &8845616318696809149 GameObject: @@ -630,13 +665,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8845616318696809149} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -0.8760569, y: 0, z: 4.495} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1 &9017715703642230324 GameObject: @@ -661,19 +696,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 9017715703642230324} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} m_LocalPosition: {x: -1.722057, y: 0, z: 3.961} m_LocalScale: {x: 1.3539857, y: 1.1857388, z: 1.2418212} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 8727022540156222958} - m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} --- !u!1001 &5856319002020040530 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 8727022540156222958} m_Modifications: - target: {fileID: 6957808770263120477, guid: 4346e17a9c5d6ac4e88839800601d7ff, type: 3} @@ -737,6 +773,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4346e17a9c5d6ac4e88839800601d7ff, type: 3} --- !u!1 &3587901247331972367 stripped GameObject: diff --git a/Assets/Scripts/Gameplay/Action/ConcreteActions/AOEAction.cs b/Assets/Scripts/Gameplay/Action/ConcreteActions/AOEAction.cs index ac32fa0721..4550d810ab 100644 --- a/Assets/Scripts/Gameplay/Action/ConcreteActions/AOEAction.cs +++ b/Assets/Scripts/Gameplay/Action/ConcreteActions/AOEAction.cs @@ -69,7 +69,7 @@ private void PerformAoE(ServerCharacter parent) if (enemy != null) { // actually deal the damage - enemy.ReceiveHP(parent, -Config.Amount); + enemy.ReceiveHitPoints(parent, -Config.Amount); } } } diff --git a/Assets/Scripts/Gameplay/Action/ConcreteActions/DashAttackAction.cs b/Assets/Scripts/Gameplay/Action/ConcreteActions/DashAttackAction.cs index 6f2493e1c2..e8cb8b6709 100644 --- a/Assets/Scripts/Gameplay/Action/ConcreteActions/DashAttackAction.cs +++ b/Assets/Scripts/Gameplay/Action/ConcreteActions/DashAttackAction.cs @@ -103,7 +103,7 @@ private void PerformMeleeAttack(ServerCharacter parent) if (foe != null) { - foe.ReceiveHP(parent, -Config.Amount); + foe.ReceiveHitPoints(parent, -Config.Amount); } } diff --git a/Assets/Scripts/Gameplay/Action/ConcreteActions/FXProjectileTargetedAction.cs b/Assets/Scripts/Gameplay/Action/ConcreteActions/FXProjectileTargetedAction.cs index 2cbf68078a..112ffe3ca6 100644 --- a/Assets/Scripts/Gameplay/Action/ConcreteActions/FXProjectileTargetedAction.cs +++ b/Assets/Scripts/Gameplay/Action/ConcreteActions/FXProjectileTargetedAction.cs @@ -74,7 +74,7 @@ public override bool OnUpdate(ServerCharacter clientCharacter) m_ImpactedTarget = true; if (m_DamageableTarget != null) { - m_DamageableTarget.ReceiveHP(clientCharacter, -Config.Projectiles[0].Damage); + m_DamageableTarget.ReceiveHitPoints(clientCharacter, -Config.Projectiles[0].Damage); } } return true; diff --git a/Assets/Scripts/Gameplay/Action/ConcreteActions/MeleeAction.cs b/Assets/Scripts/Gameplay/Action/ConcreteActions/MeleeAction.cs index e24196ffd8..6d21b62fa1 100644 --- a/Assets/Scripts/Gameplay/Action/ConcreteActions/MeleeAction.cs +++ b/Assets/Scripts/Gameplay/Action/ConcreteActions/MeleeAction.cs @@ -72,7 +72,7 @@ public override bool OnUpdate(ServerCharacter clientCharacter) var foe = DetectFoe(clientCharacter, m_ProvisionalTarget); if (foe != null) { - foe.ReceiveHP(clientCharacter, -Config.Amount); + foe.ReceiveHitPoints(clientCharacter, -Config.Amount); } } diff --git a/Assets/Scripts/Gameplay/Action/ConcreteActions/TrampleAction.cs b/Assets/Scripts/Gameplay/Action/ConcreteActions/TrampleAction.cs index 70fd601ab6..a290037e69 100644 --- a/Assets/Scripts/Gameplay/Action/ConcreteActions/TrampleAction.cs +++ b/Assets/Scripts/Gameplay/Action/ConcreteActions/TrampleAction.cs @@ -172,7 +172,7 @@ private void CollideWithVictim(ServerCharacter parent, ServerCharacter victim) if (victim.gameObject.TryGetComponent(out IDamageable damageable)) { - damageable.ReceiveHP(parent, -damage); + damageable.ReceiveHitPoints(parent, -damage); } } @@ -209,7 +209,7 @@ private void Collide(ServerCharacter parent, Collider collider) var damageable = collider.gameObject.GetComponent(); if (damageable != null) { - damageable.ReceiveHP(parent, -Config.SplashDamage); + damageable.ReceiveHitPoints(parent, -Config.SplashDamage); // lastly, a special case: if the trampler runs into certain breakables, they are stunned! if ((damageable.GetSpecialDamageFlags() & IDamageable.SpecialDamageFlags.StunOnTrample) == IDamageable.SpecialDamageFlags.StunOnTrample) diff --git a/Assets/Scripts/Gameplay/DebugCheats/DebugCheatsManager.cs b/Assets/Scripts/Gameplay/DebugCheats/DebugCheatsManager.cs index 3cdda51044..b57f0ea79f 100644 --- a/Assets/Scripts/Gameplay/DebugCheats/DebugCheatsManager.cs +++ b/Assets/Scripts/Gameplay/DebugCheats/DebugCheatsManager.cs @@ -153,7 +153,7 @@ void ServerKillTargetRpc(RpcParams serverRpcParams = default) var damageable = obj.GetComponent(); if (damageable != null && damageable.IsDamageable()) { - damageable.ReceiveHP(playerServerCharacter, int.MinValue); + damageable.ReceiveHitPoints(playerServerCharacter, int.MinValue); PublishCheatUsedMessage(serverRpcParams.Receive.SenderClientId, "KillTarget"); } else @@ -173,7 +173,7 @@ void ServerKillAllEnemiesRpc(RpcParams serverRpcParams = default) { if (serverCharacter.gameObject.TryGetComponent(out IDamageable damageable)) { - damageable.ReceiveHP(null, -serverCharacter.HitPoints); + damageable.ReceiveHitPoints(null, -serverCharacter.HitPoints); } } } @@ -209,7 +209,7 @@ void ServerHealPlayerRpc(RpcParams serverRpcParams = default) { if (playerServerCharacter.gameObject.TryGetComponent(out IDamageable damageable)) { - damageable.ReceiveHP(null, baseHp); + damageable.ReceiveHitPoints(null, baseHp); } } diff --git a/Assets/Scripts/Gameplay/GameplayObjects/Breakable.cs b/Assets/Scripts/Gameplay/GameplayObjects/Breakable.cs index 7249ef775d..169654cfbb 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/Breakable.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/Breakable.cs @@ -32,29 +32,31 @@ public class Breakable : NetworkBehaviour, IDamageable, ITargetable [Header("Visualization")] [SerializeField] - private GameObject m_BrokenPrefab; + GameObject m_BrokenPrefab; [SerializeField] [Tooltip("If set, will be used instead of BrokenPrefab when new players join, skipping transition effects.")] - private GameObject m_PrebrokenPrefab; + GameObject m_PrebrokenPrefab; [SerializeField] [Tooltip("We use this transform's position and rotation when creating the prefab. (Defaults to self)")] - private Transform m_BrokenPrefabPos; + Transform m_BrokenPrefabPos; [SerializeField] - private GameObject[] m_UnbrokenGameObjects; + GameObject[] m_UnbrokenGameObjects; /// /// Is the item broken or not? /// - public NetworkVariable IsBroken; + public bool IsBroken => m_NetworkHealthState.HitPoints.Value == 0; - public bool IsNpc { get { return true; } } + public event Action Broken; - public bool IsValidTarget { get { return !IsBroken.Value; } } + public bool IsNpc => true; - private GameObject m_CurrentBrokenVisualization; + public bool IsValidTarget => !IsBroken; + + GameObject m_CurrentBrokenVisualization; public override void OnNetworkSpawn() { @@ -68,9 +70,12 @@ public override void OnNetworkSpawn() if (IsClient) { - IsBroken.OnValueChanged += OnBreakableStateChanged; + if (m_NetworkHealthState) + { + m_NetworkHealthState.HitPoints.OnValueChanged += OnHPChanged; + } - if (IsBroken.Value == true) + if (IsBroken) { PerformBreakVisualization(true); } @@ -79,15 +84,15 @@ public override void OnNetworkSpawn() public override void OnNetworkDespawn() { - if (IsClient) + if (IsClient && m_NetworkHealthState) { - IsBroken.OnValueChanged -= OnBreakableStateChanged; + m_NetworkHealthState.HitPoints.OnValueChanged -= OnHPChanged; } } - public void ReceiveHP(ServerCharacter inflicter, int HP) + public void ReceiveHitPoints(ServerCharacter inflicter, int hitPoints) { - if (HP < 0) + if (hitPoints < 0) { if (inflicter && !inflicter.IsNpc) { @@ -99,19 +104,10 @@ public void ReceiveHP(ServerCharacter inflicter, int HP) } } - if (m_NetworkHealthState) + if (m_NetworkHealthState && m_MaxHealth) { m_NetworkHealthState.HitPoints.Value = - Mathf.Clamp(m_NetworkHealthState.HitPoints.Value + HP, 0, m_MaxHealth.Value); - if (m_NetworkHealthState.HitPoints.Value <= 0) - { - Break(); - } - } - else - { - //any damage at all is enough to slay me. - Break(); + Mathf.Clamp(m_NetworkHealthState.HitPoints.Value + hitPoints, 0, m_MaxHealth.Value); } } } @@ -121,20 +117,14 @@ public int GetTotalDamage() return Math.Max(0, m_MaxHealth.Value - m_NetworkHealthState.HitPoints.Value); } - private void Break() + public void Break() { - IsBroken.Value = true; - if (m_Collider) - m_Collider.enabled = false; + m_NetworkHealthState.HitPoints.Value = 0; } public void Unbreak() { - IsBroken.Value = false; - if (m_Collider) - m_Collider.enabled = true; - if (m_MaxHealth && m_NetworkHealthState) - m_NetworkHealthState.HitPoints.Value = m_MaxHealth.Value; + m_NetworkHealthState.HitPoints.Value = m_MaxHealth.Value; } public IDamageable.SpecialDamageFlags GetSpecialDamageFlags() @@ -145,22 +135,31 @@ public IDamageable.SpecialDamageFlags GetSpecialDamageFlags() public bool IsDamageable() { // you can damage this breakable until it's broken! - return !IsBroken.Value; + return !IsBroken; } - private void OnBreakableStateChanged(bool wasBroken, bool isBroken) + void OnHPChanged(int previousValue, int newValue) { - if (!wasBroken && isBroken) + if (IsServer) + { + if (m_Collider) + { + m_Collider.enabled = !IsBroken; + } + } + + if (previousValue > 0 && newValue >= 0) { + Broken?.Invoke(); PerformBreakVisualization(false); } - else if (wasBroken && !isBroken) + else if (previousValue == 0 && newValue > 0) { PerformUnbreakVisualization(); } } - private void PerformBreakVisualization(bool onStart) + void PerformBreakVisualization(bool onStart) { foreach (var unbrokenGameObject in m_UnbrokenGameObjects) { @@ -180,12 +179,13 @@ private void PerformBreakVisualization(bool onStart) } } - private void PerformUnbreakVisualization() + void PerformUnbreakVisualization() { if (m_CurrentBrokenVisualization) { Destroy(m_CurrentBrokenVisualization); } + foreach (var unbrokenGameObject in m_UnbrokenGameObjects) { if (unbrokenGameObject) @@ -196,7 +196,7 @@ private void PerformUnbreakVisualization() } #if UNITY_EDITOR - private void OnValidate() + void OnValidate() { if (!m_Collider) m_Collider = GetComponent(); @@ -207,7 +207,4 @@ private void OnValidate() } #endif } - - } - diff --git a/Assets/Scripts/Gameplay/GameplayObjects/DamageReceiver.cs b/Assets/Scripts/Gameplay/GameplayObjects/DamageReceiver.cs index 5d76422407..ad8e8d971c 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/DamageReceiver.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/DamageReceiver.cs @@ -16,11 +16,11 @@ public class DamageReceiver : NetworkBehaviour, IDamageable [SerializeField] NetworkLifeState m_NetworkLifeState; - public void ReceiveHP(ServerCharacter inflicter, int HP) + public void ReceiveHitPoints(ServerCharacter inflicter, int hitPoints) { if (IsDamageable()) { - DamageReceived?.Invoke(inflicter, HP); + DamageReceived?.Invoke(inflicter, hitPoints); } } diff --git a/Assets/Scripts/Gameplay/GameplayObjects/EnemyPortal.cs b/Assets/Scripts/Gameplay/GameplayObjects/EnemyPortal.cs index ffed31f2f0..b63de4e1bc 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/EnemyPortal.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/EnemyPortal.cs @@ -4,6 +4,7 @@ using Unity.Netcode; using UnityEngine; using UnityEngine.Assertions; +using UnityEngine.Serialization; namespace Unity.BossRoom.Gameplay.GameplayObjects { @@ -31,11 +32,11 @@ public class EnemyPortal : NetworkBehaviour, ITargetable float m_DormantCooldown; [SerializeField] - Breakable m_Breakable; + Breakable m_PortalBreakable; - public bool IsNpc { get { return true; } } + public bool IsNpc => true; - public bool IsValidTarget { get { return !m_Breakable.IsBroken.Value; } } + public bool IsValidTarget => !m_PortalBreakable.IsBroken; // cached reference to our components [SerializeField] @@ -54,7 +55,7 @@ public override void OnNetworkSpawn() foreach (var breakable in m_BreakableElements) { - breakable.IsBroken.OnValueChanged += OnBreakableBroken; + breakable.Broken += OnBreakableBroken; } MaintainState(); @@ -68,29 +69,37 @@ public override void OnNetworkDespawn() foreach (var breakable in m_BreakableElements) { if (breakable) - breakable.IsBroken.OnValueChanged -= OnBreakableBroken; + { + breakable.Broken -= OnBreakableBroken; + } } } - private void OnBreakableBroken(bool wasBroken, bool isBroken) + void OnBreakableBroken() { - if (!wasBroken && isBroken) - MaintainState(); + MaintainState(); } - private void MaintainState() + void MaintainState() { bool hasUnbrokenBreakables = false; foreach (var breakable in m_BreakableElements) { - if (breakable && !breakable.IsBroken.Value) + if (breakable && !breakable.IsBroken) { hasUnbrokenBreakables = true; break; } } - m_Breakable.IsBroken.Value = !hasUnbrokenBreakables; + if (!hasUnbrokenBreakables) + { + m_PortalBreakable.Break(); + } + else + { + m_PortalBreakable.Unbreak(); + } m_WaveSpawner.SetSpawnerEnabled(hasUnbrokenBreakables); if (!hasUnbrokenBreakables && m_CoroDormant == null) { @@ -117,7 +126,7 @@ void Restart() } } - m_Breakable.IsBroken.Value = false; + m_PortalBreakable.Unbreak(); m_WaveSpawner.SetSpawnerEnabled(true); m_CoroDormant = null; } @@ -140,7 +149,7 @@ public void ForceDestroy() { var serverComponent = state.GetComponent(); Assert.IsNotNull(serverComponent); - serverComponent.ReceiveHP(null, Int32.MinValue); + serverComponent.Break(); } } } diff --git a/Assets/Scripts/Gameplay/GameplayObjects/IDamageable.cs b/Assets/Scripts/Gameplay/GameplayObjects/IDamageable.cs index 786eaa2790..8e7682f314 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/IDamageable.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/IDamageable.cs @@ -14,8 +14,8 @@ public interface IDamageable /// Receives HP damage or healing. /// /// The Character responsible for the damage. May be null. - /// The damage done. Negative value is damage, positive is healing. - void ReceiveHP(ServerCharacter inflicter, int HP); + /// The damage done. Negative value is damage, positive is healing. + void ReceiveHitPoints(ServerCharacter inflicter, int hitPoints); /// /// Get the total damage value. diff --git a/Assets/Scripts/Gameplay/GameplayObjects/Projectiles/PhysicsProjectile.cs b/Assets/Scripts/Gameplay/GameplayObjects/Projectiles/PhysicsProjectile.cs index 6701f6a44c..4065ffe9ae 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/Projectiles/PhysicsProjectile.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/Projectiles/PhysicsProjectile.cs @@ -212,7 +212,7 @@ void DetectCollisions() if (m_CollisionCache[i].TryGetComponent(out IDamageable damageable)) { - damageable.ReceiveHP(spawnerObj, -m_ProjectileInfo.Damage); + damageable.ReceiveHitPoints(spawnerObj, -m_ProjectileInfo.Damage); } } diff --git a/Assets/Scripts/Gameplay/GameplayObjects/TossedItem.cs b/Assets/Scripts/Gameplay/GameplayObjects/TossedItem.cs index ea67187979..df8ca34f51 100644 --- a/Assets/Scripts/Gameplay/GameplayObjects/TossedItem.cs +++ b/Assets/Scripts/Gameplay/GameplayObjects/TossedItem.cs @@ -102,7 +102,7 @@ void Detonate() { if (m_CollisionCache[i].gameObject.TryGetComponent(out IDamageable damageReceiver)) { - damageReceiver.ReceiveHP(null, -m_DamagePoints); + damageReceiver.ReceiveHitPoints(null, -m_DamagePoints); var serverCharacter = m_CollisionCache[i].gameObject.GetComponentInParent(); if (serverCharacter) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0daafe68eb..beeaea24ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ Additional documentation and release notes are available at [Multiplayer Documen * Fixed Render Graph API compatibility mode warning and switched active input handling settings to "both" for removing InvalidOperationException (#901) * Fixed error logged when unsubscribing from Session events when removed from a Session (#905) * Fixed error logged when attempting to despawn an already despawned LoadingProgressTracker NetworkObject (#907) +* Fixed error logged when a Melee action was acted on a Breakable object (#908) ## [2.5.0] - 2024-04-18