From b6e207ab90fdbdc7dede9060a314d8d15450c956 Mon Sep 17 00:00:00 2001 From: Ali Sharoz Date: Thu, 28 Nov 2024 15:45:23 +0500 Subject: [PATCH] Exception Fix with bar replacement --- Assets/Scenes/Gameplay.unity | 20 ++- Assets/Source/Scripts/MenuUI.cs | 4 +- .../Scripts/SO/Soldiers/PistolMember.cs | 17 ++- .../Update UI/New Assets/Loading bars.meta | 8 + .../Loading bars/Blue Loading Bar copy.png | Bin 0 -> 4040 bytes .../Blue Loading Bar copy.png.meta | 140 ++++++++++++++++++ .../New Assets/Loading bars/yellow bar.png | Bin 0 -> 1895 bytes .../Loading bars/yellow bar.png.meta | 140 ++++++++++++++++++ 8 files changed, 317 insertions(+), 12 deletions(-) create mode 100644 Assets/Source/Update UI/New Assets/Loading bars.meta create mode 100644 Assets/Source/Update UI/New Assets/Loading bars/Blue Loading Bar copy.png create mode 100644 Assets/Source/Update UI/New Assets/Loading bars/Blue Loading Bar copy.png.meta create mode 100644 Assets/Source/Update UI/New Assets/Loading bars/yellow bar.png create mode 100644 Assets/Source/Update UI/New Assets/Loading bars/yellow bar.png.meta diff --git a/Assets/Scenes/Gameplay.unity b/Assets/Scenes/Gameplay.unity index bbd0bec2..57d91977 100644 --- a/Assets/Scenes/Gameplay.unity +++ b/Assets/Scenes/Gameplay.unity @@ -189187,7 +189187,7 @@ PrefabInstance: objectReference: {fileID: 769297780} - target: {fileID: 450773179923285749, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_SizeDelta.x - value: 646.3816 + value: 646 objectReference: {fileID: 0} - target: {fileID: 450773179923285749, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_SizeDelta.y @@ -189195,7 +189195,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 450773179923285749, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_AnchoredPosition.x - value: -1.8093 + value: 0 objectReference: {fileID: 0} - target: {fileID: 450773179923285749, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_AnchoredPosition.y @@ -189585,6 +189585,14 @@ PrefabInstance: propertyPath: m_fontSizeBase value: 24 objectReference: {fileID: 0} + - target: {fileID: 3935770900129827512, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4024175640873136018, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} + propertyPath: m_AnchoredPosition.y + value: -30 + objectReference: {fileID: 0} - target: {fileID: 4140814313404248684, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_Sprite value: @@ -189840,7 +189848,7 @@ PrefabInstance: - target: {fileID: 6070375541389759608, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: 7f6af9eb36f406f41bf951cce070c77e, type: 3} + objectReference: {fileID: 21300000, guid: 57a812422fae0ce429d683e33f0fc192, type: 3} - target: {fileID: 6070375541389759608, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_FillAmount value: 1 @@ -189955,11 +189963,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7752422252643484442, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_SizeDelta.x - value: 626.476 + value: 631 objectReference: {fileID: 0} - target: {fileID: 7752422252643484442, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_SizeDelta.y - value: 52 + value: 54 objectReference: {fileID: 0} - target: {fileID: 7752422252643484442, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_AnchoredPosition.x @@ -190000,7 +190008,7 @@ PrefabInstance: - target: {fileID: 8253142378780720860, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_Sprite value: - objectReference: {fileID: 21300000, guid: 9db91f41a4e121b47a50efe688fc29f8, type: 3} + objectReference: {fileID: 21300000, guid: 4ef0b84060376f54eb1dab0fa842c864, type: 3} - target: {fileID: 8253142378780720860, guid: 2afb0c0b1e9834310869cb2f0c994844, type: 3} propertyPath: m_FillAmount value: 1 diff --git a/Assets/Source/Scripts/MenuUI.cs b/Assets/Source/Scripts/MenuUI.cs index 52d24134..65b53c5f 100644 --- a/Assets/Source/Scripts/MenuUI.cs +++ b/Assets/Source/Scripts/MenuUI.cs @@ -66,8 +66,8 @@ public class MenuUI : MonoBehaviour firePowerIncreaseButton.LevelText.text = $"LEVEL {_db.PowerIncreaseLevel.Value}"; fireRateIncreaseButton.LevelText.text = $"LEVEL {_db.FireRateDecreaseLevel.Value}"; - firePowerIncreaseButton.PriceText.text = $"{_gameData.PowerNextUpgradePrice} "; - fireRateIncreaseButton.PriceText.text = $"{_gameData.FireNextUpgradePrice} "; + firePowerIncreaseButton.PriceText.text = $"{_gameData.PowerNextUpgradePrice} "; + fireRateIncreaseButton.PriceText.text = $"{_gameData.FireNextUpgradePrice} "; CheckForDeactivatingButtons(); } diff --git a/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs b/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs index 8d420694..1a1f7ede 100644 --- a/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs +++ b/Assets/Source/Scripts/SO/Soldiers/PistolMember.cs @@ -34,7 +34,7 @@ public class PistolMember : SquadMember var direction = (currentTarget.transform.position - shootPoint.transform.position).normalized; Vector3 sideDir; - + if ((_gameData.ProjectileCount - 1) / 2 == i) { sideDir = Vector3.zero; @@ -44,7 +44,7 @@ public class PistolMember : SquadMember sideDir = Vector3.Lerp(-rightVector, rightVector, (i + 1f) / _gameData.ProjectileCount); } - + projectile.rb.AddForce((direction + sideDir) * projectileForce, ForceMode.VelocityChange); projectile.enterComponent.OnEnter -= HitEnemy; @@ -60,10 +60,19 @@ public class PistolMember : SquadMember var reload = memberClass.ReloadDuration - memberClass.ReloadDuration * (1 + EvolveLevel / 20) / 1.5f; reloadTime = Time.time + memberClass.ReloadDuration; - ShootSound.pitch = Random.Range(0.85f, 1.15f); - ShootSound.Play(); + + float pitchVal = Random.Range(0.9f, 1.1f); + PlayerAfterPitchChange(pitchVal); } + void PlayerAfterPitchChange(float val = 1f) + { + if (ShootSound != null) + { + ShootSound.pitch = val; + ShootSound.Play(); + } + } private void HitEnemy(Transform other, Transform @object) { if (other.CompareTag(_gameData.hittableTag)) diff --git a/Assets/Source/Update UI/New Assets/Loading bars.meta b/Assets/Source/Update UI/New Assets/Loading bars.meta new file mode 100644 index 00000000..08ba67c7 --- /dev/null +++ b/Assets/Source/Update UI/New Assets/Loading bars.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 510cb8760d15a27418bd45f5b2b58e58 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Source/Update UI/New Assets/Loading bars/Blue Loading Bar copy.png b/Assets/Source/Update UI/New Assets/Loading bars/Blue Loading Bar copy.png new file mode 100644 index 0000000000000000000000000000000000000000..4bdebd3e7aad624d92f41c17d53bf12229f54bb8 GIT binary patch literal 4040 zcmXX}c_38l8$Ooo%Vd|O?8%r&=vpEXqEgv+CNpFw8CynnBWrd>>C(L!%h(x%G?t9L zY+=Y6qp@XaNWaPb{c+BB{y6V>zvp@0_x+xeXm;0-lkFTE005lEM*0r`fIgV^tj5Ab zyO-W?e@O2Ji?oea>8|H|@??u|>ipKnLbB+5qm^g|$`b`;Q zf1aT-=qp<)4eRm>yC?}O=YFm-S3WBW^1r&vZF+T{8^rtY2E*C=j9Cwfui7jvtRlbH z4iyD%hMcEp<8du*En%Cpn~vp=`E`Cp>qO^>G3?26e3JB$L=^ujwT?keIfZfp$^u8O|d?z?c5;i^YI7 z6*}7n`tzM{ujZ;L#Y=GDgkwIU_*>VkCqRmsI^ec|1MW)DD-4}GI^^9y`ScRRsW}ES zXQgkP<9dfrr9b3ERxunp7=srmDnQ$r`GT-|Ar66}v_QL#q-jBmDdTz8KT*<62s)Tc z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_TS zfZf>49x3T079nFe#iHwx9^F_nK*%^J>cbzrbXi1NaH+1A^QFUcn0z@W-+hsjGnv9w z(Ta5eaao^UXp&B%m-q9pm9$2IF;y zv-#AkGi6vm>e}K0sFvF3$dSb~_Zf-?>bna`eMY6VoWU5z!@G{-CokwL4J)DqTSA%` zqCO>7L`Of>SS%dr(Wc(JyzW3YjJnV2Y{y9qE9_lccUYT?SvbeAvT!DnXw%&0(s*~{JrA3uo) z@SCsxmYX+z!0zsPgWFiD(5#Diin?xQZPE=5lRjcKoQqTVN=C>m)=#XRZP#NK7hlZr z%9R$)ys7l&_8du{JocLKL(DQ7!SU(u7?wW-$m?GmWN%Uo?{NKdveaGpXb7zeH!>Aq z8zZd9s&q)N1QJWgT>O-&Zua#JOnP)v8=$C-+DpKqVRjx$8N)e@umIh0vA$#sJ2^Y` z9As~DkO4F%h5&!O{d*2>e4o8%))d_a<0~jU6s0C&UDOjp7mf3l>f^nR99b3T;uNTq z5lT0B)5Ne78N+VOLLE_QV%SAJG0Y&BG3;b`27}W-a8}+)m)gegPv3kVbN9IZY%T$3 zsH*T7IT=IICaugo+dVNXOUSZyM{zYsH#HeUpfNGjbD$p)6z!yQqz!1+BKV zLyZP-ZBHxHRgf`kWAV{CGKO=QHH@JqV^d-cnU^u_!x>~b?3j$N73O z!k$zYx2hE7x+B^goD2O|x^!a(yE$CT0O>Qsec(CZqZpq>j}zu9^kETjE@&fNx=9Pr-3*XE hGrY{WdT;jP{{Se5wvUrk*Khy;002ovPDHLkV1jgQnO^_^ literal 0 HcmV?d00001 diff --git a/Assets/Source/Update UI/New Assets/Loading bars/yellow bar.png.meta b/Assets/Source/Update UI/New Assets/Loading bars/yellow bar.png.meta new file mode 100644 index 00000000..dbe57abe --- /dev/null +++ b/Assets/Source/Update UI/New Assets/Loading bars/yellow bar.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 57a812422fae0ce429d683e33f0fc192 +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: 0 + 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: iPhone + 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: Android + 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: