Improved look of main scene

This commit is contained in:
2026-04-21 19:53:45 +01:00
parent b88fb5cc50
commit e2d198269a
11 changed files with 294 additions and 120 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

View File

@@ -0,0 +1,130 @@
fileFormatVersion: 2
guid: e76da6b4d6427e84097b6d764b9a91bf
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: 0
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 30
spriteBorder: {x: 14, y: 14, z: 14, w: 14}
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: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
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: 4
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 1537655665
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -58,7 +58,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0} m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0} m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0} m_SelectOnRight: {fileID: 0}
m_Transition: 1 m_Transition: 2
m_Colors: m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@@ -68,10 +68,11 @@ MonoBehaviour:
m_ColorMultiplier: 1 m_ColorMultiplier: 1
m_FadeDuration: 0.1 m_FadeDuration: 0.1
m_SpriteState: m_SpriteState:
m_HighlightedSprite: {fileID: 0} m_HighlightedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0,
m_PressedSprite: {fileID: 0} type: 3}
m_SelectedSprite: {fileID: 0} m_PressedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0, type: 3}
m_DisabledSprite: {fileID: 0} m_SelectedSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_AnimationTriggers: m_AnimationTriggers:
m_NormalTrigger: Normal m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted m_HighlightedTrigger: Highlighted
@@ -111,8 +112,8 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 0} m_Sprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_Type: 0 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
m_FillMethod: 4 m_FillMethod: 4
@@ -120,7 +121,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1.5
--- !u!1 &6459787310772140154 --- !u!1 &6459787310772140154
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -179,7 +180,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@@ -187,8 +188,8 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 12800000, guid: 25598a8975ed29243bb850b56f191920, type: 3}
m_FontSize: 65 m_FontSize: 55
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 5 m_MinSize: 5

View File

@@ -14,17 +14,22 @@ MonoBehaviour:
m_EditorClassIdentifier: Fruitomation::Fruitomation.Game.BuildingRegistry m_EditorClassIdentifier: Fruitomation::Fruitomation.Game.BuildingRegistry
Buildings: Buildings:
- Name: Fan - Name: Fan
Requirement: 2
Prefab: {fileID: 8624048914473773482, guid: 1b5c88b3f8d08674a9b15155d6ba9a36, Prefab: {fileID: 8624048914473773482, guid: 1b5c88b3f8d08674a9b15155d6ba9a36,
type: 3} type: 3}
- Name: Stair - Name: Stair
Requirement: 0
Prefab: {fileID: 2132872997366704715, guid: 3cf8228c3f6c43d4cb60319693b11828, Prefab: {fileID: 2132872997366704715, guid: 3cf8228c3f6c43d4cb60319693b11828,
type: 3} type: 3}
- Name: Wall - Name: Wall
Requirement: 0
Prefab: {fileID: 1970033728917450326, guid: 3492b31295b69c148bb5a0660e598878, Prefab: {fileID: 1970033728917450326, guid: 3492b31295b69c148bb5a0660e598878,
type: 3} type: 3}
- Name: Spring - Name: Spring
Requirement: 0
Prefab: {fileID: 8624048914473773482, guid: 6060f6928011bf54dad9c5ef16fb1048, Prefab: {fileID: 8624048914473773482, guid: 6060f6928011bf54dad9c5ef16fb1048,
type: 3} type: 3}
- Name: Slicer - Name: Slicer
Requirement: 0
Prefab: {fileID: 8624048914473773482, guid: d26b0bb551b891e41a14009e6df42019, Prefab: {fileID: 8624048914473773482, guid: d26b0bb551b891e41a14009e6df42019,
type: 3} type: 3}

View File

@@ -146,7 +146,7 @@ RectTransform:
m_GameObject: {fileID: 48907754} m_GameObject: {fileID: 48907754}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1951065946} m_Father: {fileID: 1951065946}
@@ -169,7 +169,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@@ -177,17 +177,17 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 12800000, guid: 25598a8975ed29243bb850b56f191920, type: 3}
m_FontSize: 35 m_FontSize: 140
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0
m_MaxSize: 40 m_MaxSize: 140
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 0 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 1
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Edit m_Text: Edit
--- !u!222 &48907757 --- !u!222 &48907757
@@ -225,7 +225,7 @@ RectTransform:
m_GameObject: {fileID: 80689890} m_GameObject: {fileID: 80689890}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1347333877} m_Father: {fileID: 1347333877}
@@ -248,7 +248,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@@ -256,17 +256,17 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 12800000, guid: 25598a8975ed29243bb850b56f191920, type: 3}
m_FontSize: 35 m_FontSize: 140
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0
m_MaxSize: 40 m_MaxSize: 140
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 0 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 1
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Pause m_Text: Pause
--- !u!222 &80689893 --- !u!222 &80689893
@@ -352,7 +352,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0} m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
@@ -480,7 +480,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1200, y: 0} m_AnchoredPosition: {x: 1200, y: 0}
m_SizeDelta: {x: 175, y: 175} m_SizeDelta: {x: 175, y: 125}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &264715585 --- !u!114 &264715585
MonoBehaviour: MonoBehaviour:
@@ -501,7 +501,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0} m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0} m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0} m_SelectOnRight: {fileID: 0}
m_Transition: 1 m_Transition: 2
m_Colors: m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@@ -511,10 +511,11 @@ MonoBehaviour:
m_ColorMultiplier: 1 m_ColorMultiplier: 1
m_FadeDuration: 0.1 m_FadeDuration: 0.1
m_SpriteState: m_SpriteState:
m_HighlightedSprite: {fileID: 0} m_HighlightedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0,
m_PressedSprite: {fileID: 0} type: 3}
m_SelectedSprite: {fileID: 0} m_PressedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0, type: 3}
m_DisabledSprite: {fileID: 0} m_SelectedSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_AnimationTriggers: m_AnimationTriggers:
m_NormalTrigger: Normal m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted m_HighlightedTrigger: Highlighted
@@ -546,7 +547,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Sprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_Type: 1 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@@ -555,7 +556,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 2
--- !u!222 &264715587 --- !u!222 &264715587
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -601,7 +602,7 @@ Camera:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_ClearFlags: 2 m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0.45490196, b: 1, a: 1} m_BackGroundColor: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_projectionMatrixMode: 1 m_projectionMatrixMode: 1
m_GateFitMode: 2 m_GateFitMode: 2
m_FOVAxisMode: 0 m_FOVAxisMode: 0
@@ -879,15 +880,15 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.5849056, g: 0.5849056, b: 0.5849056, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 0} m_Sprite: {fileID: 21300000, guid: e76da6b4d6427e84097b6d764b9a91bf, type: 3}
m_Type: 0 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
m_FillMethod: 4 m_FillMethod: 4
@@ -895,7 +896,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 0.25
--- !u!222 &412089096 --- !u!222 &412089096
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1208,7 +1209,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1600, y: 0} m_AnchoredPosition: {x: 1600, y: 0}
m_SizeDelta: {x: 175, y: 175} m_SizeDelta: {x: 175, y: 125}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &873667507 --- !u!114 &873667507
MonoBehaviour: MonoBehaviour:
@@ -1229,7 +1230,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0} m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0} m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0} m_SelectOnRight: {fileID: 0}
m_Transition: 1 m_Transition: 2
m_Colors: m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@@ -1239,10 +1240,11 @@ MonoBehaviour:
m_ColorMultiplier: 1 m_ColorMultiplier: 1
m_FadeDuration: 0.1 m_FadeDuration: 0.1
m_SpriteState: m_SpriteState:
m_HighlightedSprite: {fileID: 0} m_HighlightedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0,
m_PressedSprite: {fileID: 0} type: 3}
m_SelectedSprite: {fileID: 0} m_PressedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0, type: 3}
m_DisabledSprite: {fileID: 0} m_SelectedSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_AnimationTriggers: m_AnimationTriggers:
m_NormalTrigger: Normal m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted m_HighlightedTrigger: Highlighted
@@ -1274,7 +1276,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Sprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_Type: 1 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@@ -1283,7 +1285,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 2
--- !u!222 &873667509 --- !u!222 &873667509
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1416,7 +1418,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_UiScaleMode: 1 m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100 m_ReferencePixelsPerUnit: 30
m_ScaleFactor: 1 m_ScaleFactor: 1
m_ReferenceResolution: {x: 3840, y: 2160} m_ReferenceResolution: {x: 3840, y: 2160}
m_ScreenMatchMode: 1 m_ScreenMatchMode: 1
@@ -1578,7 +1580,7 @@ RectTransform:
m_GameObject: {fileID: 1314545342} m_GameObject: {fileID: 1314545342}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 873667506} m_Father: {fileID: 873667506}
@@ -1601,7 +1603,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@@ -1609,17 +1611,17 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 12800000, guid: 25598a8975ed29243bb850b56f191920, type: 3}
m_FontSize: 35 m_FontSize: 140
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0
m_MaxSize: 40 m_MaxSize: 140
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 0 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 1
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Build m_Text: Build
--- !u!222 &1314545345 --- !u!222 &1314545345
@@ -1657,7 +1659,7 @@ RectTransform:
m_GameObject: {fileID: 1326837323} m_GameObject: {fileID: 1326837323}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 1511006085} m_Father: {fileID: 1511006085}
@@ -1680,7 +1682,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@@ -1688,17 +1690,17 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 12800000, guid: 25598a8975ed29243bb850b56f191920, type: 3}
m_FontSize: 35 m_FontSize: 140
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0
m_MaxSize: 40 m_MaxSize: 140
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 0 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 1
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Upgrades m_Text: Upgrades
--- !u!222 &1326837326 --- !u!222 &1326837326
@@ -1811,6 +1813,7 @@ MonoBehaviour:
GridPosition: {x: 0, y: 0} GridPosition: {x: 0, y: 0}
SelectedBuildingToBuild: SelectedBuildingToBuild:
Name: Name:
Requirement: 0
Prefab: {fileID: 0} Prefab: {fileID: 0}
FlipCurrentBuilding: 0 FlipCurrentBuilding: 0
--- !u!58 &1330313879 --- !u!58 &1330313879
@@ -1886,7 +1889,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1800, y: 0} m_AnchoredPosition: {x: 1800, y: 0}
m_SizeDelta: {x: 175, y: 175} m_SizeDelta: {x: 175, y: 125}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1347333878 --- !u!114 &1347333878
MonoBehaviour: MonoBehaviour:
@@ -1907,7 +1910,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0} m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0} m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0} m_SelectOnRight: {fileID: 0}
m_Transition: 1 m_Transition: 2
m_Colors: m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@@ -1917,10 +1920,11 @@ MonoBehaviour:
m_ColorMultiplier: 1 m_ColorMultiplier: 1
m_FadeDuration: 0.1 m_FadeDuration: 0.1
m_SpriteState: m_SpriteState:
m_HighlightedSprite: {fileID: 0} m_HighlightedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0,
m_PressedSprite: {fileID: 0} type: 3}
m_SelectedSprite: {fileID: 0} m_PressedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0, type: 3}
m_DisabledSprite: {fileID: 0} m_SelectedSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_AnimationTriggers: m_AnimationTriggers:
m_NormalTrigger: Normal m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted m_HighlightedTrigger: Highlighted
@@ -1952,7 +1956,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Sprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_Type: 1 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@@ -1961,7 +1965,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 2
--- !u!222 &1347333880 --- !u!222 &1347333880
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2067,7 +2071,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1400, y: 0} m_AnchoredPosition: {x: 1400, y: 0}
m_SizeDelta: {x: 175, y: 175} m_SizeDelta: {x: 175, y: 125}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1511006086 --- !u!114 &1511006086
MonoBehaviour: MonoBehaviour:
@@ -2088,7 +2092,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0} m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0} m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0} m_SelectOnRight: {fileID: 0}
m_Transition: 1 m_Transition: 2
m_Colors: m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@@ -2098,10 +2102,11 @@ MonoBehaviour:
m_ColorMultiplier: 1 m_ColorMultiplier: 1
m_FadeDuration: 0.1 m_FadeDuration: 0.1
m_SpriteState: m_SpriteState:
m_HighlightedSprite: {fileID: 0} m_HighlightedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0,
m_PressedSprite: {fileID: 0} type: 3}
m_SelectedSprite: {fileID: 0} m_PressedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0, type: 3}
m_DisabledSprite: {fileID: 0} m_SelectedSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_AnimationTriggers: m_AnimationTriggers:
m_NormalTrigger: Normal m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted m_HighlightedTrigger: Highlighted
@@ -2133,7 +2138,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Sprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_Type: 1 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@@ -2142,7 +2147,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 2
--- !u!222 &1511006088 --- !u!222 &1511006088
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2335,7 +2340,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1000, y: 0} m_AnchoredPosition: {x: 1000, y: 0}
m_SizeDelta: {x: 175, y: 175} m_SizeDelta: {x: 175, y: 125}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1951065947 --- !u!114 &1951065947
MonoBehaviour: MonoBehaviour:
@@ -2356,7 +2361,7 @@ MonoBehaviour:
m_SelectOnDown: {fileID: 0} m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0} m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0} m_SelectOnRight: {fileID: 0}
m_Transition: 1 m_Transition: 2
m_Colors: m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1} m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
@@ -2366,10 +2371,11 @@ MonoBehaviour:
m_ColorMultiplier: 1 m_ColorMultiplier: 1
m_FadeDuration: 0.1 m_FadeDuration: 0.1
m_SpriteState: m_SpriteState:
m_HighlightedSprite: {fileID: 0} m_HighlightedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0,
m_PressedSprite: {fileID: 0} type: 3}
m_SelectedSprite: {fileID: 0} m_PressedSprite: {fileID: 21300000, guid: 451e6df5541d3f4498972852b96985a0, type: 3}
m_DisabledSprite: {fileID: 0} m_SelectedSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_AnimationTriggers: m_AnimationTriggers:
m_NormalTrigger: Normal m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted m_HighlightedTrigger: Highlighted
@@ -2401,7 +2407,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Sprite: {fileID: 21300000, guid: fd64923844b14084ead7988cb85f3f18, type: 3}
m_Type: 1 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@@ -2410,7 +2416,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 2
--- !u!222 &1951065949 --- !u!222 &1951065949
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2613,7 +2619,7 @@ RectTransform:
m_GameObject: {fileID: 2106145556} m_GameObject: {fileID: 2106145556}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 264715584} m_Father: {fileID: 264715584}
@@ -2636,7 +2642,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_Color: {r: 0.96862745, g: 0.94509804, b: 0.8862745, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
@@ -2644,17 +2650,17 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_Font: {fileID: 12800000, guid: 25598a8975ed29243bb850b56f191920, type: 3}
m_FontSize: 35 m_FontSize: 140
m_FontStyle: 0 m_FontStyle: 0
m_BestFit: 0 m_BestFit: 0
m_MinSize: 0 m_MinSize: 0
m_MaxSize: 40 m_MaxSize: 140
m_Alignment: 4 m_Alignment: 4
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 0 m_HorizontalOverflow: 1
m_VerticalOverflow: 0 m_VerticalOverflow: 1
m_LineSpacing: 1 m_LineSpacing: 1
m_Text: Simulate m_Text: Simulate
--- !u!222 &2106145559 --- !u!222 &2106145559
@@ -2708,7 +2714,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -980} m_AnchoredPosition: {x: 0, y: -980}
m_SizeDelta: {x: 6000, y: 200} m_SizeDelta: {x: 3840, y: 200}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!61 &2112507920 --- !u!61 &2112507920
BoxCollider2D: BoxCollider2D:
@@ -2754,7 +2760,7 @@ BoxCollider2D:
drawMode: 0 drawMode: 0
adaptiveTiling: 0 adaptiveTiling: 0
m_AutoTiling: 0 m_AutoTiling: 0
m_Size: {x: 3840, y: 200} m_Size: {x: 5000, y: 200}
m_EdgeRadius: 0 m_EdgeRadius: 0
--- !u!114 &2112507921 --- !u!114 &2112507921
MonoBehaviour: MonoBehaviour:
@@ -2769,15 +2775,15 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 0} m_Sprite: {fileID: 21300000, guid: e76da6b4d6427e84097b6d764b9a91bf, type: 3}
m_Type: 0 m_Type: 1
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
m_FillMethod: 4 m_FillMethod: 4
@@ -2785,7 +2791,7 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 0.25
--- !u!222 &2112507922 --- !u!222 &2112507922
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -77,18 +77,27 @@ namespace Fruitomation.Game
{ {
[Serializable] public class Serialized [Serializable] public class Serialized
{ {
[SerializeField] private BuildingUnlock[] BuildingUnlocks;
[SerializeField] private BasicUpgrade[] BasicUpgrades; [SerializeField] private BasicUpgrade[] BasicUpgrades;
private Serialized() private Serialized()
{ {
// All logic done in Serialize // All logic done in Serialize() function
} }
public UnlockedUpgrades Unserialize() public UnlockedUpgrades Unserialize()
{ {
UnlockedUpgrades upgrades = new(); UnlockedUpgrades upgrades = new();
foreach (BasicUpgrade upgrade in BasicUpgrades)
if (BuildingUnlocks is not null)
{ {
foreach (BuildingUnlock unlock in BuildingUnlocks)
upgrades.Buildings.Add(unlock);
}
if (BasicUpgrades is not null)
{
foreach (BasicUpgrade upgrade in BasicUpgrades)
upgrades.Unlocks.Add(upgrade); upgrades.Unlocks.Add(upgrade);
} }
@@ -99,15 +108,16 @@ namespace Fruitomation.Game
{ {
Serialized serialized = new() Serialized serialized = new()
{ {
BasicUpgrades = upgrades.Unlocks.ToArray() BuildingUnlocks = upgrades.Buildings.ToArray(),
BasicUpgrades = upgrades.Unlocks.ToArray(),
}; };
return serialized; return serialized;
} }
} }
private HashSet<BuildingUnlock> Buildings = new(); private readonly HashSet<BuildingUnlock> Buildings = new();
private HashSet<BasicUpgrade> Unlocks = new(); private readonly HashSet<BasicUpgrade> Unlocks = new();
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Unlock(BuildingUnlock unlock) => Buildings.Add(unlock); public void Unlock(BuildingUnlock unlock) => Buildings.Add(unlock);
@@ -168,12 +178,8 @@ namespace Fruitomation.Game
public static void Unlock(BasicUpgrade upgrade) => CurrentUpgrades.Unlock(upgrade); public static void Unlock(BasicUpgrade upgrade) => CurrentUpgrades.Unlock(upgrade);
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Is(BuildingUnlock unlock) public static bool Is(BuildingUnlock unlock) =>
{ unlock == BuildingUnlock.None || CurrentUpgrades.IsUnlocked(unlock);
return unlock == BuildingUnlock.None
? throw new ArgumentOutOfRangeException(nameof(unlock))
: CurrentUpgrades.IsUnlocked(unlock);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)] [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Is(BasicUpgrade upgrade) => CurrentUpgrades.IsUnlocked(upgrade); public static bool Is(BasicUpgrade upgrade) => CurrentUpgrades.IsUnlocked(upgrade);

View File

@@ -164,7 +164,7 @@ namespace Fruitomation.UI
UpgradeState.Viewable => $"{formatted}", UpgradeState.Viewable => $"{formatted}",
UpgradeState.Unlockable => $"{formatted}\n{Cost.AsString()}", UpgradeState.Unlockable => $"{formatted}\n{Cost.AsString()}",
UpgradeState.Unlocked => $"{formatted}\nUnlocked", UpgradeState.Unlocked => $"{formatted}\nUnlocked",
_ => throw new ArgumentOutOfRangeException() var _ => throw new ArgumentOutOfRangeException()
}; };
} }

View File

@@ -0,0 +1,16 @@
using UnityEngine;
public class BuildiingUnlockButton : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 062558955cb2e0447a23f174dd90d495

View File

@@ -1,4 +1,5 @@
using Fruitomation.Global; using System;
using Fruitomation.Global;
using Fruitomation.Game; using Fruitomation.Game;
using UnityEngine.UI; using UnityEngine.UI;
using UnityEngine; using UnityEngine;
@@ -14,15 +15,18 @@ namespace Fruitomation.UI
[SerializeField] private GameObject MenuItemPrefab; [SerializeField] private GameObject MenuItemPrefab;
[SerializeField] private BuildingRegistry BuildingPrefabs; [SerializeField] private BuildingRegistry BuildingPrefabs;
private void Update() private void Update() =>
{
Menu.SetActive(GameStateController.Is(GameState.BuildingMenu)); Menu.SetActive(GameStateController.Is(GameState.BuildingMenu));
}
private void Start() private void Start()
{ {
foreach (BuildingRegistry.BuildingInfo info in BuildingPrefabs.GetBuildings()) foreach (BuildingRegistry.BuildingInfo info in BuildingPrefabs.GetBuildings())
{ {
if (!UpgradeManager.Is(info.Requirement))
{
continue;
}
GameObject go = Instantiate(MenuItemPrefab, MenuGrid.transform); GameObject go = Instantiate(MenuItemPrefab, MenuGrid.transform);
Text text = go.GetComponentInChildren<Text>(); Text text = go.GetComponentInChildren<Text>();

View File

@@ -49,7 +49,11 @@ namespace Fruitomation.UI
return result; return result;
} }
private void Update() => private void Update()
Image.enabled = GameStateController.Is(GameState.Building); {
Image.enabled =
GameStateController.Is(GameState.Building) ||
GameStateController.Is(GameState.Editing);
}
} }
} }