From e779649fb5da67c038c77cb605b8f16900170cbb Mon Sep 17 00:00:00 2001 From: OliverS Date: Sun, 4 Feb 2024 02:52:05 +0100 Subject: [PATCH 1/5] pillar import --- Assets/Sprites/Pillar.png | Bin 0 -> 3629 bytes Assets/Sprites/Pillar.png.meta | 127 +++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 Assets/Sprites/Pillar.png create mode 100644 Assets/Sprites/Pillar.png.meta diff --git a/Assets/Sprites/Pillar.png b/Assets/Sprites/Pillar.png new file mode 100644 index 0000000000000000000000000000000000000000..b03cf10c8b67a19d7a6b95da8bf469675d72f1de GIT binary patch literal 3629 zcmbtXdpy%^8{bHZqUD^X8c*pU^(Z8#YIJ;^5+3IWm6%h+96K4asTY+HZAm>E7RoTD zuu2YdK9fD3(G1IBSnR!5o;^bBcb`NavA&kh>2pFk@FHkj7sP4;qAQtG^=}Q7l}dXy zt@|SMrIfNou11sNA8w)I9FzRugRb|>FlDw))ay?b#JZs-Nl?mUw6A~6dSxqJZFx0{ z-xUumybg20>anWCy#lAEQ?lpu)fy99nJm#Yhdd<*rfJIl!V`!Y=oXYsrGb!`Q|Cjiha*GU4dZU5ZI_M zcYolTmc92;3G}5etryPJr(=aXh5hMhO|NZcJC^%v>aS#heN~*vNH^9 z3dY*hOFAQq>~UMZ)+Yk@UYd@C>z(obB{iY@c>nw#yo$_DNvf<!000K-rh zt3p1C%c+cSx8Ln6XcWvYG`&U)of<8iVv}sXe#tS?clfuu&$Ba+gRlT%T9kNEkfeXRsv*rk143R z->@)*ghjjCO^ir#vEnuYWasy%%T9ky#{{xD3^K#c#bL{A3oS-lPrJLtE8`x+?$SCB z>a?di3~sbvg~i%i-Fjk6BXe=wx!Tu%62Da2+BzN9Iy90aQmVUVo6)n&W#Rc` z$HeTO5ckm0mbu!@Mmpbi04JVlpzhd6Q(d4Bgpcz?B>WUx8_t+=K3*s?M48OIzih6d zJQA1PJ^IkraIh)Yu*)#A&(S9ses~bm?IDiG`_hl8Iu5NW$i=CczgxeDP~1|idswS4 zVk>RiWLB)xJSN68=nIy)212i)A@qh4^!;uYwc8uulh#Hih zxWepTq%HIO(L~5|AmI59g76pn%RXg_6Wph12#EqLgWNyf3ivO3pnC{LbSF9ip&5&x zHRugLi-hXw8ij0YXgDK>hgn8T?J~D6Z7?;F%}Rg21}3I%eORmO5+fXBFzBF_(rC#U zB($`%w{uKrNF1kq06J2!7v+)_T{s?TxDp?jepMp;kZKg>QXGQ?QKw z5)N5wd>a(_#fWj0(~xY6C7iYa#J1AyWhZx^hL;Qqau!<|@CvYo~EeH62PFcp@q;n;Xfb$pm zB!#^oa;Z&qGkNYv*{mBl9PYazo?HLTC>Mi?jbvTgE@9FC)SUo%`^$d|<7W*muZEpu z0H2?ib)^xnZX611Ae!OSI1#my>a|-xm9BJ9kXdn3u}uePU`H?Q}tjB^y()YzbY2Vj` z!Q;<~Q}m)mQCTpO;Z6dL>lUK2^}H(#{ybrw5K%2?4ve=X6Da;6v;kQ*U@tp}d7cI+ z3i0vNV(j>cjA42KL&g)ls#So&_hg9UAIBhrp8UE|u55}1YpMIgZ!7Go)mq*7u++^` zY6K=eR)pT_inzR8V)I!5Z14f7R^Lp?p|j}_iJ&w!fPR^uX4q9v72Srh z2GPIq2Yh5ft|jk-0AuQL^>2oM3R0}rJmH&8MVx$Xbbua)K~>)E9(^zLvv7S0yBAqk`Yw~ThS-j#u}0a!pHnoMH9_ocjDWdrEQy`a5( zc!~@QX6ChX@8it!OKE#wMcO;#f{hQY z(pK@U{?eS|@5NVQxLXZWoN3 zMD0m_n+qrQ9Z-e~jeV8)@9Q<$UuoNPPig`&wQyW8GRtm0BBl9u2iOrAk;-un!su|2)bv-NB= zdh>9x%3RlCC0t6_!dGLXT@1s!$?bM|^jcHCG&!5vLxBlz-a!M<#saWNiKHk++TgN?h3M8hU0C) zpAXy7{n)U4iHLlUc+?t+PRj7jz`!SiKdtN!&2xSLUk$fu7XBac|#6 zr&i+PL;>~q>!I8z{4HI(*v9CaTaZzOogoARhhD5fC5zvgcjLfR?`WHkJIW^_@PU@4 zE2`cUJ(1r-9`=TDYbSMByFG~pg$|ue7N=&2n4gK{KJwG(M%M+BIcnnq(O-Fv9cC?# l)8NmZl!x6(&wu?3vJ2R2zz}|#&n5|{lO|@!yrZty{{uVlgBt(< literal 0 HcmV?d00001 diff --git a/Assets/Sprites/Pillar.png.meta b/Assets/Sprites/Pillar.png.meta new file mode 100644 index 0000000..c8a8cd1 --- /dev/null +++ b/Assets/Sprites/Pillar.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: d40aa99beb4a256419edc2e120f26703 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + 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: Server + 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: From 000d1e6b0e5a4cc7b0d4409d9321c287dbe912b1 Mon Sep 17 00:00:00 2001 From: kimrdd Date: Sun, 4 Feb 2024 02:53:32 +0100 Subject: [PATCH 2/5] enemy hp customization --- Assets/Resources/Enemies/1/Enemy1V1.prefab | 2 + Assets/Resources/Enemies/1/Enemy1V2.prefab | 4 +- Assets/Resources/Enemies/1/Enemy1V3.prefab | 4 +- Assets/Resources/Enemies/2/Enemy2V1.prefab | 6 ++- Assets/Resources/Enemies/2/Enemy2V2.prefab | 6 ++- Assets/Resources/Enemies/2/Enemy2V3.prefab | 6 ++- Assets/Resources/Enemies/3/Enemy3V1.prefab | 6 ++- Assets/Resources/Enemies/3/Enemy3V2.prefab | 6 ++- Assets/Resources/Enemies/3/Enemy3V3.prefab | 6 ++- Assets/Resources/Enemies/4/Enemy4V1.prefab | 6 ++- Assets/Resources/Enemies/4/Enemy4V2.prefab | 6 ++- Assets/Resources/Enemies/4/Enemy4V3.prefab | 6 ++- Assets/Resources/Enemies/5/Enemy5V1.prefab | 6 ++- Assets/Resources/Enemies/5/Enemy5V2.prefab | 6 ++- Assets/Resources/Enemies/5/Enemy5V3.prefab | 6 ++- Assets/Resources/Enemies/6/Enemy6V1.prefab | 6 ++- Assets/Resources/Enemies/6/Enemy6V2.prefab | 6 ++- Assets/Resources/Enemies/6/Enemy6V3.prefab | 6 ++- Assets/Scenes/PrefabTest.unity | 60 ++++++++++++++++++++++ 19 files changed, 143 insertions(+), 17 deletions(-) diff --git a/Assets/Resources/Enemies/1/Enemy1V1.prefab b/Assets/Resources/Enemies/1/Enemy1V1.prefab index 8372c60..b83b5ef 100644 --- a/Assets/Resources/Enemies/1/Enemy1V1.prefab +++ b/Assets/Resources/Enemies/1/Enemy1V1.prefab @@ -254,6 +254,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 damageTickDelay: 1 OnHealthZero: @@ -276,6 +277,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 damageTickDelay: 0.25 OnHealthZero: diff --git a/Assets/Resources/Enemies/1/Enemy1V2.prefab b/Assets/Resources/Enemies/1/Enemy1V2.prefab index f41f7d3..94ff752 100644 --- a/Assets/Resources/Enemies/1/Enemy1V2.prefab +++ b/Assets/Resources/Enemies/1/Enemy1V2.prefab @@ -169,7 +169,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/1/Enemy1V3.prefab b/Assets/Resources/Enemies/1/Enemy1V3.prefab index 1f93efb..d5882c5 100644 --- a/Assets/Resources/Enemies/1/Enemy1V3.prefab +++ b/Assets/Resources/Enemies/1/Enemy1V3.prefab @@ -253,7 +253,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/2/Enemy2V1.prefab b/Assets/Resources/Enemies/2/Enemy2V1.prefab index 9b12b37..1842387 100644 --- a/Assets/Resources/Enemies/2/Enemy2V1.prefab +++ b/Assets/Resources/Enemies/2/Enemy2V1.prefab @@ -170,7 +170,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -191,7 +193,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/2/Enemy2V2.prefab b/Assets/Resources/Enemies/2/Enemy2V2.prefab index cc0b10c..18bac40 100644 --- a/Assets/Resources/Enemies/2/Enemy2V2.prefab +++ b/Assets/Resources/Enemies/2/Enemy2V2.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/2/Enemy2V3.prefab b/Assets/Resources/Enemies/2/Enemy2V3.prefab index fa07a46..6169969 100644 --- a/Assets/Resources/Enemies/2/Enemy2V3.prefab +++ b/Assets/Resources/Enemies/2/Enemy2V3.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/3/Enemy3V1.prefab b/Assets/Resources/Enemies/3/Enemy3V1.prefab index 97d2175..9350562 100644 --- a/Assets/Resources/Enemies/3/Enemy3V1.prefab +++ b/Assets/Resources/Enemies/3/Enemy3V1.prefab @@ -170,7 +170,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -191,7 +193,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/3/Enemy3V2.prefab b/Assets/Resources/Enemies/3/Enemy3V2.prefab index d1389a3..21a24d6 100644 --- a/Assets/Resources/Enemies/3/Enemy3V2.prefab +++ b/Assets/Resources/Enemies/3/Enemy3V2.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/3/Enemy3V3.prefab b/Assets/Resources/Enemies/3/Enemy3V3.prefab index 7bf74d3..49dfeb3 100644 --- a/Assets/Resources/Enemies/3/Enemy3V3.prefab +++ b/Assets/Resources/Enemies/3/Enemy3V3.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/4/Enemy4V1.prefab b/Assets/Resources/Enemies/4/Enemy4V1.prefab index 6540027..d98430f 100644 --- a/Assets/Resources/Enemies/4/Enemy4V1.prefab +++ b/Assets/Resources/Enemies/4/Enemy4V1.prefab @@ -170,7 +170,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -191,7 +193,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/4/Enemy4V2.prefab b/Assets/Resources/Enemies/4/Enemy4V2.prefab index f420f1e..6a0fd2a 100644 --- a/Assets/Resources/Enemies/4/Enemy4V2.prefab +++ b/Assets/Resources/Enemies/4/Enemy4V2.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/4/Enemy4V3.prefab b/Assets/Resources/Enemies/4/Enemy4V3.prefab index 3126c68..b8feba6 100644 --- a/Assets/Resources/Enemies/4/Enemy4V3.prefab +++ b/Assets/Resources/Enemies/4/Enemy4V3.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/5/Enemy5V1.prefab b/Assets/Resources/Enemies/5/Enemy5V1.prefab index 45513c6..d264f49 100644 --- a/Assets/Resources/Enemies/5/Enemy5V1.prefab +++ b/Assets/Resources/Enemies/5/Enemy5V1.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/5/Enemy5V2.prefab b/Assets/Resources/Enemies/5/Enemy5V2.prefab index 3853aec..523ef49 100644 --- a/Assets/Resources/Enemies/5/Enemy5V2.prefab +++ b/Assets/Resources/Enemies/5/Enemy5V2.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/5/Enemy5V3.prefab b/Assets/Resources/Enemies/5/Enemy5V3.prefab index a5385da..0da2f25 100644 --- a/Assets/Resources/Enemies/5/Enemy5V3.prefab +++ b/Assets/Resources/Enemies/5/Enemy5V3.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/6/Enemy6V1.prefab b/Assets/Resources/Enemies/6/Enemy6V1.prefab index 370b4c3..7711f0e 100644 --- a/Assets/Resources/Enemies/6/Enemy6V1.prefab +++ b/Assets/Resources/Enemies/6/Enemy6V1.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/6/Enemy6V2.prefab b/Assets/Resources/Enemies/6/Enemy6V2.prefab index 74dc37b..3284ee6 100644 --- a/Assets/Resources/Enemies/6/Enemy6V2.prefab +++ b/Assets/Resources/Enemies/6/Enemy6V2.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Resources/Enemies/6/Enemy6V3.prefab b/Assets/Resources/Enemies/6/Enemy6V3.prefab index ab578e0..7fb48df 100644 --- a/Assets/Resources/Enemies/6/Enemy6V3.prefab +++ b/Assets/Resources/Enemies/6/Enemy6V3.prefab @@ -254,7 +254,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: - maxHealth: 1 + onlyCallZeroHealthOnce: 1 + maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] @@ -275,7 +277,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3} m_Name: m_EditorClassIdentifier: + onlyCallZeroHealthOnce: 1 maxHealth: 100 + damageTickDelay: 0.25 OnHealthZero: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Scenes/PrefabTest.unity b/Assets/Scenes/PrefabTest.unity index 46b8c1d..11a4a1f 100644 --- a/Assets/Scenes/PrefabTest.unity +++ b/Assets/Scenes/PrefabTest.unity @@ -131,6 +131,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: ad94da4dcc3c6204494b1b223e3ad6bd, type: 3} + propertyPath: maxHealth + value: 180 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: ad94da4dcc3c6204494b1b223e3ad6bd, type: 3} propertyPath: m_LocalPosition.x value: 5.060853 @@ -188,6 +192,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 39cfda8bd2b0ae8438cdc0c54355b57a, type: 3} + propertyPath: maxHealth + value: 180 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 39cfda8bd2b0ae8438cdc0c54355b57a, type: 3} propertyPath: m_LocalPosition.x value: 8.718343 @@ -245,6 +253,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 8def55d0ae3630644b661b55945b88ab, type: 3} + propertyPath: maxHealth + value: 250 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 8def55d0ae3630644b661b55945b88ab, type: 3} propertyPath: m_LocalPosition.x value: -11.131151 @@ -302,6 +314,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 8e3efe9ba9a961e4883e6d4b3bede1b3, type: 3} + propertyPath: maxHealth + value: 160 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 8e3efe9ba9a961e4883e6d4b3bede1b3, type: 3} propertyPath: m_LocalPosition.x value: 2.8130238 @@ -359,6 +375,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: af739fea850caf944ac8c1932d2ec386, type: 3} + propertyPath: maxHealth + value: 180 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: af739fea850caf944ac8c1932d2ec386, type: 3} propertyPath: m_LocalPosition.x value: 6.8515005 @@ -553,6 +573,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 29618f067a17cd94eb329fa634e06f5a, type: 3} + propertyPath: maxHealth + value: 160 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 29618f067a17cd94eb329fa634e06f5a, type: 3} propertyPath: m_LocalPosition.x value: -4.2352614 @@ -610,6 +634,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 363f3bb5d515d994ea8bfb37232263b0, type: 3} + propertyPath: maxHealth + value: 130 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 363f3bb5d515d994ea8bfb37232263b0, type: 3} propertyPath: m_LocalPosition.x value: -3.7018778 @@ -667,6 +695,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 0dc1cd5eb961eb049b13867a3bff4396, type: 3} + propertyPath: maxHealth + value: 160 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 0dc1cd5eb961eb049b13867a3bff4396, type: 3} propertyPath: m_LocalPosition.x value: -11.016855 @@ -724,6 +756,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 23e5e0951502e6d49bc400d919073d4b, type: 3} + propertyPath: maxHealth + value: 130 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 23e5e0951502e6d49bc400d919073d4b, type: 3} propertyPath: m_LocalPosition.x value: -0.9206641 @@ -781,6 +817,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: cc70504ee89b0b74fac0167fd3c76bdd, type: 3} + propertyPath: maxHealth + value: 250 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: cc70504ee89b0b74fac0167fd3c76bdd, type: 3} propertyPath: m_LocalPosition.x value: -14.902936 @@ -838,6 +878,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: f808ad67f6a747241a310437e433c828, type: 3} + propertyPath: maxHealth + value: 110 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: f808ad67f6a747241a310437e433c828, type: 3} propertyPath: m_LocalPosition.x value: -2.4065187 @@ -952,6 +996,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 40512b69b08d56d498aa78823087362c, type: 3} + propertyPath: maxHealth + value: 130 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 40512b69b08d56d498aa78823087362c, type: 3} propertyPath: m_LocalPosition.x value: -7.5879583 @@ -1191,6 +1239,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: f48e8133073214446b0889b26d867b03, type: 3} + propertyPath: maxHealth + value: 110 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: f48e8133073214446b0889b26d867b03, type: 3} propertyPath: m_LocalPosition.x value: 0.18420205 @@ -1248,6 +1300,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: fa674b5c4ab900d439c6188142bfd1b5, type: 3} + propertyPath: maxHealth + value: 250 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: fa674b5c4ab900d439c6188142bfd1b5, type: 3} propertyPath: m_LocalPosition.x value: -15.0934305 @@ -1305,6 +1361,10 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2938081276856164938, guid: 8c660e9fc6ef07843a373f99149d1849, type: 3} + propertyPath: maxHealth + value: 110 + objectReference: {fileID: 0} - target: {fileID: 3920219362688286786, guid: 8c660e9fc6ef07843a373f99149d1849, type: 3} propertyPath: m_LocalPosition.x value: 2.8892193 From 52cdc284baa5b95d290dc27dd95fc691aff7c851 Mon Sep 17 00:00:00 2001 From: Sveske Juice Date: Sat, 3 Feb 2024 17:56:12 -0800 Subject: [PATCH 3/5] l --- .../Player1/PlayerAnimations1.controller | 16 +- .../PlayerAnimations/Player1/Swing/Swing.anim | 89 ++++++++-- .../Player2/PlayerAnimations2.controller | 168 +++++------------- Assets/Scripts/Enemy/EnemyAnimationHandler.cs | 3 - .../Scripts/Player/PlayerAnimationHandler.cs | 4 +- Assets/Scripts/Player/PlayerMovement.cs | 6 +- 6 files changed, 145 insertions(+), 141 deletions(-) diff --git a/Assets/Animations/PlayerAnimations/Player1/PlayerAnimations1.controller b/Assets/Animations/PlayerAnimations/Player1/PlayerAnimations1.controller index 2256c74..08c43f1 100644 --- a/Assets/Animations/PlayerAnimations/Player1/PlayerAnimations1.controller +++ b/Assets/Animations/PlayerAnimations/Player1/PlayerAnimations1.controller @@ -154,31 +154,37 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: Run m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: Mop m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: RunMop m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: Swing m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} + - m_Name: IsRunning + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer diff --git a/Assets/Animations/PlayerAnimations/Player1/Swing/Swing.anim b/Assets/Animations/PlayerAnimations/Player1/Swing/Swing.anim index 6576677..3e63c65 100644 --- a/Assets/Animations/PlayerAnimations/Player1/Swing/Swing.anim +++ b/Assets/Animations/PlayerAnimations/Player1/Swing/Swing.anim @@ -16,25 +16,55 @@ AnimationClip: m_EulerCurves: [] m_PositionCurves: [] m_ScaleCurves: [] - m_FloatCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.85 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_FlipX + path: + classID: 212 + script: {fileID: 0} + flags: 0 m_PPtrCurves: - serializedVersion: 2 curve: - time: 0 value: {fileID: 21300000, guid: 240c3a2ef21982f4590d6cd434d91f27, type: 3} - - time: 0.06666667 + - time: 0.11666667 value: {fileID: 21300000, guid: 0bac1dfd4dd5df344ade6d0dfc5aa77f, type: 3} - - time: 0.15 + - time: 0.25 value: {fileID: 21300000, guid: 2f7b336ea4b22104b831a5aa4ce63e65, type: 3} - - time: 0.21666667 + - time: 0.36666667 value: {fileID: 21300000, guid: db90fe6a45c83a74b88da01e595e40ed, type: 3} - - time: 0.28333333 + - time: 0.48333332 value: {fileID: 21300000, guid: d8c1ff9b90b62814bbb6894bfcf4b2bb, type: 3} - - time: 0.35 + - time: 0.6 value: {fileID: 21300000, guid: de98b85f0c0593e4389e93a6542ba161, type: 3} - - time: 0.43333334 + - time: 0.73333335 value: {fileID: 21300000, guid: b9a4237d2fdcb3044a222171250fa5fc, type: 3} - - time: 0.5 + - time: 0.85 value: {fileID: 21300000, guid: 670971dc022801d4aa435f32749cdf05, type: 3} attribute: m_Sprite path: @@ -48,6 +78,15 @@ AnimationClip: m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 555744692 + script: {fileID: 0} + typeID: 212 + customType: 0 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 - serializedVersion: 2 path: 0 attribute: 0 @@ -71,7 +110,7 @@ AnimationClip: m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 0.51666665 + m_StopTime: 0.8666667 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -86,7 +125,37 @@ AnimationClip: m_KeepOriginalPositionXZ: 0 m_HeightFromFeet: 0 m_Mirror: 0 - m_EditorCurves: [] + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 0.85 + value: 1 + inSlope: Infinity + outSlope: Infinity + tangentMode: 103 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_FlipX + path: + classID: 212 + script: {fileID: 0} + flags: 0 m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 diff --git a/Assets/Animations/PlayerAnimations/Player2/PlayerAnimations2.controller b/Assets/Animations/PlayerAnimations/Player2/PlayerAnimations2.controller index c52c14e..053efc1 100644 --- a/Assets/Animations/PlayerAnimations/Player2/PlayerAnimations2.controller +++ b/Assets/Animations/PlayerAnimations/Player2/PlayerAnimations2.controller @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1101 &-8901018507176659324 +--- !u!1101 &-8701045174356781676 AnimatorStateTransition: m_ObjectHideFlags: 1 m_CorrespondingSourceObject: {fileID: 0} @@ -9,10 +9,10 @@ AnimatorStateTransition: m_Name: m_Conditions: - m_ConditionMode: 1 - m_ConditionEvent: Mop + m_ConditionEvent: IsRunning m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 2168268571006691905} + m_DstState: {fileID: 8304111510876962717} m_Solo: 0 m_Mute: 0 m_IsExit: 0 @@ -20,32 +20,7 @@ AnimatorStateTransition: m_TransitionDuration: 0.25 m_TransitionOffset: 0 m_ExitTime: 0.75 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &-6015651985154535813 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Idle - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 3357306648811348641} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.75 - m_HasExitTime: 0 + m_HasExitTime: 1 m_HasFixedDuration: 1 m_InterruptionSource: 0 m_OrderedInterruption: 1 @@ -61,7 +36,7 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 3357306648811348641} - m_Position: {x: 10, y: 30, z: 0} + m_Position: {x: 20, y: -30, z: 0} - serializedVersion: 1 m_State: {fileID: -944807189804630194} m_Position: {x: 530, y: 80, z: 0} @@ -70,25 +45,45 @@ AnimatorStateMachine: m_Position: {x: 530, y: 170, z: 0} - serializedVersion: 1 m_State: {fileID: 8304111510876962717} - m_Position: {x: 520, y: -40, z: 0} + m_Position: {x: 300, y: 80, z: 0} - serializedVersion: 1 m_State: {fileID: 2168268571006691905} m_Position: {x: 530, y: 20, z: 0} m_ChildStateMachines: [] - m_AnyStateTransitions: - - {fileID: -6015651985154535813} - - {fileID: 8165869328345691628} - - {fileID: -8901018507176659324} - - {fileID: 3114296213374972739} - - {fileID: 5930657296870268193} + m_AnyStateTransitions: [] m_EntryTransitions: [] m_StateMachineTransitions: {} m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: 270, y: 60, z: 0} + m_AnyStatePosition: {x: -110, y: -130, z: 0} m_EntryPosition: {x: 20, y: 160, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_DefaultState: {fileID: 3357306648811348641} +--- !u!1101 &-2173210327374923992 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: IsRunning + m_EventTreshold: 0 + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 3357306648811348641} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.25 + m_TransitionOffset: 0 + m_ExitTime: 0.516129 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!1102 &-944807189804630194 AnimatorState: serializedVersion: 6 @@ -129,31 +124,37 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: Run m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: Mop m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: Swing m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} - m_Name: RunMop m_Type: 9 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 9100000} + m_Controller: {fileID: 0} + - m_Name: IsRunning + m_Type: 4 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 0 + m_Controller: {fileID: 0} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -193,31 +194,6 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: ---- !u!1101 &3114296213374972739 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Swing - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: -944807189804630194} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.75 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &3357306648811348641 AnimatorState: serializedVersion: 6 @@ -228,7 +204,8 @@ AnimatorState: m_Name: Idle m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: -8701045174356781676} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 @@ -270,56 +247,6 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: ---- !u!1101 &5930657296870268193 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: RunMop - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 3748437463534410733} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.75 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &8165869328345691628 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Run - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 8304111510876962717} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.75 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 --- !u!1102 &8304111510876962717 AnimatorState: serializedVersion: 6 @@ -330,7 +257,8 @@ AnimatorState: m_Name: Running m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: -2173210327374923992} m_StateMachineBehaviours: [] m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 diff --git a/Assets/Scripts/Enemy/EnemyAnimationHandler.cs b/Assets/Scripts/Enemy/EnemyAnimationHandler.cs index a510a5f..81482d0 100644 --- a/Assets/Scripts/Enemy/EnemyAnimationHandler.cs +++ b/Assets/Scripts/Enemy/EnemyAnimationHandler.cs @@ -6,7 +6,6 @@ using UnityEngine.AI; public class EnemyAnimationHandler : MonoBehaviour { Animator animator; - bool isDying = false; void Start() { animator = GetComponent(); @@ -25,7 +24,6 @@ public class EnemyAnimationHandler : MonoBehaviour IEnumerator AnimationDie() { - isDying = true; Strangle(); Debug.Log("Strangle"); yield return new WaitForSecondsRealtime(0.1f); @@ -43,6 +41,5 @@ public class EnemyAnimationHandler : MonoBehaviour public void DestroyGameobject() { Destroy(transform.parent.gameObject); - } } diff --git a/Assets/Scripts/Player/PlayerAnimationHandler.cs b/Assets/Scripts/Player/PlayerAnimationHandler.cs index 13a8fa5..02cc3e5 100644 --- a/Assets/Scripts/Player/PlayerAnimationHandler.cs +++ b/Assets/Scripts/Player/PlayerAnimationHandler.cs @@ -15,9 +15,9 @@ public class PlayerAnimationHandler : MonoBehaviour { animator.SetTrigger("Idle"); } - public void Run() + public void Run(bool state) { - animator.SetTrigger("Run"); + animator.SetBool("IsRunning", state); } public void Swing() { diff --git a/Assets/Scripts/Player/PlayerMovement.cs b/Assets/Scripts/Player/PlayerMovement.cs index 621fc97..3055fed 100644 --- a/Assets/Scripts/Player/PlayerMovement.cs +++ b/Assets/Scripts/Player/PlayerMovement.cs @@ -49,7 +49,11 @@ public class PlayerMovement : MonoBehaviour if (playerInput.movement != Vector2.zero) { RumbleWalk(); - animationHandler.Run(); + animationHandler.Run(true); + } + else + { + animationHandler.Run(false); } } private void FixedUpdate() From 2d12abe6952341520d825a845073af6ea1ec894e Mon Sep 17 00:00:00 2001 From: kimrdd Date: Sun, 4 Feb 2024 02:57:34 +0100 Subject: [PATCH 4/5] Enemy Animation fixes --- .../Animations/EnemyAnimations/4/v1/Enemy4v1DeathAni.anim | 8 ++++---- .../EnemyAnimations/4/v1/Enemy4v1StrangleAni.anim | 4 ++-- .../Animations/EnemyAnimations/4/v2/Enemy4v2DeathAni.anim | 8 ++++---- .../EnemyAnimations/4/v2/Enemy4v2StrangleAni.anim | 4 ++-- .../Animations/EnemyAnimations/4/v3/Enemy4v3DeathAni.anim | 8 ++++---- .../EnemyAnimations/4/v3/Enemy4v3StrangleAni.anim | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1DeathAni.anim b/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1DeathAni.anim index fa47064..959dabf 100644 --- a/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1DeathAni.anim +++ b/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1DeathAni.anim @@ -20,7 +20,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -29,7 +29,7 @@ AnimationClip: outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 0.3 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -115,7 +115,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -124,7 +124,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.3 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 diff --git a/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1StrangleAni.anim b/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1StrangleAni.anim index 8dfdb78..c14fb21 100644 --- a/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1StrangleAni.anim +++ b/Assets/Animations/EnemyAnimations/4/v1/Enemy4v1StrangleAni.anim @@ -20,7 +20,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -97,7 +97,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 diff --git a/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2DeathAni.anim b/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2DeathAni.anim index 860a52c..26c6de6 100644 --- a/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2DeathAni.anim +++ b/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2DeathAni.anim @@ -20,7 +20,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -29,7 +29,7 @@ AnimationClip: outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 0.3 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -115,7 +115,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -124,7 +124,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.3 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 diff --git a/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2StrangleAni.anim b/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2StrangleAni.anim index 7091ff0..60a7bc5 100644 --- a/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2StrangleAni.anim +++ b/Assets/Animations/EnemyAnimations/4/v2/Enemy4v2StrangleAni.anim @@ -20,7 +20,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -97,7 +97,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 diff --git a/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3DeathAni.anim b/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3DeathAni.anim index 538d0a4..f132b2f 100644 --- a/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3DeathAni.anim +++ b/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3DeathAni.anim @@ -20,7 +20,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -29,7 +29,7 @@ AnimationClip: outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 0.3 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -115,7 +115,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -124,7 +124,7 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.3 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 diff --git a/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3StrangleAni.anim b/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3StrangleAni.anim index 9cdb2ca..030646a 100644 --- a/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3StrangleAni.anim +++ b/Assets/Animations/EnemyAnimations/4/v3/Enemy4v3StrangleAni.anim @@ -20,7 +20,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 1, y: 0, z: 0} + value: {x: 0, y: 0, z: 0} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -97,7 +97,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 1 + value: 0 inSlope: 0 outSlope: 0 tangentMode: 136 From dbef2ea752a599f0b57bf61f36c8211e96ad01e3 Mon Sep 17 00:00:00 2001 From: Sveske Juice Date: Sat, 3 Feb 2024 17:57:37 -0800 Subject: [PATCH 5/5] fix err --- Assets/Scripts/Enemy/EnemyAnimationHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Scripts/Enemy/EnemyAnimationHandler.cs b/Assets/Scripts/Enemy/EnemyAnimationHandler.cs index 50dede7..3c902f3 100644 --- a/Assets/Scripts/Enemy/EnemyAnimationHandler.cs +++ b/Assets/Scripts/Enemy/EnemyAnimationHandler.cs @@ -6,6 +6,7 @@ using UnityEngine.AI; public class EnemyAnimationHandler : MonoBehaviour { Animator animator; + bool isDying = false; void Start() { animator = GetComponent(); @@ -20,6 +21,7 @@ public class EnemyAnimationHandler : MonoBehaviour //GetComponent().enabled = false; if (!isDying) StartCoroutine(AnimationDie()); + isDying = true; } IEnumerator AnimationDie()