Add world map view

This commit is contained in:
2024-08-18 18:11:05 +02:00
committed by Minz
parent a7fd4a2fb1
commit 762d982929
8 changed files with 847 additions and 45 deletions

View File

@@ -129,15 +129,15 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 3.1 value: 11.4800005
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.8399992 value: -7.28
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -5.24 value: 5.63
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -207,7 +207,7 @@ GameObject:
m_Layer: 0 m_Layer: 0
m_Name: GameManager m_Name: GameManager
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 2800000, guid: 9eff477e4332346818c96745043dae9e, type: 3}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
@@ -224,6 +224,10 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
debugText: {fileID: 1035496434} debugText: {fileID: 1035496434}
mainViewBtn: {fileID: 665573834}
mapViewBtn: {fileID: 1318246086}
mainCameraPos: {fileID: 1938902097}
worldMapCameraPos: {fileID: 1375325165}
--- !u!4 &330132519 --- !u!4 &330132519
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -374,15 +378,15 @@ PrefabInstance:
objectReference: {fileID: 2100000, guid: 5781147aca01e5e45a589857e3e85276, type: 2} objectReference: {fileID: 2100000, guid: 5781147aca01e5e45a589857e3e85276, type: 2}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 2.56 value: 10.94
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.9 value: -7.22
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 1.16 value: 12.03
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -434,15 +438,15 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.84 value: 7.54
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.9 value: -7.22
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 1.23 value: 12.099999
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -480,6 +484,275 @@ PrefabInstance:
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 0} addedObject: {fileID: 0}
m_SourcePrefab: {fileID: 100100000, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
--- !u!1 &665573834
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 665573835}
- component: {fileID: 665573838}
- component: {fileID: 665573837}
- component: {fileID: 665573836}
m_Layer: 5
m_Name: MapViewBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &665573835
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 665573834}
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: 1787169822}
m_Father: {fileID: 1808788429}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -35.7, y: 65}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 1, y: 0}
--- !u!114 &665573836
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 665573834}
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: 665573837}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 330132518}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: SetView
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 1
m_FloatArgument: 0
m_StringArgument: WorldMap
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &665573837
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 665573834}
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 &665573838
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 665573834}
m_CullTransparentMesh: 1
--- !u!1 &776660788
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 776660789}
- component: {fileID: 776660791}
- component: {fileID: 776660790}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &776660789
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776660788}
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: 1318246087}
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 &776660790
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776660788}
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: Main view
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 &776660791
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776660788}
m_CullTransparentMesh: 1
--- !u!1 &943997382 --- !u!1 &943997382
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -582,7 +855,7 @@ Transform:
m_GameObject: {fileID: 943997382} m_GameObject: {fileID: 943997382}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.12, y: 0.34, z: -1.72} m_LocalPosition: {x: 8.26, y: -7.7799997, z: 9.15}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
@@ -611,15 +884,15 @@ PrefabInstance:
objectReference: {fileID: 2100000, guid: 0f7ab03340959dd4ca14ff3bc56af897, type: 2} objectReference: {fileID: 2100000, guid: 0f7ab03340959dd4ca14ff3bc56af897, type: 2}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -4.62 value: 3.7600002
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.9 value: -7.22
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 1.17 value: 12.04
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3} - target: {fileID: 8320751761511990669, guid: 2760da9f550c02e4480b4b992d6c8748, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -689,11 +962,11 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 1808788429} m_Father: {fileID: 1808788429}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 6.2433, y: 131.3024} m_AnchoredPosition: {x: 6.243286, y: -24.689758}
m_SizeDelta: {x: 652.7197, y: 92.0157} m_SizeDelta: {x: -65.28027, y: 92.015686}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1035496434 --- !u!114 &1035496434
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -803,15 +1076,15 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -3.93 value: 4.45
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.8399992 value: -7.28
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -4.83 value: 6.04
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -980,6 +1253,201 @@ MeshFilter:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318126487} m_GameObject: {fileID: 1318126487}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1318246086
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1318246087}
- component: {fileID: 1318246090}
- component: {fileID: 1318246089}
- component: {fileID: 1318246088}
m_Layer: 5
m_Name: MainViewBtn
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1318246087
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318246086}
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: 776660789}
m_Father: {fileID: 1808788429}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -35.700012, y: 65}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 1, y: 0}
--- !u!114 &1318246088
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318246086}
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: 1318246089}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 330132518}
m_TargetAssemblyTypeName: GameManager, Assembly-CSharp
m_MethodName: SetView
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: WorldMap
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1318246089
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318246086}
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 &1318246090
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318246086}
m_CullTransparentMesh: 1
--- !u!1 &1351536842
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1351536843}
m_Layer: 0
m_Name: WorldMap
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1351536843
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1351536842}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 487.8603, y: 277.26813, z: 57.925987}
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 &1375325164
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1375325165}
m_Layer: 0
m_Name: WorldMapCameraPos
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1375325165
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1375325164}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 18.64, z: 0}
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 &1470614614 --- !u!1 &1470614614
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1107,11 +1575,11 @@ RectTransform:
- {fileID: 1851113609} - {fileID: 1851113609}
m_Father: {fileID: 1808788429} m_Father: {fileID: 1808788429}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 238, y: -146} m_AnchoredPosition: {x: -34.5, y: 24.199997}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 1, y: 0}
--- !u!114 &1515305044 --- !u!114 &1515305044
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1206,6 +1674,250 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1515305042} m_GameObject: {fileID: 1515305042}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &1629534297
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1629534301}
- component: {fileID: 1629534300}
- component: {fileID: 1629534299}
- component: {fileID: 1629534298}
m_Layer: 0
m_Name: Plane (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!64 &1629534298
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1629534297}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1629534299
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1629534297}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1629534300
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1629534297}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1629534301
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1629534297}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 8.26, y: 10.27, z: 9.15}
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 &1787169821
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1787169822}
- component: {fileID: 1787169824}
- component: {fileID: 1787169823}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1787169822
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1787169821}
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: 665573835}
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 &1787169823
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1787169821}
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: World Map
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 &1787169824
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1787169821}
m_CullTransparentMesh: 1
--- !u!1 &1808788425 --- !u!1 &1808788425
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1302,6 +2014,8 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1035496433} - {fileID: 1035496433}
- {fileID: 1515305043} - {fileID: 1515305043}
- {fileID: 665573835}
- {fileID: 1318246087}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@@ -1395,7 +2109,7 @@ Transform:
m_GameObject: {fileID: 1842039541} m_GameObject: {fileID: 1842039541}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.23911765, y: 0.3696438, z: -0.09904577, w: 0.89239913} m_LocalRotation: {x: 0.23911765, y: 0.3696438, z: -0.09904577, w: 0.89239913}
m_LocalPosition: {x: -3.1, y: 4.98, z: -5.08} m_LocalPosition: {x: 0, y: 18.64, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@@ -1537,6 +2251,37 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1851113608} m_GameObject: {fileID: 1851113608}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1 &1938902096
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1938902097}
m_Layer: 0
m_Name: MainCameraPos
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1938902097
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1938902096}
serializedVersion: 2
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: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2957543503499815533 --- !u!1001 &2957543503499815533
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1547,15 +2292,15 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: -0.56 value: 7.82
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0.8399992 value: -7.28
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: -5.16 value: 5.71
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3} - target: {fileID: 2176540291006432245, guid: 33abb00a5a886954698312f903f951f9, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
@@ -1604,16 +2349,20 @@ PrefabInstance:
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_Roots: m_Roots:
- {fileID: 1842039544}
- {fileID: 1470614616}
- {fileID: 330132519} - {fileID: 330132519}
- {fileID: 1808788429} - {fileID: 1842039544}
- {fileID: 1938902097}
- {fileID: 1375325165}
- {fileID: 1470614616}
- {fileID: 388824814} - {fileID: 388824814}
- {fileID: 360352143} - {fileID: 360352143}
- {fileID: 2957543503499815533} - {fileID: 2957543503499815533}
- {fileID: 943997386} - {fileID: 943997386}
- {fileID: 1629534301}
- {fileID: 83333728} - {fileID: 83333728}
- {fileID: 1068200101} - {fileID: 1068200101}
- {fileID: 582540973} - {fileID: 582540973}
- {fileID: 1010175415} - {fileID: 1010175415}
- {fileID: 400899934} - {fileID: 400899934}
- {fileID: 1808788429}
- {fileID: 1351536843}

View File

@@ -20,7 +20,7 @@ public class AssignableWorker : MonoBehaviour
public void AddWorker() public void AddWorker()
{ {
if(gameManager.GetResource(Resource.WORKER) > 0) if(gameManager.GetResourceCount(Resource.WORKER) > 0)
{ {
workersAssigned++; workersAssigned++;
gameManager.RemoveResource(Resource.WORKER, 1); gameManager.RemoveResource(Resource.WORKER, 1);

View File

@@ -36,11 +36,11 @@ public class Facility : MonoBehaviour
if (!processing) //Not processing but workers assigned, start new job if material is available if (!processing) //Not processing but workers assigned, start new job if material is available
{ {
if (gameManager.GetResource(inputResource) < materialConsumption) return; //Not enough material if (gameManager.GetResourceCount(inputResource) < materialConsumption) return; //Not enough material
//Consumtion 5, 2 //Consumtion 5, 2
int workerCount = (assignableWorker.GetAssignedWorkers() == 0 ? 1 : assignableWorker.GetAssignedWorkers()); int workerCount = (assignableWorker.GetAssignedWorkers() == 0 ? 1 : assignableWorker.GetAssignedWorkers());
int maxPossibleBatch = gameManager.GetResource(inputResource) / materialConsumption; int maxPossibleBatch = gameManager.GetResourceCount(inputResource) / materialConsumption;
currentProductionBatch = Mathf.Min(maxPossibleBatch, workerCount); currentProductionBatch = Mathf.Min(maxPossibleBatch, workerCount);
int requiredRessources = currentProductionBatch * materialConsumption; int requiredRessources = currentProductionBatch * materialConsumption;
@@ -67,7 +67,7 @@ public class Facility : MonoBehaviour
{ {
if (processing) return; //Already processing if (processing) return; //Already processing
if (gameManager.GetResource(inputResource) < materialConsumption) return; //Not enough material if (gameManager.GetResourceCount(inputResource) < materialConsumption) return; //Not enough material
gameManager.RemoveResource(inputResource, materialConsumption); gameManager.RemoveResource(inputResource, materialConsumption);
currentProcess = processingTime; currentProcess = processingTime;

View File

@@ -17,6 +17,8 @@ public enum Resource
} }
public class GameManager : MonoBehaviour public class GameManager : MonoBehaviour
{ {
private int currentView = 0;
private Dictionary<Resource, int> resources = new Dictionary<Resource, int>() private Dictionary<Resource, int> resources = new Dictionary<Resource, int>()
{ {
{ Resource.ROCK, 0 }, { Resource.ROCK, 0 },
@@ -32,10 +34,16 @@ public class GameManager : MonoBehaviour
public TMPro.TMP_Text debugText; public TMPro.TMP_Text debugText;
[SerializeField]
GameObject mainViewBtn, mapViewBtn;
[SerializeField]
private Transform mainCameraPos, worldMapCameraPos;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
Camera.main.transform.position = mainCameraPos.position;
} }
// Update is called once per frame // Update is called once per frame
@@ -58,9 +66,27 @@ public class GameManager : MonoBehaviour
resources[res] -= amt; resources[res] -= amt;
} }
public int GetResource(Resource res) public int GetResourceCount(Resource res)
{ {
return resources[res]; return resources[res];
} }
public void SetView(int view)
{
switch (view)
{
case 0: //Main view
Camera.main.transform.position = mainCameraPos.position;
mainViewBtn.SetActive(true);
mapViewBtn.SetActive(false);
break;
case 1: //Map View
Camera.main.transform.position = worldMapCameraPos.position;
mainViewBtn.SetActive(false);
mapViewBtn.SetActive(true);
break;
default:
break;
}
}
} }

View File

@@ -24,9 +24,9 @@ public class HouseManager : MonoBehaviour
} else } else
{ {
currentTtnw = ttnw; currentTtnw = ttnw;
if (gameManager.GetResource(Resource.TOTAL_WORKER) < gameManager.GetResource(Resource.HOUSE) * workerPerHouse) if (gameManager.GetResourceCount(Resource.TOTAL_WORKER) < gameManager.GetResourceCount(Resource.HOUSE) * workerPerHouse)
{ {
int freeWorkerSlots = (gameManager.GetResource(Resource.HOUSE) * workerPerHouse) - gameManager.GetResource(Resource.TOTAL_WORKER); int freeWorkerSlots = (gameManager.GetResourceCount(Resource.HOUSE) * workerPerHouse) - gameManager.GetResourceCount(Resource.TOTAL_WORKER);
int newWorkers = Mathf.CeilToInt((float)freeWorkerSlots / workerPerHouse); int newWorkers = Mathf.CeilToInt((float)freeWorkerSlots / workerPerHouse);
gameManager.AddResource(Resource.WORKER, newWorkers); gameManager.AddResource(Resource.WORKER, newWorkers);
gameManager.AddResource(Resource.TOTAL_WORKER, newWorkers); gameManager.AddResource(Resource.TOTAL_WORKER, newWorkers);
@@ -36,9 +36,9 @@ public class HouseManager : MonoBehaviour
public void BuildHouse() public void BuildHouse()
{ {
if (gameManager.GetResource(Resource.BRICK) < 10 || if (gameManager.GetResourceCount(Resource.BRICK) < 10 ||
gameManager.GetResource(Resource.TILE) < 5 || gameManager.GetResourceCount(Resource.TILE) < 5 ||
gameManager.GetResource(Resource.GLASS) < 2) gameManager.GetResourceCount(Resource.GLASS) < 2)
{ {
Debug.Log("Not enough resources to build house!"); Debug.Log("Not enough resources to build house!");
return; return;

View File

@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class WorldMapUI : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3f5605aef187419469548c23842f08da

View File

@@ -4,5 +4,12 @@
EditorBuildSettings: EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: [] m_Scenes:
- enabled: 1
path: Assets/Scenes/Main.unity
guid: 08f986a56e32d3a42bfba00595e560dd
- enabled: 1
path: Assets/Scenes/WorldMap.unity
guid: 4eebe4d020578664287352b495c15e8c
m_configObjects: {} m_configObjects: {}
m_UseUCBPForAssetBundles: 0