Skip to content

Commit

Permalink
Module buttons are now disabled when they cannot be applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Greenfoot5 committed Sep 25, 2023
1 parent 4fac35d commit dd6d3f9
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 138 deletions.
3 changes: 2 additions & 1 deletion Tower Defence/Assets/Gameplay/Shop.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Abstract;
using System;
using Abstract;
using Abstract.Data;
using Levels.Maps;
using MaterialLibrary.Trapezium;
Expand Down
264 changes: 142 additions & 122 deletions Tower Defence/Assets/Levels/Maps/Prototype/PrototypeLevel.unity
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,46 @@ Material:
- _StencilWriteMask: 1
m_Colors: []
m_BuildTextureStacks: []
--- !u!21 &295714646
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Custom/ProgressBar
m_Shader: {fileID: 4800000, guid: 310735eb07c0c45138732ef42591db14, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _Flip: 1
- _OutOffset: 0
- _OutX: 0.074
- _OutY: 0.166
- _Percentage: 0.497
- _ShowHalf: 0.447
- _TrapPercent: 0.771
m_Colors:
- _BarColorA: {r: 0.039215688, g: 0.8862745, b: 0.9490196, a: 1}
- _BarColorB: {r: 0.058823526, g: 0.617323, b: 0.8392157, a: 1}
- _BgColorA: {r: 0.26286048, g: 0.2632012, b: 0.31132078, a: 1}
- _BgColorB: {r: 0.1728818, g: 0.1728818, b: 0.1981132, a: 1}
- _OutColorA: {r: 0.6740388, g: 0.6740388, b: 0.764151, a: 1}
- _OutColorB: {r: 0.374466, g: 0.374466, b: 0.4811321, a: 1}
m_BuildTextureStacks: []
--- !u!21 &304529284
Material:
serializedVersion: 8
Expand Down Expand Up @@ -702,46 +742,6 @@ Camera:
m_CorrespondingSourceObject: {fileID: 5837894107962673298, guid: 84f5c17147e1542e289158835f7db2e2, type: 3}
m_PrefabInstance: {fileID: 5837894107527360749}
m_PrefabAsset: {fileID: 0}
--- !u!21 &536691054
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Custom/ProgressBar
m_Shader: {fileID: 4800000, guid: 310735eb07c0c45138732ef42591db14, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _Flip: 1
- _OutOffset: 0
- _OutX: 0.074
- _OutY: 0.166
- _Percentage: 0.497
- _ShowHalf: 0.447
- _TrapPercent: 0.771
m_Colors:
- _BarColorA: {r: 0.039215688, g: 0.8862745, b: 0.9490196, a: 1}
- _BarColorB: {r: 0.058823526, g: 0.617323, b: 0.8392157, a: 1}
- _BgColorA: {r: 0.26286048, g: 0.2632012, b: 0.31132078, a: 1}
- _BgColorB: {r: 0.1728818, g: 0.1728818, b: 0.1981132, a: 1}
- _OutColorA: {r: 0.6740388, g: 0.6740388, b: 0.764151, a: 1}
- _OutColorB: {r: 0.374466, g: 0.374466, b: 0.4811321, a: 1}
m_BuildTextureStacks: []
--- !u!114 &605083547 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4161275288486783620, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
Expand Down Expand Up @@ -1234,92 +1234,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!21 &1434342825
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Custom/Hexagon/Background
m_Shader: {fileID: 4800000, guid: ed68a8b04f84ecb409d59da8d5a51d8d, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _GlowClamp: 0
- _GlowIntensity: 0
- _GlowOpacity: 0
- _HexScale: 15
- _Opacity: 1
- _Overlay: -0.03
- _ScrollSpeed: 0.002
- _ShiftSpeed: 0.3
m_Colors:
- _OffsetUV: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!1 &1579177155 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4077244561648582637, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
m_PrefabInstance: {fileID: 4077244562611154295}
m_PrefabAsset: {fileID: 0}
--- !u!21 &1599284625
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/Default/GlowBox
m_Shader: {fileID: 4800000, guid: 7de4ed2dc5ffe4692bab04ccee07312e, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _GlowClamp: 0.5
- _GlowIntensity: 0.3
- _GlowOpacity: 0.7
- _Opacity: 0
- _Stencil: 1
- _StencilComp: 2
- _StencilOp: 3
- _StencilReadMask: 1
- _StencilWriteMask: 1
m_Colors: []
m_BuildTextureStacks: []
--- !u!21 &1737393527
Material:
serializedVersion: 8
Expand Down Expand Up @@ -1534,6 +1453,46 @@ Transform:
- {fileID: 7964934783970315043}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1930409630
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Custom/Hexagon/Background
m_Shader: {fileID: 4800000, guid: ed68a8b04f84ecb409d59da8d5a51d8d, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _GlowClamp: 0
- _GlowIntensity: 0
- _GlowOpacity: 0
- _HexScale: 15
- _Opacity: 1
- _Overlay: -0.03
- _ScrollSpeed: 0.002
- _ShiftSpeed: 0.3
m_Colors:
- _OffsetUV: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &2009016680 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7229574083802123749, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
Expand Down Expand Up @@ -1578,6 +1537,47 @@ Transform:
- {fileID: 5782079355676140686}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &2119507868
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/Default/GlowBox
m_Shader: {fileID: 4800000, guid: 7de4ed2dc5ffe4692bab04ccee07312e, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _GlowClamp: 0.5
- _GlowIntensity: 0.3
- _GlowOpacity: 0.7
- _Opacity: 0
- _Stencil: 1
- _StencilComp: 2
- _StencilOp: 3
- _StencilReadMask: 1
- _StencilWriteMask: 1
m_Colors: []
m_BuildTextureStacks: []
--- !u!1001 &4077244562611154295
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1872,7 +1872,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1898650749496772999, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.00000859797
value: -0.000002257526
objectReference: {fileID: 0}
- target: {fileID: 1910452813586111486, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: m_fontSize
Expand Down Expand Up @@ -2262,6 +2262,22 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 50.50009
objectReference: {fileID: 0}
- target: {fileID: 3949709464969229406, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: moduleDisabledColor.a
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3949709464969229406, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: moduleDisabledColor.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3949709464969229406, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: moduleDisabledColor.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3949709464969229406, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: moduleDisabledColor.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3949904492204866889, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: m_AnchorMax.y
value: 0
Expand Down Expand Up @@ -2550,6 +2566,10 @@ PrefabInstance:
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4542663115809234340, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: m_Interactable
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4566527022222179825, guid: 4804c306899ea47ffbe14d11731a53dc, type: 3}
propertyPath: m_AnchorMax.y
value: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ MonoBehaviour:
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.6, g: 0.6, b: 0.6, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_DisabledColor: {r: 0.3, g: 0.3, b: 0.3, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
Expand Down Expand Up @@ -436,6 +436,7 @@ MonoBehaviour:
modulesBg: {fileID: 3176922926783445552}
glyphPrefab: {fileID: 3688469175720797820, guid: ce51595031e3355478e8d944509a4d88, type: 3}
applicableGlyphs: {fileID: 1232673582454904983}
accent: {r: 0, g: 0, b: 0, a: 0}
--- !u!1 &5902399943947320647
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -582,6 +583,10 @@ PrefabInstance:
propertyPath: m_Name
value: ModuleIcon
objectReference: {fileID: 0}
- target: {fileID: 4062421759546837549, guid: 199784de83837a343bb9f0740a40d2ce, type: 3}
propertyPath: m_fontSize
value: 13.9
objectReference: {fileID: 0}
- target: {fileID: 5982173759769933209, guid: 199784de83837a343bb9f0740a40d2ce, type: 3}
propertyPath: m_Pivot.x
value: 0.5
Expand Down
Loading

0 comments on commit dd6d3f9

Please sign in to comment.