diff --git a/Assets/Prefabs/RoomSystem/Corridor/Room.prefab b/Assets/Prefabs/RoomSystem/Corridor/Room.prefab index 41a414d8..36a287f2 100644 --- a/Assets/Prefabs/RoomSystem/Corridor/Room.prefab +++ b/Assets/Prefabs/RoomSystem/Corridor/Room.prefab @@ -2801,6 +2801,7 @@ MonoBehaviour: - {fileID: 7646078152559978388, guid: 96efbcbb8de02c04e8828f4c44b0af95, type: 3} - {fileID: 7646078152559978388, guid: 6bd44dba7be27674aae083b13ec033b3, type: 3} - {fileID: 9096874691272071173, guid: df9ca486b9215294b871fe77d6a52372, type: 3} + - {fileID: 462902943475074006, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} --- !u!1 &4171805761210331374 GameObject: m_ObjectHideFlags: 0 @@ -2927,7 +2928,7 @@ Tilemap: second: serializedVersion: 2 m_TileIndex: 3 - m_TileSpriteIndex: 3 + m_TileSpriteIndex: 13 m_TileMatrixIndex: 0 m_TileColorIndex: 0 m_TileObjectToInstantiateIndex: 65535 @@ -2937,7 +2938,7 @@ Tilemap: second: serializedVersion: 2 m_TileIndex: 2 - m_TileSpriteIndex: 2 + m_TileSpriteIndex: 3 m_TileMatrixIndex: 0 m_TileColorIndex: 0 m_TileObjectToInstantiateIndex: 65535 @@ -3242,10 +3243,10 @@ Tilemap: m_Data: {fileID: 0} - m_RefCount: 0 m_Data: {fileID: 0} + - m_RefCount: 0 + m_Data: {fileID: 0} - m_RefCount: 1 m_Data: {fileID: 1129282767, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} - - m_RefCount: 1 - m_Data: {fileID: 916167026, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} - m_RefCount: 2 m_Data: {fileID: -1345423878, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} - m_RefCount: 2 @@ -3264,8 +3265,8 @@ Tilemap: m_Data: {fileID: 693045916, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} - m_RefCount: 1 m_Data: {fileID: 899381424, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} - - m_RefCount: 0 - m_Data: {fileID: 0} + - m_RefCount: 1 + m_Data: {fileID: 916167026, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} - m_RefCount: 1 m_Data: {fileID: 113733329, guid: ad684922a8aff654ebccc527594e7603, type: 3} - m_RefCount: 1 diff --git a/Assets/Prefabs/Traps/Crossbow/crossbow_up_prefab.prefab b/Assets/Prefabs/Traps/Crossbow/crossbow_up_prefab.prefab index d60d93ce..b5140a84 100644 --- a/Assets/Prefabs/Traps/Crossbow/crossbow_up_prefab.prefab +++ b/Assets/Prefabs/Traps/Crossbow/crossbow_up_prefab.prefab @@ -103,7 +103,7 @@ Animator: m_Controller: {fileID: 9100000, guid: cc739925a00880343beac9631c205704, type: 2} m_CullingMode: 0 m_UpdateMode: 0 - m_ApplyRootMotion: 0 + m_ApplyRootMotion: 1 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 m_WarningMessage: diff --git a/Assets/Prefabs/Traps/Spike/Anims/Spike_Anims.anim b/Assets/Prefabs/Traps/Spike/Anims/Spike_Anims.anim index e4c39979..f6c80d31 100644 --- a/Assets/Prefabs/Traps/Spike/Anims/Spike_Anims.anim +++ b/Assets/Prefabs/Traps/Spike/Anims/Spike_Anims.anim @@ -79,7 +79,7 @@ AnimationClip: m_Level: 0 m_CycleOffset: 0 m_HasAdditiveReferencePose: 0 - m_LoopTime: 0 + m_LoopTime: 1 m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 @@ -93,4 +93,18 @@ AnimationClip: m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 - m_Events: [] + m_Events: + - time: 0.25 + functionName: OnTriggered + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 + - time: 0.5833333 + functionName: NotTriggered + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike1.png b/Assets/Prefabs/Traps/Spike/Anims/spike1.png new file mode 100644 index 00000000..2107f086 Binary files /dev/null and b/Assets/Prefabs/Traps/Spike/Anims/spike1.png differ diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike1.png.meta b/Assets/Prefabs/Traps/Spike/Anims/spike1.png.meta new file mode 100644 index 00000000..159c9272 --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/Anims/spike1.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 5eef407e9e0329048b755a57c0ae7dd6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike2.png b/Assets/Prefabs/Traps/Spike/Anims/spike2.png new file mode 100644 index 00000000..f9cfb05f Binary files /dev/null and b/Assets/Prefabs/Traps/Spike/Anims/spike2.png differ diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike2.png.meta b/Assets/Prefabs/Traps/Spike/Anims/spike2.png.meta new file mode 100644 index 00000000..fb7d2d35 --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/Anims/spike2.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: fa9bcd9828f222b4fa72604b98dec555 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike3.png b/Assets/Prefabs/Traps/Spike/Anims/spike3.png new file mode 100644 index 00000000..1c0f3d24 Binary files /dev/null and b/Assets/Prefabs/Traps/Spike/Anims/spike3.png differ diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike3.png.meta b/Assets/Prefabs/Traps/Spike/Anims/spike3.png.meta new file mode 100644 index 00000000..4fb60cf7 --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/Anims/spike3.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 3b0fbf3dc54273b4c81ee77269db46bf +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike4.png b/Assets/Prefabs/Traps/Spike/Anims/spike4.png new file mode 100644 index 00000000..af653464 Binary files /dev/null and b/Assets/Prefabs/Traps/Spike/Anims/spike4.png differ diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike4.png.meta b/Assets/Prefabs/Traps/Spike/Anims/spike4.png.meta new file mode 100644 index 00000000..1663c3b4 --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/Anims/spike4.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: a2e5a9d8d4cb5dd4990aa0a02b8134b1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike5.png b/Assets/Prefabs/Traps/Spike/Anims/spike5.png new file mode 100644 index 00000000..366a85dc Binary files /dev/null and b/Assets/Prefabs/Traps/Spike/Anims/spike5.png differ diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike5.png.meta b/Assets/Prefabs/Traps/Spike/Anims/spike5.png.meta new file mode 100644 index 00000000..b42a4868 --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/Anims/spike5.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 1f8d11698460fad42ac770598f70845a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Traps/Spike/Anims/spike_0.controller b/Assets/Prefabs/Traps/Spike/Anims/spike_0.controller index 8f11c5af..33557877 100644 --- a/Assets/Prefabs/Traps/Spike/Anims/spike_0.controller +++ b/Assets/Prefabs/Traps/Spike/Anims/spike_0.controller @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1102 &-2331107498576567029 +--- !u!1102 &-5084009280774443352 AnimatorState: serializedVersion: 6 m_ObjectHideFlags: 1 @@ -38,7 +38,7 @@ AnimatorController: m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer - m_StateMachine: {fileID: 3745222001488403377} + m_StateMachine: {fileID: 1816624592222796765} m_Mask: {fileID: 0} m_Motions: [] m_Behaviours: [] @@ -48,7 +48,7 @@ AnimatorController: m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} ---- !u!1107 &3745222001488403377 +--- !u!1107 &1816624592222796765 AnimatorStateMachine: serializedVersion: 6 m_ObjectHideFlags: 1 @@ -58,8 +58,8 @@ AnimatorStateMachine: m_Name: Base Layer m_ChildStates: - serializedVersion: 1 - m_State: {fileID: -2331107498576567029} - m_Position: {x: 260, y: 110, z: 0} + m_State: {fileID: -5084009280774443352} + m_Position: {x: 200, y: 0, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] @@ -69,4 +69,4 @@ AnimatorStateMachine: m_EntryPosition: {x: 50, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -2331107498576567029} + m_DefaultState: {fileID: -5084009280774443352} diff --git a/Assets/Prefabs/Traps/Spike/spike_prefab.prefab b/Assets/Prefabs/Traps/Spike/spike_prefab.prefab new file mode 100644 index 00000000..44c681fc --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/spike_prefab.prefab @@ -0,0 +1,167 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &462902943475074006 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5661829339743289840} + - component: {fileID: 880490289397325090} + - component: {fileID: 1702813171494735755} + - component: {fileID: 8085029313755927610} + - component: {fileID: 1075305872135517759} + m_Layer: 0 + m_Name: spike_prefab + m_TagString: trap + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5661829339743289840 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 462902943475074006} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2.2, y: 2.2, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &880490289397325090 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 462902943475074006} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: -1234118259 + m_SortingLayer: 2 + m_SortingOrder: 5 + m_Sprite: {fileID: -2031036979, guid: f7cbda36b64152e44aa56cff3bc5eef5, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!95 &1702813171494735755 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 462902943475074006} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: b5d11001e99a7e04ca097a4503855682, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!114 &8085029313755927610 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 462902943475074006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 02835e174e54a35429ebf1fd595accd7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!61 &1075305872135517759 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 462902943475074006} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 1, y: 1} + newSize: {x: 1, y: 1} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 0.25, y: 0.3} + m_EdgeRadius: 0 diff --git a/Assets/Prefabs/Traps/Spike/spike_prefab.prefab.meta b/Assets/Prefabs/Traps/Spike/spike_prefab.prefab.meta new file mode 100644 index 00000000..74864234 --- /dev/null +++ b/Assets/Prefabs/Traps/Spike/spike_prefab.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 854cb3c942bbf354cb1d900eaadba24a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/DevRoom.unity b/Assets/Scenes/DevRoom.unity index a6c926c6..8448f0ee 100644 --- a/Assets/Scenes/DevRoom.unity +++ b/Assets/Scenes/DevRoom.unity @@ -681,7 +681,7 @@ MonoBehaviour: m_LightType: 3 m_BlendStyleIndex: 0 m_FalloffIntensity: 0.5 - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.09411765} m_Intensity: 1 m_LightVolumeIntensity: 1 m_LightVolumeIntensityEnabled: 1 @@ -704,7 +704,7 @@ MonoBehaviour: m_PointLightInnerAngle: 360 m_PointLightOuterAngle: 360 m_PointLightInnerRadius: 0 - m_PointLightOuterRadius: 1 + m_PointLightOuterRadius: 500 m_ShapeLightParametricSides: 5 m_ShapeLightParametricAngleOffset: 0 m_ShapeLightParametricRadius: 1 @@ -2973,6 +2973,63 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 55fe130831dbf8a4da6e32d9a6584167, type: 3} +--- !u!1001 &3032167119160912338 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 462902943475074006, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_Name + value: spike_prefab + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalPosition.x + value: -19.32 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5661829339743289840, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} --- !u!1001 &3307090927746267338 PrefabInstance: m_ObjectHideFlags: 0 @@ -3229,3 +3286,4 @@ SceneRoots: - {fileID: 7284937959160339071} - {fileID: 4575848034203898725} - {fileID: 2794364920011803750} + - {fileID: 3032167119160912338} diff --git a/Assets/Scenes/EmptyRoom_2.unity b/Assets/Scenes/EmptyRoom_2.unity index 8fdf146c..273857a5 100644 --- a/Assets/Scenes/EmptyRoom_2.unity +++ b/Assets/Scenes/EmptyRoom_2.unity @@ -622,6 +622,34 @@ PrefabInstance: propertyPath: m_Layer value: 6 objectReference: {fileID: 0} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_TileSpriteArray.Array.data[2].m_Data + value: + objectReference: {fileID: 0} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_TileSpriteArray.Array.data[3].m_Data + value: + objectReference: {fileID: 1129282767, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_TileSpriteArray.Array.data[13].m_Data + value: + objectReference: {fileID: 916167026, guid: 6b70aeaa417e82a4f9cc02ceaf140158, type: 3} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_TileSpriteArray.Array.data[2].m_RefCount + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_TileSpriteArray.Array.data[13].m_RefCount + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_Tiles.Array.data[8].second.m_TileSpriteIndex + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 545858512894021296, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: m_Tiles.Array.data[9].second.m_TileSpriteIndex + value: 3 + objectReference: {fileID: 0} - target: {fileID: 979532337193533816, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} propertyPath: m_Layer value: 6 @@ -702,10 +730,18 @@ PrefabInstance: propertyPath: m_Layer value: 6 objectReference: {fileID: 0} + - target: {fileID: 8096972002182311090, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: trapPrefabs.Array.size + value: 6 + objectReference: {fileID: 0} - target: {fileID: 8096972002182311090, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} propertyPath: trapPrefabs.Array.data[1] value: objectReference: {fileID: 411694592779797494, guid: d7c2a5ac1f23afe428f872343ed56d71, type: 3} + - target: {fileID: 8096972002182311090, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} + propertyPath: trapPrefabs.Array.data[5] + value: + objectReference: {fileID: 462902943475074006, guid: 854cb3c942bbf354cb1d900eaadba24a, type: 3} - target: {fileID: 8327367539400217474, guid: 35bed5d2a54129845bcff6b3abaa746b, type: 3} propertyPath: m_Layer value: 6 diff --git a/Assets/Scripts/Trap/Spike.meta b/Assets/Scripts/Trap/Spike.meta new file mode 100644 index 00000000..91870f81 --- /dev/null +++ b/Assets/Scripts/Trap/Spike.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4adf6d0e0f659da48a1a3b267b996f10 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trap/Spike/Spike_Trap.cs b/Assets/Scripts/Trap/Spike/Spike_Trap.cs new file mode 100644 index 00000000..147bfbe7 --- /dev/null +++ b/Assets/Scripts/Trap/Spike/Spike_Trap.cs @@ -0,0 +1,82 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Spike_Trap : MonoBehaviour +{ + bool playerInTrap = false; + Animator m_Animator; + GameObject player; + + private bool IsActive=false; + + private float damageInterval= 1.0f; + + private Coroutine damageCoroutine; + + + + void Start() + { + m_Animator = gameObject.GetComponent(); + } + + private void OnTriggered(){ + IsActive = true; + } + + private void NotTriggered(){ + IsActive = false; + } + + void OnTriggerEnter2D(Collider2D collision) + { + if (collision.gameObject.CompareTag("Player")) + { + if (IsActive){ + playerInTrap = true; + player = collision.gameObject; + + if (damageCoroutine == null){ + damageCoroutine = StartCoroutine(ApplyDamage()); + } + + } + + } + } + + void OnTriggerExit2D(Collider2D collision) + { + if (collision.gameObject.CompareTag("Player")) + { + playerInTrap = false; + + if (damageCoroutine != null){ + StopCoroutine(damageCoroutine); + damageCoroutine = null; + } + } + } + + private void OnTriggerStay2D(Collider2D collision) { + if (collision.gameObject.CompareTag("Player") && !playerInTrap){ + playerInTrap = true; + } + } + + private IEnumerator ApplyDamage(){ + while (playerInTrap){ + TakeTrapDamage(); + yield return new WaitForSeconds(damageInterval); + } + } + + public void TakeTrapDamage() + { + if (playerInTrap) + { + player.GetComponent().TakeDamage(1); + } + } +} diff --git a/Assets/Scripts/Trap/Spike/Spike_Trap.cs.meta b/Assets/Scripts/Trap/Spike/Spike_Trap.cs.meta new file mode 100644 index 00000000..70d5b6c1 --- /dev/null +++ b/Assets/Scripts/Trap/Spike/Spike_Trap.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 02835e174e54a35429ebf1fd595accd7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Trap/TrapManager.cs b/Assets/Scripts/Trap/TrapManager.cs index a3e985e7..66e76dde 100644 --- a/Assets/Scripts/Trap/TrapManager.cs +++ b/Assets/Scripts/Trap/TrapManager.cs @@ -30,6 +30,7 @@ async void Start() trapPrefabDictionary.Add("crossbow_side_left_prefab", trapPrefabs[2]); trapPrefabDictionary.Add("crossbow_side_right_prefab", trapPrefabs[3]); trapPrefabDictionary.Add("bear_trap_prefab", trapPrefabs[4]); + trapPrefabDictionary.Add("spike_prefab", trapPrefabs[5]); clientSocket = SocketManager.Instance.ClientSocket;