Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # Assets/Scripts/TileBehaviour.cs
This commit is contained in:
commit
0ffbb31b39
17 changed files with 1009 additions and 246 deletions
|
|
@ -76,7 +76,7 @@ SpriteRenderer:
|
||||||
m_SortingLayerID: -2016319409
|
m_SortingLayerID: -2016319409
|
||||||
m_SortingLayer: 1
|
m_SortingLayer: 1
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 2700e06d970d112489ff23cfb58c3f78, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
|
|
|
||||||
|
|
@ -2677,6 +2677,141 @@ RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 729139770}
|
m_PrefabInstance: {fileID: 729139770}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &865947142
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 865947143}
|
||||||
|
- component: {fileID: 865947145}
|
||||||
|
- component: {fileID: 865947144}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: DayText
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &865947143
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 865947142}
|
||||||
|
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: 1070476668}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 66, y: -30}
|
||||||
|
m_SizeDelta: {x: 115, y: 45}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &865947144
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 865947142}
|
||||||
|
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: "Day: \n"
|
||||||
|
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: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 1
|
||||||
|
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_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 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 &865947145
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 865947142}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1001 &876025937
|
--- !u!1001 &876025937
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -3524,6 +3659,321 @@ RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 160321877}
|
m_PrefabInstance: {fileID: 160321877}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &1061398530
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1061398534}
|
||||||
|
- component: {fileID: 1061398533}
|
||||||
|
- component: {fileID: 1061398532}
|
||||||
|
- component: {fileID: 1061398531}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: InfoCanvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1061398531
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1061398530}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!114 &1061398532
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1061398530}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!223 &1061398533
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1061398530}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_Camera: {fileID: 0}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 25
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!224 &1061398534
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1061398530}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1070476668}
|
||||||
|
- {fileID: 1649897726}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 8
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
|
--- !u!1 &1070476667
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1070476668}
|
||||||
|
- component: {fileID: 1070476670}
|
||||||
|
- component: {fileID: 1070476669}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: DayParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1070476668
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1070476667}
|
||||||
|
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: 865947143}
|
||||||
|
- {fileID: 1089918734}
|
||||||
|
m_Father: {fileID: 1061398534}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 165, y: -45}
|
||||||
|
m_SizeDelta: {x: 300, y: 60}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1070476669
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1070476667}
|
||||||
|
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: 21300000, guid: 2a61ecc3d143def478dfed9f6d6ca3fd, type: 3}
|
||||||
|
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 &1070476670
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1070476667}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1089918733
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1089918734}
|
||||||
|
- component: {fileID: 1089918736}
|
||||||
|
- component: {fileID: 1089918735}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: DayCount
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1089918734
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1089918733}
|
||||||
|
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: 1070476668}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 180, y: -30}
|
||||||
|
m_SizeDelta: {x: 200, y: 45}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1089918735
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1089918733}
|
||||||
|
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: 1
|
||||||
|
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: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 4
|
||||||
|
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_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 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 &1089918736
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1089918733}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1001 &1113359677
|
--- !u!1001 &1113359677
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -4456,6 +4906,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
menu: {fileID: 1395531174}
|
menu: {fileID: 1395531174}
|
||||||
|
dayCountTextMeshProUGUI: {fileID: 0}
|
||||||
--- !u!212 &1278234715
|
--- !u!212 &1278234715
|
||||||
SpriteRenderer:
|
SpriteRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -4559,7 +5010,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tile: {fileID: 4752245148499717901, guid: ea81011a3ce83fb4386934728a92ee2d, type: 3}
|
tile: {fileID: 4752245148499717901, guid: ea81011a3ce83fb4386934728a92ee2d, type: 3}
|
||||||
CameraGameObject: {fileID: 598358736}
|
cameraGameObject: {fileID: 0}
|
||||||
--- !u!4 &1291863651
|
--- !u!4 &1291863651
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -4785,6 +5236,141 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
--- !u!1 &1347709340
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1347709341}
|
||||||
|
- component: {fileID: 1347709343}
|
||||||
|
- component: {fileID: 1347709342}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: MoneyCount
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1347709341
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1347709340}
|
||||||
|
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: 1649897726}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 180, y: -30}
|
||||||
|
m_SizeDelta: {x: 200, y: 45}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1347709342
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1347709340}
|
||||||
|
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: "0\xB5"
|
||||||
|
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: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 4
|
||||||
|
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_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 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 &1347709343
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1347709340}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1001 &1373673699
|
--- !u!1001 &1373673699
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -5887,6 +6473,84 @@ RectTransform:
|
||||||
m_AnchoredPosition: {x: -640, y: 215}
|
m_AnchoredPosition: {x: -640, y: 215}
|
||||||
m_SizeDelta: {x: 720, y: 430}
|
m_SizeDelta: {x: 720, y: 430}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!1 &1649897725
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1649897726}
|
||||||
|
- component: {fileID: 1649897728}
|
||||||
|
- component: {fileID: 1649897727}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: MoneyParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1649897726
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1649897725}
|
||||||
|
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: 2022611509}
|
||||||
|
- {fileID: 1347709341}
|
||||||
|
m_Father: {fileID: 1061398534}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 165, y: -115}
|
||||||
|
m_SizeDelta: {x: 300, y: 60}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1649897727
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1649897725}
|
||||||
|
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: 21300000, guid: 2a61ecc3d143def478dfed9f6d6ca3fd, type: 3}
|
||||||
|
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 &1649897728
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1649897725}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &1671356616
|
--- !u!1 &1671356616
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -5946,7 +6610,7 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: bc5eb8967b8912c42b93a2086383ddd9, type: 3}
|
m_Script: {fileID: 11500000, guid: bc5eb8967b8912c42b93a2086383ddd9, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tempItems:
|
startItems:
|
||||||
- {fileID: 11400000, guid: 008a8fdd2c3a95745acafee4087a855d, type: 2}
|
- {fileID: 11400000, guid: 008a8fdd2c3a95745acafee4087a855d, type: 2}
|
||||||
- {fileID: 11400000, guid: 430db451ae959f34b8fba8d8b17276fd, type: 2}
|
- {fileID: 11400000, guid: 430db451ae959f34b8fba8d8b17276fd, type: 2}
|
||||||
- {fileID: 11400000, guid: d651d57ba97a4246a0094409e29fe56a, type: 2}
|
- {fileID: 11400000, guid: d651d57ba97a4246a0094409e29fe56a, type: 2}
|
||||||
|
|
@ -6192,8 +6856,8 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: b18feac5270242d4a85c78ce72972d56, type: 3}
|
m_Script: {fileID: 11500000, guid: b18feac5270242d4a85c78ce72972d56, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
money: 0
|
|
||||||
startMoney: 10000
|
startMoney: 10000
|
||||||
|
moneyTextMeshProUGUI: {fileID: 1347709342}
|
||||||
--- !u!4 &1800469990
|
--- !u!4 &1800469990
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -7030,6 +7694,141 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2006577137}
|
m_GameObject: {fileID: 2006577137}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &2022611508
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2022611509}
|
||||||
|
- component: {fileID: 2022611511}
|
||||||
|
- component: {fileID: 2022611510}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: MoneyText
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2022611509
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2022611508}
|
||||||
|
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: 1649897726}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 66, y: -30}
|
||||||
|
m_SizeDelta: {x: 115, y: 60}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &2022611510
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2022611508}
|
||||||
|
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: 'Money:'
|
||||||
|
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: 20
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 72
|
||||||
|
m_fontStyle: 0
|
||||||
|
m_HorizontalAlignment: 1
|
||||||
|
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_enableWordWrapping: 1
|
||||||
|
m_wordWrappingRatios: 0.4
|
||||||
|
m_overflowMode: 0
|
||||||
|
m_linkedTextComponent: {fileID: 0}
|
||||||
|
parentLinkedComponent: {fileID: 0}
|
||||||
|
m_enableKerning: 1
|
||||||
|
m_enableExtraPadding: 0
|
||||||
|
checkPaddingRequired: 0
|
||||||
|
m_isRichText: 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 &2022611511
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2022611508}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!224 &2026367185 stripped
|
--- !u!224 &2026367185 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
|
@ -7742,6 +8541,10 @@ PrefabInstance:
|
||||||
m_Modification:
|
m_Modification:
|
||||||
m_TransformParent: {fileID: 1985691912}
|
m_TransformParent: {fileID: 1985691912}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
|
- target: {fileID: 5121261193055935939, guid: 2279fa2b47ef2ce40af9052d3a3f438b, type: 3}
|
||||||
|
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||||
|
value: UseItem
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5121261193055935940, guid: 2279fa2b47ef2ce40af9052d3a3f438b, type: 3}
|
- target: {fileID: 5121261193055935940, guid: 2279fa2b47ef2ce40af9052d3a3f438b, type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
value: 0.5
|
value: 0.5
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,17 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
public class HouseController : MonoBehaviour {
|
public class HouseController : MonoBehaviour {
|
||||||
private int dayCount = 0;
|
private int dayCount = 1;
|
||||||
private static UnityEvent newDayEvent;
|
private static UnityEvent newDayEvent;
|
||||||
public static UnityEvent NewDayEvent => newDayEvent;
|
public static UnityEvent NewDayEvent => newDayEvent;
|
||||||
|
|
||||||
public Canvas menu;
|
public Canvas menu;
|
||||||
|
public TextMeshProUGUI dayCountTextMeshProUGUI;
|
||||||
|
|
||||||
private void OnMouseDown() {
|
private void OnMouseDown() {
|
||||||
toggleMenu();
|
toggleMenu();
|
||||||
|
|
@ -21,7 +23,7 @@ public class HouseController : MonoBehaviour {
|
||||||
|
|
||||||
public void newDay() {
|
public void newDay() {
|
||||||
dayCount++;
|
dayCount++;
|
||||||
Debug.Log("New day: " + dayCount);
|
dayCountTextMeshProUGUI.text = dayCount.ToString();
|
||||||
newDayEvent?.Invoke();
|
newDayEvent?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Inventory : MonoBehaviour {
|
public class Inventory : ItemStorage {
|
||||||
#region Singleton
|
#region Singleton
|
||||||
|
|
||||||
public static Inventory instance;
|
public static Inventory instance;
|
||||||
|
|
@ -16,51 +15,17 @@ public class Inventory : MonoBehaviour {
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Dictionary<Item, int> items;
|
|
||||||
public Item[] startItems;
|
|
||||||
public const int InventorySpace = 28;
|
public const int InventorySpace = 28;
|
||||||
|
|
||||||
/**
|
|
||||||
* Methods can be added to this and they will get called every time onItemChangedCallback gets Invoked
|
|
||||||
*/
|
|
||||||
public delegate void OnItemChanged();
|
|
||||||
public OnItemChanged onItemChangedCallback;
|
|
||||||
|
|
||||||
private void Start() {
|
|
||||||
items ??= new Dictionary<Item, int>();
|
|
||||||
foreach(Item item in startItems) {
|
|
||||||
AddItem(item, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified amount of items to the Inventory
|
* Adds the specified amount of items to the Inventory
|
||||||
*/
|
*/
|
||||||
public void AddItem(Item item, int amount) {
|
public override void AddItem(Item item, int amount) {
|
||||||
if(items.Count >= InventorySpace) {
|
if(items.Count >= InventorySpace) {
|
||||||
Debug.Log("Not enough inventory space!");
|
Debug.Log("Not enough inventory space!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!items.ContainsKey(item)) {
|
base.AddItem(item, amount);
|
||||||
items.Add(item, amount);
|
|
||||||
} else {
|
|
||||||
items[item] += amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
onItemChangedCallback?.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes the specified amount of items in the Inventory
|
|
||||||
*/
|
|
||||||
public void RemoveItem(Item item, int amount) {
|
|
||||||
if(items[item] <= 0) {
|
|
||||||
items.Remove(item);
|
|
||||||
} else {
|
|
||||||
items[item] -= amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
onItemChangedCallback?.Invoke();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,72 +1,15 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
public class InventorySlot : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {
|
|
||||||
public Image icon;
|
|
||||||
public TextMeshProUGUI amountText;
|
|
||||||
|
|
||||||
public Item _item;
|
|
||||||
|
|
||||||
#region DescriptionHover
|
|
||||||
|
|
||||||
public float timeToWait;
|
|
||||||
|
|
||||||
public void OnPointerEnter(PointerEventData eventData) {
|
|
||||||
StopAllCoroutines();
|
|
||||||
StartCoroutine(StartTimer());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnPointerExit(PointerEventData eventData) {
|
|
||||||
StopAllCoroutines();
|
|
||||||
HoverManager.onMouseExit();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ShowMessage() {
|
|
||||||
if(_item){
|
|
||||||
HoverManager.onMouseHover(_item.description, Input.mousePosition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator StartTimer() {
|
|
||||||
yield return new WaitForSeconds(timeToWait);
|
|
||||||
|
|
||||||
ShowMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the Item of the Inventory Slot
|
|
||||||
*/
|
|
||||||
public void AddItem(Item newItem) {
|
|
||||||
_item = newItem;
|
|
||||||
|
|
||||||
icon.sprite = _item.defaultSprite;
|
|
||||||
icon.enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears the Inventory Slot
|
|
||||||
*/
|
|
||||||
public void ClearSlot() {
|
|
||||||
_item = null;
|
|
||||||
icon.sprite = null;
|
|
||||||
icon.enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public class InventorySlot : ItemStorageSlot {
|
||||||
/**
|
/**
|
||||||
* Gets called when the Inventory Slot is clicked
|
* Gets called when the Inventory Slot is clicked
|
||||||
*/
|
*/
|
||||||
public void UseItem() {
|
public override void UseItem() {
|
||||||
if(_item.GetType() == typeof(UsableItem)) {
|
if(Item.GetType() == typeof(UsableItem)) {
|
||||||
((UsableItem) _item).Select();
|
((UsableItem) Item).Select();
|
||||||
Debug.Log("using " + _item.displayName);
|
Debug.Log("using " + Item.displayName);
|
||||||
} else {
|
} else {
|
||||||
Debug.Log("Item not usable " + _item.displayName);
|
Debug.Log("Item not usable " + Item.displayName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
|
||||||
46
Assets/Scripts/ItemStorage.cs
Normal file
46
Assets/Scripts/ItemStorage.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class ItemStorage : MonoBehaviour {
|
||||||
|
public Dictionary<Item, int> items;
|
||||||
|
public Item[] startItems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Methods can be added to this and they will get called every time onItemChangedCallback gets Invoked
|
||||||
|
*/
|
||||||
|
public delegate void OnItemChanged();
|
||||||
|
public OnItemChanged onItemChangedCallback;
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
|
items ??= new Dictionary<Item, int>();
|
||||||
|
foreach(Item item in startItems) {
|
||||||
|
AddItem(item, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the specified amount of items to the Item Storage
|
||||||
|
*/
|
||||||
|
public virtual void AddItem(Item item, int amount) {
|
||||||
|
if(!items.ContainsKey(item)) {
|
||||||
|
items.Add(item, amount);
|
||||||
|
} else {
|
||||||
|
items[item] += amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
onItemChangedCallback?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the specified amount of items in the Item Storage
|
||||||
|
*/
|
||||||
|
public void RemoveItem(Item item, int amount) {
|
||||||
|
if(items[item] <= 0) {
|
||||||
|
items.Remove(item);
|
||||||
|
} else {
|
||||||
|
items[item] -= amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
onItemChangedCallback?.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/ItemStorage.cs.meta
Normal file
11
Assets/Scripts/ItemStorage.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 21c02dc661faff342aca965c68c2c13a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
68
Assets/Scripts/ItemStorageSlot.cs
Normal file
68
Assets/Scripts/ItemStorageSlot.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class ItemStorageSlot : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {
|
||||||
|
public Image icon;
|
||||||
|
public TextMeshProUGUI amountText;
|
||||||
|
|
||||||
|
public Item Item => _item;
|
||||||
|
|
||||||
|
private Item _item;
|
||||||
|
|
||||||
|
#region DescriptionHover
|
||||||
|
|
||||||
|
public float timeToWait;
|
||||||
|
|
||||||
|
public void OnPointerEnter(PointerEventData eventData) {
|
||||||
|
StopAllCoroutines();
|
||||||
|
StartCoroutine(StartTimer());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPointerExit(PointerEventData eventData) {
|
||||||
|
StopAllCoroutines();
|
||||||
|
HoverManager.onMouseExit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowMessage() {
|
||||||
|
if(_item){
|
||||||
|
HoverManager.onMouseHover(_item.description, Input.mousePosition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator StartTimer() {
|
||||||
|
yield return new WaitForSeconds(timeToWait);
|
||||||
|
|
||||||
|
ShowMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the Item of the Item Storage Slot
|
||||||
|
*/
|
||||||
|
public void AddItem(Item newItem) {
|
||||||
|
_item = newItem;
|
||||||
|
|
||||||
|
icon.sprite = _item.defaultSprite;
|
||||||
|
icon.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the Item Storage Slot
|
||||||
|
*/
|
||||||
|
public virtual void ClearSlot() {
|
||||||
|
_item = null;
|
||||||
|
icon.sprite = null;
|
||||||
|
icon.enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets called when the Item Storage Slot is clicked
|
||||||
|
*/
|
||||||
|
public virtual void UseItem() {
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/ItemStorageSlot.cs.meta
Normal file
11
Assets/Scripts/ItemStorageSlot.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b6f14e8c24660e04e9ceb50a7d8e659d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
using Cursor = UnityEngine.Cursor;
|
using Cursor = UnityEngine.Cursor;
|
||||||
|
|
@ -21,15 +22,19 @@ public class PlayerController : MonoBehaviour {
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private Inventory _inventory;
|
private Inventory _inventory;
|
||||||
public int money;
|
private int _money;
|
||||||
private UsableItem _selectedItem;
|
private UsableItem _selectedItem;
|
||||||
|
|
||||||
public int startMoney = 100;
|
public int startMoney = 100;
|
||||||
|
public TextMeshProUGUI moneyTextMeshProUGUI;
|
||||||
|
|
||||||
|
public int Money => _money;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
private void Start() {
|
private void Start() {
|
||||||
money = startMoney;
|
_money = startMoney;
|
||||||
_inventory = Inventory.instance;
|
_inventory = Inventory.instance;
|
||||||
|
moneyTextMeshProUGUI.text = _money + "µ";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSelectedItem(UsableItem item) {
|
public void SetSelectedItem(UsableItem item) {
|
||||||
|
|
@ -44,4 +49,9 @@ public class PlayerController : MonoBehaviour {
|
||||||
public UsableItem GetSelectedItem() {
|
public UsableItem GetSelectedItem() {
|
||||||
return _selectedItem;
|
return _selectedItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ChangeMoney(int amount) {
|
||||||
|
_money += amount;
|
||||||
|
moneyTextMeshProUGUI.text = _money + "µ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Shop : MonoBehaviour {
|
public class Shop : ItemStorage {
|
||||||
#region Singleton
|
#region Singleton
|
||||||
|
|
||||||
public static Shop instance;
|
public static Shop instance;
|
||||||
|
|
@ -15,46 +15,4 @@ public class Shop : MonoBehaviour {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Dictionary<Item, int> items;
|
|
||||||
public Item[] tempItems;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Methods can be added to this and they will get called every time onItemChangedCallback gets Invoked
|
|
||||||
*/
|
|
||||||
public delegate void OnItemChanged();
|
|
||||||
public OnItemChanged onItemChangedCallback;
|
|
||||||
|
|
||||||
private void Start() {
|
|
||||||
items ??= new Dictionary<Item, int>();
|
|
||||||
foreach(Item item in tempItems) {
|
|
||||||
AddItem(item, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds the specified amount of items to the Shop
|
|
||||||
*/
|
|
||||||
public void AddItem(Item item, int amount) {
|
|
||||||
if(!items.ContainsKey(item)) {
|
|
||||||
items.Add(item, amount);
|
|
||||||
} else {
|
|
||||||
items[item] += amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
onItemChangedCallback?.Invoke();
|
|
||||||
}
|
|
||||||
// TODO: add to buy more than one item
|
|
||||||
/**
|
|
||||||
* Removes the specified amount of items in the Shop
|
|
||||||
*/
|
|
||||||
public void RemoveItem(Item item, int amount) {
|
|
||||||
if(items[item] <= 0) {
|
|
||||||
items.Remove(item);
|
|
||||||
} else {
|
|
||||||
items[item] -= amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
onItemChangedCallback?.Invoke();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,72 +1,25 @@
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
public class ShopSlot : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler {
|
public class ShopSlot : ItemStorageSlot {
|
||||||
public Image icon;
|
|
||||||
public Item item;
|
|
||||||
public TextMeshProUGUI nameText;
|
public TextMeshProUGUI nameText;
|
||||||
public TextMeshProUGUI costText;
|
public TextMeshProUGUI costText;
|
||||||
public TextMeshProUGUI amountText;
|
|
||||||
|
|
||||||
private Shop _shop;
|
private Shop _shop;
|
||||||
private Inventory _inventory;
|
private Inventory _inventory;
|
||||||
private PlayerController _playerController;
|
private PlayerController _playerController;
|
||||||
|
|
||||||
#region DescriptionHover
|
|
||||||
|
|
||||||
public float timeToWait;
|
|
||||||
|
|
||||||
public void OnPointerEnter(PointerEventData eventData) {
|
|
||||||
StopAllCoroutines();
|
|
||||||
StartCoroutine(StartTimer());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnPointerExit(PointerEventData eventData) {
|
|
||||||
StopAllCoroutines();
|
|
||||||
HoverManager.onMouseExit();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ShowMessage() {
|
|
||||||
if(item) {
|
|
||||||
HoverManager.onMouseHover(item.description, Input.mousePosition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator StartTimer() {
|
|
||||||
yield return new WaitForSeconds(timeToWait);
|
|
||||||
|
|
||||||
ShowMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private void Start() {
|
private void Start() {
|
||||||
_shop = Shop.instance;
|
_shop = Shop.instance;
|
||||||
_inventory = Inventory.instance;
|
_inventory = Inventory.instance;
|
||||||
_playerController = PlayerController.instance;
|
_playerController = PlayerController.instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the Item of the Shop Slot
|
|
||||||
*/
|
|
||||||
public void AddItem(Item newItem) {
|
|
||||||
item = newItem;
|
|
||||||
|
|
||||||
icon.sprite = item.defaultSprite;
|
|
||||||
icon.enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the Shop Slot
|
* Clears the Shop Slot
|
||||||
*/
|
*/
|
||||||
public void ClearSlot() {
|
public override void ClearSlot() {
|
||||||
item = null;
|
base.ClearSlot();
|
||||||
icon.sprite = null;
|
|
||||||
icon.enabled = false;
|
|
||||||
nameText.text = "";
|
nameText.text = "";
|
||||||
costText.text = "";
|
costText.text = "";
|
||||||
amountText.text = "";
|
amountText.text = "";
|
||||||
|
|
@ -75,14 +28,14 @@ public class ShopSlot : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||||
/**
|
/**
|
||||||
* Gets called when the Shop Slot is clicked
|
* Gets called when the Shop Slot is clicked
|
||||||
*/
|
*/
|
||||||
public void UseItem() {
|
public override void UseItem() {
|
||||||
if(_playerController.money >= item.cost) {
|
if(_playerController.Money >= Item.cost) {
|
||||||
_inventory.AddItem(item, 1);
|
_inventory.AddItem(Item, 1);
|
||||||
_shop.RemoveItem(item, 1);
|
_shop.RemoveItem(Item, 1);
|
||||||
_playerController.money -= item.cost;
|
_playerController.ChangeMoney(-Item.cost);
|
||||||
|
|
||||||
Debug.Log("Buying Item: " + item.displayName);
|
Debug.Log("Buying Item: " + Item.displayName);
|
||||||
Debug.Log("money left: " + _playerController.money);
|
Debug.Log("money left: " + _playerController.Money);
|
||||||
} else {
|
} else {
|
||||||
Debug.Log("Not enough money to buy item.");
|
Debug.Log("Not enough money to buy item.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ public class ShopUI : MonoBehaviour {
|
||||||
foreach(ShopSlot slot in _slots) {
|
foreach(ShopSlot slot in _slots) {
|
||||||
slot.icon.raycastTarget = false;
|
slot.icon.raycastTarget = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateUI();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update() {
|
private void Update() {
|
||||||
|
|
@ -46,8 +44,8 @@ public class ShopUI : MonoBehaviour {
|
||||||
for(int i = 0; i < _slots.Length; i++) {
|
for(int i = 0; i < _slots.Length; i++) {
|
||||||
if(i < _shop.items.Count) {
|
if(i < _shop.items.Count) {
|
||||||
_slots[i].AddItem(_shop.items.ElementAt(i).Key);
|
_slots[i].AddItem(_shop.items.ElementAt(i).Key);
|
||||||
_slots[i].nameText.text = _slots[i].item.displayName;
|
_slots[i].nameText.text = _slots[i].Item.displayName;
|
||||||
_slots[i].costText.text = _slots[i].item.cost + " €";
|
_slots[i].costText.text = _slots[i].Item.cost + " µ";
|
||||||
_slots[i].amountText.text = _shop.items[_shop.items.ElementAt(i).Key] + " #";
|
_slots[i].amountText.text = _shop.items[_shop.items.ElementAt(i).Key] + " #";
|
||||||
} else {
|
} else {
|
||||||
_slots[i].ClearSlot();
|
_slots[i].ClearSlot();
|
||||||
|
|
|
||||||
|
|
@ -3,38 +3,25 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class TileController : MonoBehaviour
|
public class TileController : MonoBehaviour {
|
||||||
{
|
|
||||||
public GameObject tile;
|
public GameObject tile;
|
||||||
|
|
||||||
public GameObject CameraGameObject;
|
public GameObject cameraGameObject;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start() {
|
||||||
{
|
Camera camera = cameraGameObject.GetComponent<Camera>();
|
||||||
Camera camera = CameraGameObject.GetComponent<Camera>();
|
|
||||||
Vector3 screen = camera.ViewportToWorldPoint(new Vector3(1, 1, camera.nearClipPlane));
|
Vector3 screen = camera.ViewportToWorldPoint(new Vector3(1, 1, camera.nearClipPlane));
|
||||||
int x = Convert.ToInt32(Math.Ceiling(screen.x));
|
int x = Convert.ToInt32(Math.Ceiling(screen.x));
|
||||||
int y = Convert.ToInt32(Math.Ceiling(screen.y));
|
int y = Convert.ToInt32(Math.Ceiling(screen.y));
|
||||||
|
|
||||||
Debug.Log(screen);
|
Debug.Log(screen);
|
||||||
for (int xx = -x; xx <= x; xx++)
|
for(int xx = -x; xx <= x; xx++) {
|
||||||
{
|
for(int yy = -y; yy <= y; yy++) {
|
||||||
for (int yy = -y; yy <= y; yy++)
|
if(tile != null) {
|
||||||
{
|
|
||||||
if (tile != null)
|
|
||||||
{
|
|
||||||
Instantiate(tile, new Vector3(xx, yy, 0), Quaternion.identity);
|
Instantiate(tile, new Vector3(xx, yy, 0), Quaternion.identity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -137,12 +137,21 @@
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.nuget.newtonsoft-json": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"depth": 2,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.services.core": {
|
"com.unity.services.core": {
|
||||||
"version": "1.0.1",
|
"version": "1.3.1",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.modules.unitywebrequest": "1.0.0"
|
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||||
|
"com.unity.nuget.newtonsoft-json": "3.0.2",
|
||||||
|
"com.unity.modules.androidjni": "1.0.0"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
m_EditorVersion: 2021.3.1f1
|
m_EditorVersion: 2021.3.2f1
|
||||||
m_EditorVersionWithRevision: 2021.3.1f1 (3b70a0754835)
|
m_EditorVersionWithRevision: 2021.3.2f1 (d6360bedb9a0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue