3 Commits

Author SHA1 Message Date
a4660d6e4b Gamejam Release 2024-08-20 19:51:14 +02:00
4-Bit-Player
5b9766de50 Added the basic purchase multiplier for houses and to un/assign workers. 2024-08-20 17:36:05 +02:00
4-Bit-Player
92e89222b2 Fixed the bug that prevented to remove workers from the brickworks. 2024-08-20 17:35:40 +02:00
9 changed files with 808 additions and 54 deletions

3
.gitignore vendored
View File

@@ -29,6 +29,9 @@
# Visual Studio cache directory
.vs/
# Rider cache directory
.idea/
# Gradle cache directory
.gradle/

View File

@@ -398,6 +398,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bde21470ef329a94caf3c31d0d3ff253, type: 3}
m_Name:
m_EditorClassIdentifier:
mouseNotificationLabel: {fileID: 71488340529515895, guid: 2bd387484a077f34cbd512af8b72e8e5, type: 3}
--- !u!1 &6006781915246697612
GameObject:
m_ObjectHideFlags: 0

View File

@@ -313,6 +313,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bde21470ef329a94caf3c31d0d3ff253, type: 3}
m_Name:
m_EditorClassIdentifier:
mouseNotificationLabel: {fileID: 71488340529515895, guid: 2bd387484a077f34cbd512af8b72e8e5, type: 3}
--- !u!1 &1367277403132133154
GameObject:
m_ObjectHideFlags: 0

View File

@@ -637,6 +637,10 @@ PrefabInstance:
propertyPath: m_Size.z
value: 2.728727
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Center.x
value: -0.106540665
@@ -651,15 +655,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 9042605437287805907, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.x
value: 0.593
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9042605437287805907, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.y
value: 0.256
value: 2.77
objectReference: {fileID: 0}
- target: {fileID: 9042605437287805907, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.z
value: 3.46
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -1378,7 +1382,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
ttnw: 10
mouseNotificationLabel: {fileID: 71488340529515895, guid: 2bd387484a077f34cbd512af8b72e8e5, type: 3}
cost: 0a0000000500000002000000
cost: 020000000100000001000000
notificationOrigin: {fileID: 337407523}
houseReqLabel: {fileID: 2005516827}
--- !u!4 &360352143
@@ -1667,6 +1671,14 @@ PrefabInstance:
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 5781147aca01e5e45a589857e3e85276, type: 2}
- target: {fileID: 6941695794414074045, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_Size.y
value: 2.0660892
objectReference: {fileID: 0}
- target: {fileID: 6941695794414074045, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_Center.y
value: 0.533043
objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.x
value: 6.29
@@ -2165,6 +2177,14 @@ PrefabInstance:
propertyPath: storedLabel
value:
objectReference: {fileID: 616695819}
- target: {fileID: 6941695794414074045, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_Size.y
value: 2.0248933
objectReference: {fileID: 0}
- target: {fileID: 6941695794414074045, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_Center.y
value: 0.512445
objectReference: {fileID: 0}
- target: {fileID: 7283071577578016024, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalScale.y
value: 2.18
@@ -3180,6 +3200,81 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0709c07fd41dfb544911adc6d80c707c, type: 3}
--- !u!1 &821322472
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 821322473}
- component: {fileID: 821322475}
- component: {fileID: 821322474}
m_Layer: 5
m_Name: Panel (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &821322473
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 821322472}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1921084626}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 269.39, y: -0.00019836426}
m_SizeDelta: {x: -538.77, y: -96.855}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &821322474
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 821322472}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.94509804}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &821322475
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 821322472}
m_CullTransparentMesh: 1
--- !u!1 &862875588 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4510451057430217321, guid: 75816cff53a02be4b974943128b2044d, type: 3}
@@ -3673,6 +3768,143 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
m_PrefabInstance: {fileID: 2957543503499815533}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1001728587
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1001728588}
- component: {fileID: 1001728590}
- component: {fileID: 1001728589}
m_Layer: 5
m_Name: MovingInTutorial (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1001728588
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1001728587}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1921084626}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 732.4802, y: 188.28998}
m_Pivot: {x: 1, y: 1}
--- !u!114 &1001728589
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1001728587}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "Once housing is available > \nnew workers will slowly start moving
in.\nOne house can accomodate up to 3 workers"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1001728590
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1001728587}
m_CullTransparentMesh: 1
--- !u!1001 &1010175415
PrefabInstance:
m_ObjectHideFlags: 0
@@ -3725,6 +3957,14 @@ PrefabInstance:
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f7ab03340959dd4ca14ff3bc56af897, type: 2}
- target: {fileID: 6941695794414074045, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_Size.y
value: 2.1110175
objectReference: {fileID: 0}
- target: {fileID: 6941695794414074045, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_Center.y
value: 0.55550826
objectReference: {fileID: 0}
- target: {fileID: 7283071577578016024, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalScale.y
value: 2.7
@@ -4102,15 +4342,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Size.x
value: 3.920886
value: 6.5335712
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Size.y
value: 1.4945062
value: 1.9114232
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Size.z
value: 2.5597816
value: 6.4350405
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Enabled
@@ -4118,15 +4358,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Center.x
value: 1.1208253
value: -0.40483046
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Center.y
value: 0.247253
value: 0.45571136
objectReference: {fileID: 0}
- target: {fileID: 7436088187129221333, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_Center.z
value: 0.7798908
value: 1.378441
objectReference: {fileID: 0}
- target: {fileID: 8621736391012958675, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalRotation.w
@@ -4409,6 +4649,51 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0709c07fd41dfb544911adc6d80c707c, type: 3}
--- !u!1 &1171526039
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1171526041}
- component: {fileID: 1171526040}
m_Layer: 0
m_Name: PurchaseMultiplier
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1171526040
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1171526039}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9980f1709cbec1e4db2c3690a04cfe4b, type: 3}
m_Name:
m_EditorClassIdentifier:
purchaseAmount: 1
--- !u!4 &1171526041
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1171526039}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1794.6354, y: 469.93106, z: -4.03125}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1175890339
GameObject:
m_ObjectHideFlags: 0
@@ -4732,6 +5017,81 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
m_PrefabInstance: {fileID: 582540973}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1246260843
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1246260844}
- component: {fileID: 1246260846}
- component: {fileID: 1246260845}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1246260844
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1246260843}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1921084626}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -96.8542, y: 24.2136}
m_SizeDelta: {x: -193.7085, y: -48.4271}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1246260845
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1246260843}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 0.94509804}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1246260846
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1246260843}
m_CullTransparentMesh: 1
--- !u!1 &1269002630
GameObject:
m_ObjectHideFlags: 0
@@ -6486,6 +6846,7 @@ RectTransform:
- {fileID: 390187740}
- {fileID: 1966773339}
- {fileID: 384713551}
- {fileID: 2093698915}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -7236,7 +7597,10 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 1246260844}
- {fileID: 821322473}
- {fileID: 1001728588}
m_Father: {fileID: 1808788429}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
@@ -7251,7 +7615,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1921084625}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
@@ -8127,6 +8491,142 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2025257284}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &2044854434
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2044854435}
- component: {fileID: 2044854437}
- component: {fileID: 2044854436}
m_Layer: 5
m_Name: PurchaseAmountText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2044854435
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2044854434}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2093698915}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2044854436
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2044854434}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Toggle Buy/Worker Amount
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &2044854437
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2044854434}
m_CullTransparentMesh: 1
--- !u!1001 &2082680334
PrefabInstance:
m_ObjectHideFlags: 0
@@ -8339,6 +8839,139 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2091956029}
m_CullTransparentMesh: 1
--- !u!1 &2093698914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2093698915}
- component: {fileID: 2093698919}
- component: {fileID: 2093698918}
- component: {fileID: 2093698917}
m_Layer: 5
m_Name: TogglePurchaseBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2093698915
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093698914}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2044854435}
m_Father: {fileID: 1808788429}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 841, y: -83}
m_SizeDelta: {x: 215, y: 65.38}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2093698917
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093698914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
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.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2093698918}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1171526040}
m_TargetAssemblyTypeName: TogglePurchaseAmount, Assembly-CSharp
m_MethodName: OnClick
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2093698918
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093698914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &2093698919
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2093698914}
m_CullTransparentMesh: 1
--- !u!1001 &717283145652666488
PrefabInstance:
m_ObjectHideFlags: 0
@@ -8416,10 +9049,6 @@ PrefabInstance:
propertyPath: m_SpriteSortPoint
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1387595806737865962, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_margin.w
value: 1.2934266
objectReference: {fileID: 0}
- target: {fileID: 2116754873668943033, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalScale.x
value: 0.65
@@ -8556,25 +9185,9 @@ PrefabInstance:
propertyPath: m_DynamicOccludee
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8621736391012958675, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_AnchoredPosition.x
value: 1.58
objectReference: {fileID: 0}
- target: {fileID: 8621736391012958675, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0.55
objectReference: {fileID: 0}
- target: {fileID: 9042605437287805907, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.x
value: 0.83
objectReference: {fileID: 0}
- target: {fileID: 9042605437287805907, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.y
value: 3.97
objectReference: {fileID: 0}
- target: {fileID: 9042605437287805907, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.z
value: -0.9
value: 3.735
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
@@ -8728,3 +9341,4 @@ SceneRoots:
- {fileID: 179318997}
- {fileID: 1808788429}
- {fileID: 462504852}
- {fileID: 1171526041}

View File

@@ -5,11 +5,17 @@ using UnityEngine;
public class AssignableWorker : MonoBehaviour
{
private int workersAssigned = 0;
private TogglePurchaseAmount purchaseAmount;
private GameManager gameManager;
private int workerAmount = 0;
[SerializeField]
private GameObject mouseNotificationLabel;
// Start is called before the first frame update
void Start()
{
purchaseAmount = GameObject.Find("PurchaseMultiplier").GetComponent<TogglePurchaseAmount>();
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
}
@@ -20,18 +26,28 @@ public class AssignableWorker : MonoBehaviour
public void AddWorker()
{
if(gameManager.GetResourceCount(Resource.WORKER) > 0)
workerAmount = purchaseAmount.GetPurchaseAmount();
if(gameManager.GetResourceCount(Resource.WORKER) >= workerAmount)
{
workersAssigned++;
gameManager.RemoveResource(Resource.WORKER, 1);
workersAssigned += workerAmount;
gameManager.RemoveResource(Resource.WORKER, workerAmount);
} else
{
GameObject infoLabel = Instantiate(mouseNotificationLabel, GameObject.Find("Canvas").transform);
infoLabel.GetComponent<MousePosLabel>().tmp.text = "No worker available!";
infoLabel.GetComponent<MousePosLabel>().direction = new Vector3(0, 4, 0);
}
}
public bool RemoveWorker()
{
if (workersAssigned == 0) return false;
workersAssigned--;
gameManager.AddResource(Resource.WORKER, 1);
workerAmount = purchaseAmount.GetPurchaseAmount();
if (workersAssigned < workerAmount) return false;
workersAssigned -= workerAmount;
gameManager.AddResource(Resource.WORKER, workerAmount);
return true;
}
}

View File

@@ -9,6 +9,8 @@ public class HouseManager : MonoBehaviour
private float ttnw = 30; //Time to next worker
private float currentTtnw = 0;
private int workerPerHouse = 3;
private int purchaseMultiplier;
private TogglePurchaseAmount purchaseAmount;
private GameManager gameManager;
[SerializeField]
private GameObject mouseNotificationLabel;
@@ -16,21 +18,23 @@ public class HouseManager : MonoBehaviour
public int[] cost = new int[3] { 10, 5, 2 };
[SerializeField]
private Transform notificationOrigin;
[SerializeField]
[SerializeField]
private TMP_Text houseReqLabel;
// Start is called before the first frame update
void Start()
{
purchaseAmount = GameObject.Find("PurchaseMultiplier").GetComponent<TogglePurchaseAmount>();
gameManager = GameObject.Find("GameManager").GetComponent<GameManager>();
}
// Update is called once per frame
void Update()
{
houseReqLabel.text = $"{gameManager.GetResourceCount(Resource.BRICK)}/{cost[0]} Bricks\n" +
$"{gameManager.GetResourceCount(Resource.TILE)}/{cost[1]} Tiles\n" +
$"{gameManager.GetResourceCount(Resource.PLANKS)}/{cost[2]} Planks\n";
if (currentTtnw > 0)
purchaseMultiplier = purchaseAmount.GetPurchaseAmount();
houseReqLabel.text = $"{gameManager.GetResourceCount(Resource.BRICK)}/{cost[0] * purchaseMultiplier} Bricks\n" +
$"{gameManager.GetResourceCount(Resource.TILE)}/{cost[1] * purchaseMultiplier} Tiles\n" +
$"{gameManager.GetResourceCount(Resource.PLANKS)}/{cost[2] * purchaseMultiplier} Planks\n";
if (currentTtnw > 0)
{
currentTtnw -= Time.deltaTime;
} else
@@ -53,9 +57,9 @@ public class HouseManager : MonoBehaviour
public void BuildHouse()
{
if (gameManager.GetResourceCount(Resource.BRICK) < cost[0] ||
gameManager.GetResourceCount(Resource.TILE) < cost[1] ||
gameManager.GetResourceCount(Resource.PLANKS) < cost[2])
if (gameManager.GetResourceCount(Resource.BRICK) < cost[0] * purchaseMultiplier ||
gameManager.GetResourceCount(Resource.TILE) < cost[1] * purchaseMultiplier ||
gameManager.GetResourceCount(Resource.PLANKS) < cost[2] * purchaseMultiplier)
{
Debug.Log("Not enough resources to build house!");
GameObject infoLabel = Instantiate(mouseNotificationLabel, GameObject.Find("Canvas").transform);
@@ -64,9 +68,9 @@ public class HouseManager : MonoBehaviour
return;
}
gameManager.RemoveResource(Resource.BRICK, cost[0]);
gameManager.RemoveResource(Resource.TILE, cost[1]);
gameManager.RemoveResource(Resource.PLANKS, cost[2]);
gameManager.AddResource(Resource.HOUSE, 1);
gameManager.RemoveResource(Resource.BRICK, cost[0] * purchaseMultiplier);
gameManager.RemoveResource(Resource.TILE, cost[1] * purchaseMultiplier);
gameManager.RemoveResource(Resource.PLANKS, cost[2] * purchaseMultiplier);
gameManager.AddResource(Resource.HOUSE, 1 * purchaseMultiplier);
}
}

View File

@@ -0,0 +1,71 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Mime;
using UnityEngine;
using UnityEngine.UIElements;
using TMPro;
using Unity.VisualScripting;
public class TogglePurchaseAmount : MonoBehaviour
{
private int[] options= {1, 10, 100};
private int selected = 0;
public int purchaseAmount = 1;
TMP_Text displayThing;
// Start is called before the first frame update
void Start()
{
displayThing = GameObject.Find("PurchaseAmountText").GetComponent<TMP_Text>();
UpdateDisplayAmount();
}
// Update is called once per frame
void Update()
{
}
public void OnClick()
{
selected = (selected + 1) % options.Length;
purchaseAmount = options[selected];
UpdateDisplayAmount();
Debug.Log(purchaseAmount);
}
private void UpdateDisplayAmount()
{
displayThing.text = "Toggle Buy/Worker Amount x " + purchaseAmount.ToString();
}
public int GetPurchaseAmount()
{
return purchaseAmount;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9980f1709cbec1e4db2c3690a04cfe4b

View File

@@ -13,7 +13,7 @@ PlayerSettings:
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: KittenBox
productName: gmtk-2024
productName: Monumental
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -285,7 +285,49 @@ PlayerSettings:
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
AndroidReportGooglePlayAppDependencies: 1
m_BuildTargetIcons: []
m_BuildTargetIcons:
- m_BuildTarget: Standalone
m_Icons:
- serializedVersion: 2
m_Icon: {fileID: 2800000, guid: 0c7a706565a2712498701694a59fdbce, type: 3}
m_Width: 1024
m_Height: 1024
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 512
m_Height: 512
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 256
m_Height: 256
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 128
m_Height: 128
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 64
m_Height: 64
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 48
m_Height: 48
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 32
m_Height: 32
m_Kind: 0
- serializedVersion: 2
m_Icon: {fileID: 0}
m_Width: 16
m_Height: 16
m_Kind: 0
m_BuildTargetPlatformIcons: []
m_BuildTargetBatching:
- m_BuildTarget: Standalone