From 103ae9c645116f0069cbe9f7be3d62940ebf41f5 Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:40:45 +0100 Subject: [PATCH] Updated buttons interactivity Also changed image compression --- Assets/Art/Building/Alternator-v1.png.meta | 11 +- Assets/Art/Building/Fan-v2.png.meta | 21 +- Assets/Art/Building/Slicer-v1.png.meta | 2 +- Assets/Art/Building/Spring-v1.png.meta | 2 +- Assets/Art/Building/Stair-v1.png.meta | 11 +- Assets/Art/Building/Wall-v1.png.meta | 11 +- Assets/Art/Fruit/Apple-v2.png.meta | 2 +- Assets/Art/Fruit/AppleJuice-v1.png.meta | 2 +- Assets/Art/Fruit/AppleSlice-v1.png.meta | 2 +- Assets/Art/Fruit/Banana-v1.png.meta | 2 +- Assets/Art/Fruit/BananaBacon-v1.png.meta | 2 +- Assets/Art/Fruit/BananaIceCream.png.meta | 2 +- Assets/Art/Fruit/BananaMush-v1.png.meta | 2 +- Assets/Art/Fruit/BananaPeel-v1.png.meta | 2 +- Assets/Art/Fruit/BananaSlice-v1.png.meta | 2 +- Assets/Art/Fruit/BuddhasHand-v1.png.meta | 2 +- Assets/Art/Fruit/DriedAppleSlice-v1.png.meta | 2 +- Assets/Art/Fruit/DriedBananaSlice-v1.png.meta | 2 +- Assets/Art/Fruit/Durian-v1.png.meta | 2 +- Assets/Art/Fruit/DurianPowder-v1.png.meta | 2 +- Assets/Art/Fruit/DurianSlice-v1.png.meta | 2 +- Assets/Art/Fruit/Grape-v1.png.meta | 2 +- Assets/Art/Fruit/GrapeJuice-v1.png.meta | 2 +- Assets/Art/Fruit/Kiwi-v1.png.meta | 2 +- Assets/Art/Fruit/KiwiJuice-v1.png.meta | 2 +- Assets/Art/Fruit/KiwiOil-v1.png.meta | 2 +- Assets/Art/Fruit/KiwiSeeds-v1.png.meta | 2 +- Assets/Art/Fruit/KiwiVinegar-v1.png.meta | 2 +- Assets/Art/Fruit/Mango-v1.png.meta | 2 +- Assets/Art/Fruit/MangoJuice-v1.png.meta | 2 +- Assets/Art/Fruit/Pitaya-v1.png.meta | 2 +- Assets/Art/Fruit/Raisins.png.meta | 2 +- Assets/Art/Fruit/SlicedKiwi-v1.png.meta | 2 +- Assets/Art/Fruit/SlicedMango-v1.png.meta | 2 +- Assets/Art/Fruit/Wine-v1.png.meta | 2 +- Assets/Art/Upgrade9Slice-OnHover-v1.png | Bin 0 -> 380 bytes Assets/Art/Upgrade9Slice-OnHover-v1.png.meta | 130 ++++ Assets/Scenes/UpgradesScene.unity | 601 +++++++++++------- Assets/Scripts/UI/BasicUpgradeButton.cs | 46 +- 39 files changed, 601 insertions(+), 292 deletions(-) create mode 100644 Assets/Art/Upgrade9Slice-OnHover-v1.png create mode 100644 Assets/Art/Upgrade9Slice-OnHover-v1.png.meta diff --git a/Assets/Art/Building/Alternator-v1.png.meta b/Assets/Art/Building/Alternator-v1.png.meta index 35bde80..6fc04c1 100644 --- a/Assets/Art/Building/Alternator-v1.png.meta +++ b/Assets/Art/Building/Alternator-v1.png.meta @@ -67,12 +67,12 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 @@ -110,6 +110,7 @@ TextureImporter: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: @@ -119,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Assets/Art/Building/Fan-v2.png.meta b/Assets/Art/Building/Fan-v2.png.meta index 1db5838..03dc697 100644 --- a/Assets/Art/Building/Fan-v2.png.meta +++ b/Assets/Art/Building/Fan-v2.png.meta @@ -67,12 +67,12 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 @@ -120,6 +120,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -141,6 +142,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -162,6 +164,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -183,6 +186,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -204,6 +208,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -225,6 +230,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -246,6 +252,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -267,6 +274,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -288,6 +296,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -309,6 +318,7 @@ TextureImporter: alignment: 0 pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} + customData: outline: [] physicsShape: [] tessellationDetail: 0 @@ -320,6 +330,7 @@ TextureImporter: edges: [] weights: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 6dfe9092a98e9ec4ebdee3a1a0a445d4 @@ -329,6 +340,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: Fan-v2_0: -1488015757 Fan-v2_1: 1806313799 diff --git a/Assets/Art/Building/Slicer-v1.png.meta b/Assets/Art/Building/Slicer-v1.png.meta index 33143f9..e5ecb82 100644 --- a/Assets/Art/Building/Slicer-v1.png.meta +++ b/Assets/Art/Building/Slicer-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Building/Spring-v1.png.meta b/Assets/Art/Building/Spring-v1.png.meta index 7a70818..369d75b 100644 --- a/Assets/Art/Building/Spring-v1.png.meta +++ b/Assets/Art/Building/Spring-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Building/Stair-v1.png.meta b/Assets/Art/Building/Stair-v1.png.meta index c98ec13..f7d42cc 100644 --- a/Assets/Art/Building/Stair-v1.png.meta +++ b/Assets/Art/Building/Stair-v1.png.meta @@ -67,12 +67,12 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 @@ -110,6 +110,7 @@ TextureImporter: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -119,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Assets/Art/Building/Wall-v1.png.meta b/Assets/Art/Building/Wall-v1.png.meta index 1eac486..421daf6 100644 --- a/Assets/Art/Building/Wall-v1.png.meta +++ b/Assets/Art/Building/Wall-v1.png.meta @@ -67,12 +67,12 @@ TextureImporter: swizzle: 50462976 cookieLightType: 0 platformSettings: - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: DefaultTexturePlatform maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 @@ -80,7 +80,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: Standalone maxTextureSize: 2048 resizeAlgorithm: 0 @@ -93,7 +93,7 @@ TextureImporter: ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - - serializedVersion: 3 + - serializedVersion: 4 buildTarget: WebGL maxTextureSize: 2048 resizeAlgorithm: 0 @@ -110,6 +110,7 @@ TextureImporter: serializedVersion: 2 sprites: [] outline: [] + customData: physicsShape: [] bones: [] spriteID: 5e97eb03825dee720800000000000000 @@ -119,6 +120,8 @@ TextureImporter: edges: [] weights: [] secondaryTextures: [] + spriteCustomMetadata: + entries: [] nameFileIdTable: {} mipmapLimitGroupName: pSDRemoveMatte: 0 diff --git a/Assets/Art/Fruit/Apple-v2.png.meta b/Assets/Art/Fruit/Apple-v2.png.meta index e428d6c..c8c8d86 100644 --- a/Assets/Art/Fruit/Apple-v2.png.meta +++ b/Assets/Art/Fruit/Apple-v2.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/AppleJuice-v1.png.meta b/Assets/Art/Fruit/AppleJuice-v1.png.meta index 513351d..fa4d6eb 100644 --- a/Assets/Art/Fruit/AppleJuice-v1.png.meta +++ b/Assets/Art/Fruit/AppleJuice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/AppleSlice-v1.png.meta b/Assets/Art/Fruit/AppleSlice-v1.png.meta index 2f02850..9d215ed 100644 --- a/Assets/Art/Fruit/AppleSlice-v1.png.meta +++ b/Assets/Art/Fruit/AppleSlice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Banana-v1.png.meta b/Assets/Art/Fruit/Banana-v1.png.meta index 810254b..6b05639 100644 --- a/Assets/Art/Fruit/Banana-v1.png.meta +++ b/Assets/Art/Fruit/Banana-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/BananaBacon-v1.png.meta b/Assets/Art/Fruit/BananaBacon-v1.png.meta index 80fefcb..c7ecf0b 100644 --- a/Assets/Art/Fruit/BananaBacon-v1.png.meta +++ b/Assets/Art/Fruit/BananaBacon-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/BananaIceCream.png.meta b/Assets/Art/Fruit/BananaIceCream.png.meta index 8a12854..b43831a 100644 --- a/Assets/Art/Fruit/BananaIceCream.png.meta +++ b/Assets/Art/Fruit/BananaIceCream.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/BananaMush-v1.png.meta b/Assets/Art/Fruit/BananaMush-v1.png.meta index 765160e..95ef19a 100644 --- a/Assets/Art/Fruit/BananaMush-v1.png.meta +++ b/Assets/Art/Fruit/BananaMush-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/BananaPeel-v1.png.meta b/Assets/Art/Fruit/BananaPeel-v1.png.meta index 1e3588c..2dead56 100644 --- a/Assets/Art/Fruit/BananaPeel-v1.png.meta +++ b/Assets/Art/Fruit/BananaPeel-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/BananaSlice-v1.png.meta b/Assets/Art/Fruit/BananaSlice-v1.png.meta index b159d7a..a94cd91 100644 --- a/Assets/Art/Fruit/BananaSlice-v1.png.meta +++ b/Assets/Art/Fruit/BananaSlice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/BuddhasHand-v1.png.meta b/Assets/Art/Fruit/BuddhasHand-v1.png.meta index 34c2f7b..b11505d 100644 --- a/Assets/Art/Fruit/BuddhasHand-v1.png.meta +++ b/Assets/Art/Fruit/BuddhasHand-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/DriedAppleSlice-v1.png.meta b/Assets/Art/Fruit/DriedAppleSlice-v1.png.meta index a7b14b2..84e0f09 100644 --- a/Assets/Art/Fruit/DriedAppleSlice-v1.png.meta +++ b/Assets/Art/Fruit/DriedAppleSlice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/DriedBananaSlice-v1.png.meta b/Assets/Art/Fruit/DriedBananaSlice-v1.png.meta index bfedc66..3ae7b9e 100644 --- a/Assets/Art/Fruit/DriedBananaSlice-v1.png.meta +++ b/Assets/Art/Fruit/DriedBananaSlice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Durian-v1.png.meta b/Assets/Art/Fruit/Durian-v1.png.meta index edab5af..2e8af1a 100644 --- a/Assets/Art/Fruit/Durian-v1.png.meta +++ b/Assets/Art/Fruit/Durian-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/DurianPowder-v1.png.meta b/Assets/Art/Fruit/DurianPowder-v1.png.meta index fc546b2..ea6e060 100644 --- a/Assets/Art/Fruit/DurianPowder-v1.png.meta +++ b/Assets/Art/Fruit/DurianPowder-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/DurianSlice-v1.png.meta b/Assets/Art/Fruit/DurianSlice-v1.png.meta index 13644cb..e67a95d 100644 --- a/Assets/Art/Fruit/DurianSlice-v1.png.meta +++ b/Assets/Art/Fruit/DurianSlice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Grape-v1.png.meta b/Assets/Art/Fruit/Grape-v1.png.meta index c471bb0..18b188a 100644 --- a/Assets/Art/Fruit/Grape-v1.png.meta +++ b/Assets/Art/Fruit/Grape-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/GrapeJuice-v1.png.meta b/Assets/Art/Fruit/GrapeJuice-v1.png.meta index 7482a41..2c8f1bd 100644 --- a/Assets/Art/Fruit/GrapeJuice-v1.png.meta +++ b/Assets/Art/Fruit/GrapeJuice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Kiwi-v1.png.meta b/Assets/Art/Fruit/Kiwi-v1.png.meta index f9b0750..b5a39bc 100644 --- a/Assets/Art/Fruit/Kiwi-v1.png.meta +++ b/Assets/Art/Fruit/Kiwi-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/KiwiJuice-v1.png.meta b/Assets/Art/Fruit/KiwiJuice-v1.png.meta index bd4bad5..46c82ea 100644 --- a/Assets/Art/Fruit/KiwiJuice-v1.png.meta +++ b/Assets/Art/Fruit/KiwiJuice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/KiwiOil-v1.png.meta b/Assets/Art/Fruit/KiwiOil-v1.png.meta index e08e7f1..b17cd7c 100644 --- a/Assets/Art/Fruit/KiwiOil-v1.png.meta +++ b/Assets/Art/Fruit/KiwiOil-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/KiwiSeeds-v1.png.meta b/Assets/Art/Fruit/KiwiSeeds-v1.png.meta index 41175fd..85d4fc9 100644 --- a/Assets/Art/Fruit/KiwiSeeds-v1.png.meta +++ b/Assets/Art/Fruit/KiwiSeeds-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/KiwiVinegar-v1.png.meta b/Assets/Art/Fruit/KiwiVinegar-v1.png.meta index 69918fb..4d25bb3 100644 --- a/Assets/Art/Fruit/KiwiVinegar-v1.png.meta +++ b/Assets/Art/Fruit/KiwiVinegar-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Mango-v1.png.meta b/Assets/Art/Fruit/Mango-v1.png.meta index b91cd0a..b283bde 100644 --- a/Assets/Art/Fruit/Mango-v1.png.meta +++ b/Assets/Art/Fruit/Mango-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/MangoJuice-v1.png.meta b/Assets/Art/Fruit/MangoJuice-v1.png.meta index 74efc53..7562dcb 100644 --- a/Assets/Art/Fruit/MangoJuice-v1.png.meta +++ b/Assets/Art/Fruit/MangoJuice-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Pitaya-v1.png.meta b/Assets/Art/Fruit/Pitaya-v1.png.meta index 1086e31..6b701fd 100644 --- a/Assets/Art/Fruit/Pitaya-v1.png.meta +++ b/Assets/Art/Fruit/Pitaya-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Raisins.png.meta b/Assets/Art/Fruit/Raisins.png.meta index 236f631..69ddab6 100644 --- a/Assets/Art/Fruit/Raisins.png.meta +++ b/Assets/Art/Fruit/Raisins.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/SlicedKiwi-v1.png.meta b/Assets/Art/Fruit/SlicedKiwi-v1.png.meta index 89aecff..ed63b18 100644 --- a/Assets/Art/Fruit/SlicedKiwi-v1.png.meta +++ b/Assets/Art/Fruit/SlicedKiwi-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/SlicedMango-v1.png.meta b/Assets/Art/Fruit/SlicedMango-v1.png.meta index 50f4f81..80981f7 100644 --- a/Assets/Art/Fruit/SlicedMango-v1.png.meta +++ b/Assets/Art/Fruit/SlicedMango-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Fruit/Wine-v1.png.meta b/Assets/Art/Fruit/Wine-v1.png.meta index 104d80e..f40bb20 100644 --- a/Assets/Art/Fruit/Wine-v1.png.meta +++ b/Assets/Art/Fruit/Wine-v1.png.meta @@ -72,7 +72,7 @@ TextureImporter: maxTextureSize: 2048 resizeAlgorithm: 0 textureFormat: -1 - textureCompression: 1 + textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 diff --git a/Assets/Art/Upgrade9Slice-OnHover-v1.png b/Assets/Art/Upgrade9Slice-OnHover-v1.png new file mode 100644 index 0000000000000000000000000000000000000000..9a6ac3fa586df7e468cc0e1839d1b84b3e55aa6d GIT binary patch literal 380 zcmV-?0fYXDP)Px$Hc3Q5R7i>Km)mWGFc3x0jLjG1Q9!ClBdK*8Nfjv|5B6(~Cm+UM?}kVbk3^BU z0vQ?bnTrPLTA0w&58u2)Bh)6nTLX#sY z>o{>V;^|y_zMtLRH+MAR7Xznc7-q)F0oaRQ zS~aZZit2G2?j>W{|FS?kcn9y`9lV483D`&(FOOU3nxTxLELvnkE?C9M;C?tV5K~0i zfS%VKILBShaWlkFT(1ewX){`ixr`~(=Lh=XSjCdD=T?rlb-4fAKz|MAH@7g~6|jb; aHf^8u7ObMY>xqp30000(); - AttachedButton.onClick.AddListener(() => { UpgradeManager.Unlock(Upgrade); }); + AttachedButton.onClick.AddListener(OnButtonClicked); /* Stops null reference */ RequiredUpgrades ??= Array.Empty(); @@ -97,14 +99,19 @@ namespace Fruitomation.UI UpgradeLines = lines.ToArray(); } + private void OnButtonClicked() + { + UpgradeManager.Unlock(Upgrade); + } + private bool IsUnlockable => RequiredUpgrades.Length == 0 || RequiredUpgrades.All(required => required.IsUnlocked); private bool IsViewable => RequiredUpgrades.Length == 0 || - RequiredUpgrades.Any(required => required.IsUnlocked); - + RequiredUpgrades.Any(required => required.IsUnlockable); + private void Update() { foreach ((LineRenderer lr, BasicUpgradeButton button, LineInfo info) in UpgradeLines) @@ -119,7 +126,7 @@ namespace Fruitomation.UI { lr.positionCount = info.LinePoints.Length; int index = 0; - + foreach (RectTransform point in info.LinePoints) { lr.SetPosition(index++, point.position); @@ -131,12 +138,12 @@ namespace Fruitomation.UI { State = UpgradeState.Unlocked; } - + else if (IsUnlockable) { State = UpgradeState.Unlockable; } - + else if (IsViewable) { State = UpgradeState.Viewable; @@ -146,14 +153,21 @@ namespace Fruitomation.UI { State = UpgradeState.Hidden; } - + + AttachedButton.interactable = State == UpgradeState.Unlockable; + // https://stackoverflow.com/questions/27040325/c-sharp-regex-to-convert-camelcase-to-sentence-case string formatted = Regex.Replace(Upgrade.ToString(), @"[A-Z]", " $0")[1..]; - - AttachedText.text = State == UpgradeState.Hidden - ? "???" - : $"{formatted}\n{Cost.AsString()}"; + AttachedText.text = State switch + { + UpgradeState.Hidden => "???", + UpgradeState.Viewable => $"{formatted}", + UpgradeState.Unlockable => $"{formatted}\n{Cost.AsString()}", + UpgradeState.Unlocked => $"{formatted}\nUnlocked", + _ => throw new ArgumentOutOfRangeException() + }; } + private bool IsUnlocked => State == UpgradeState.Unlocked; }