day transition is now working
This commit is contained in:
parent
a53857c4d2
commit
7b286bcfd9
13 changed files with 390 additions and 388 deletions
|
|
@ -1477,6 +1477,104 @@ RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 1794784497}
|
m_PrefabInstance: {fileID: 1794784497}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &496797767
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 496797768}
|
||||||
|
- component: {fileID: 496797771}
|
||||||
|
- component: {fileID: 496797770}
|
||||||
|
- component: {fileID: 496797769}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: DayParent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!224 &496797768
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 496797767}
|
||||||
|
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: 1514471720}
|
||||||
|
m_Father: {fileID: 1395531171}
|
||||||
|
m_RootOrder: 1
|
||||||
|
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!95 &496797769
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 4
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 496797767}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: d4333920000efc642834bd74efe28e14, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_StabilizeFeet: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorControllerStateOnDisable: 0
|
||||||
|
--- !u!114 &496797770
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 496797767}
|
||||||
|
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: 0
|
||||||
|
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 &496797771
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 496797767}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1001 &503031231
|
--- !u!1001 &503031231
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -2034,8 +2132,8 @@ RectTransform:
|
||||||
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}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: -811, y: 348.5}
|
m_AnchoredPosition: {x: -815, y: 310}
|
||||||
m_SizeDelta: {x: -1222, y: -697}
|
m_SizeDelta: {x: -1230, y: -620}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &615358672
|
--- !u!114 &615358672
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
@ -3517,7 +3615,7 @@ MonoBehaviour:
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 33.2
|
m_fontSize: 72
|
||||||
m_fontSizeBase: 40
|
m_fontSizeBase: 40
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
|
@ -3676,7 +3774,7 @@ RectTransform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1609015287}
|
- {fileID: 1609015287}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 8
|
m_RootOrder: 9
|
||||||
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}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
|
@ -4001,7 +4099,7 @@ RectTransform:
|
||||||
- {fileID: 1649897726}
|
- {fileID: 1649897726}
|
||||||
- {fileID: 615358671}
|
- {fileID: 615358671}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 9
|
m_RootOrder: 10
|
||||||
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}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
|
@ -5221,7 +5319,7 @@ Transform:
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 4
|
m_RootOrder: 5
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!224 &1285197323 stripped
|
--- !u!224 &1285197323 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
|
|
@ -5273,7 +5371,7 @@ Transform:
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1001 &1324337007
|
--- !u!1001 &1324337007
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
@ -5757,8 +5855,9 @@ RectTransform:
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1040033584}
|
- {fileID: 1040033584}
|
||||||
|
- {fileID: 496797768}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 5
|
m_RootOrder: 6
|
||||||
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}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
|
@ -5824,7 +5923,7 @@ Canvas:
|
||||||
m_SortingBucketNormalizedSize: 0
|
m_SortingBucketNormalizedSize: 0
|
||||||
m_AdditionalShaderChannelsFlag: 25
|
m_AdditionalShaderChannelsFlag: 25
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 100
|
||||||
m_TargetDisplay: 0
|
m_TargetDisplay: 0
|
||||||
--- !u!1001 &1437854976
|
--- !u!1001 &1437854976
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
@ -6123,6 +6222,53 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1444053724}
|
m_GameObject: {fileID: 1444053724}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1454590232
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1454590234}
|
||||||
|
- component: {fileID: 1454590233}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: DayTransitionManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1454590233
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1454590232}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 79414a411d289d64da4ae740047b98ae, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
dayTransitionAnimator: {fileID: 496797769}
|
||||||
|
dayCountText: {fileID: 1514471721}
|
||||||
|
sleepButton: {fileID: 880320856}
|
||||||
|
--- !u!4 &1454590234
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1454590232}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 310.65912, y: 245.63162, z: -16.234259}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!224 &1464226352 stripped
|
--- !u!224 &1464226352 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3510585822996971025, guid: 44dae5fbdb6f7df4f93a10807f66956f, type: 3}
|
||||||
|
|
@ -6419,6 +6565,141 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1514439593}
|
m_GameObject: {fileID: 1514439593}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1514471719
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1514471720}
|
||||||
|
- component: {fileID: 1514471722}
|
||||||
|
- component: {fileID: 1514471721}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: DayCount
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1514471720
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1514471719}
|
||||||
|
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: 496797768}
|
||||||
|
m_RootOrder: 0
|
||||||
|
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 &1514471721
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1514471719}
|
||||||
|
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: 0
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text: 'Day: 69420'
|
||||||
|
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: 4280111227
|
||||||
|
m_fontColor: {r: 0.48235297, g: 0.3137255, b: 0.1137255, 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: 200
|
||||||
|
m_fontSizeBase: 20
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 1
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
m_fontSizeMax: 200
|
||||||
|
m_fontStyle: 1
|
||||||
|
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_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 &1514471722
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1514471719}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &1520388887
|
--- !u!1 &1520388887
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -6649,7 +6930,7 @@ RectTransform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1671356617}
|
- {fileID: 1671356617}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 7
|
m_RootOrder: 8
|
||||||
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}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
|
@ -7274,7 +7555,7 @@ Transform:
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &1800469991
|
--- !u!114 &1800469991
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
@ -7486,7 +7767,7 @@ Transform:
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1001 &1868238650
|
--- !u!1001 &1868238650
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
@ -7678,7 +7959,7 @@ MonoBehaviour:
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 34.05
|
m_fontSize: 24.25
|
||||||
m_fontSizeBase: 20
|
m_fontSizeBase: 20
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
|
@ -8330,7 +8611,7 @@ MonoBehaviour:
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 34.05
|
m_fontSize: 24.25
|
||||||
m_fontSizeBase: 20
|
m_fontSizeBase: 20
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
|
|
@ -8596,7 +8877,7 @@ RectTransform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 590987454}
|
- {fileID: 590987454}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 6
|
m_RootOrder: 7
|
||||||
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}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
|
|
||||||
|
|
@ -1,309 +0,0 @@
|
||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!29 &1
|
|
||||||
OcclusionCullingSettings:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_OcclusionBakeSettings:
|
|
||||||
smallestOccluder: 5
|
|
||||||
smallestHole: 0.25
|
|
||||||
backfaceThreshold: 100
|
|
||||||
m_SceneGUID: 00000000000000000000000000000000
|
|
||||||
m_OcclusionCullingData: {fileID: 0}
|
|
||||||
--- !u!104 &2
|
|
||||||
RenderSettings:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 9
|
|
||||||
m_Fog: 0
|
|
||||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
|
||||||
m_FogMode: 3
|
|
||||||
m_FogDensity: 0.01
|
|
||||||
m_LinearFogStart: 0
|
|
||||||
m_LinearFogEnd: 300
|
|
||||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
|
||||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
|
||||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
|
||||||
m_AmbientIntensity: 1
|
|
||||||
m_AmbientMode: 3
|
|
||||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
|
||||||
m_SkyboxMaterial: {fileID: 0}
|
|
||||||
m_HaloStrength: 0.5
|
|
||||||
m_FlareStrength: 1
|
|
||||||
m_FlareFadeSpeed: 3
|
|
||||||
m_HaloTexture: {fileID: 0}
|
|
||||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
|
||||||
m_DefaultReflectionMode: 0
|
|
||||||
m_DefaultReflectionResolution: 128
|
|
||||||
m_ReflectionBounces: 1
|
|
||||||
m_ReflectionIntensity: 1
|
|
||||||
m_CustomReflection: {fileID: 0}
|
|
||||||
m_Sun: {fileID: 0}
|
|
||||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
|
||||||
m_UseRadianceAmbientProbe: 0
|
|
||||||
--- !u!157 &3
|
|
||||||
LightmapSettings:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 12
|
|
||||||
m_GIWorkflowMode: 1
|
|
||||||
m_GISettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_BounceScale: 1
|
|
||||||
m_IndirectOutputScale: 1
|
|
||||||
m_AlbedoBoost: 1
|
|
||||||
m_EnvironmentLightingMode: 0
|
|
||||||
m_EnableBakedLightmaps: 0
|
|
||||||
m_EnableRealtimeLightmaps: 0
|
|
||||||
m_LightmapEditorSettings:
|
|
||||||
serializedVersion: 12
|
|
||||||
m_Resolution: 2
|
|
||||||
m_BakeResolution: 40
|
|
||||||
m_AtlasSize: 1024
|
|
||||||
m_AO: 0
|
|
||||||
m_AOMaxDistance: 1
|
|
||||||
m_CompAOExponent: 1
|
|
||||||
m_CompAOExponentDirect: 0
|
|
||||||
m_ExtractAmbientOcclusion: 0
|
|
||||||
m_Padding: 2
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_LightmapsBakeMode: 1
|
|
||||||
m_TextureCompression: 1
|
|
||||||
m_FinalGather: 0
|
|
||||||
m_FinalGatherFiltering: 1
|
|
||||||
m_FinalGatherRayCount: 256
|
|
||||||
m_ReflectionCompression: 2
|
|
||||||
m_MixedBakeMode: 2
|
|
||||||
m_BakeBackend: 0
|
|
||||||
m_PVRSampling: 1
|
|
||||||
m_PVRDirectSampleCount: 32
|
|
||||||
m_PVRSampleCount: 500
|
|
||||||
m_PVRBounces: 2
|
|
||||||
m_PVREnvironmentSampleCount: 500
|
|
||||||
m_PVREnvironmentReferencePointCount: 2048
|
|
||||||
m_PVRFilteringMode: 2
|
|
||||||
m_PVRDenoiserTypeDirect: 0
|
|
||||||
m_PVRDenoiserTypeIndirect: 0
|
|
||||||
m_PVRDenoiserTypeAO: 0
|
|
||||||
m_PVRFilterTypeDirect: 0
|
|
||||||
m_PVRFilterTypeIndirect: 0
|
|
||||||
m_PVRFilterTypeAO: 0
|
|
||||||
m_PVREnvironmentMIS: 0
|
|
||||||
m_PVRCulling: 1
|
|
||||||
m_PVRFilteringGaussRadiusDirect: 1
|
|
||||||
m_PVRFilteringGaussRadiusIndirect: 5
|
|
||||||
m_PVRFilteringGaussRadiusAO: 2
|
|
||||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
|
||||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
|
||||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
|
||||||
m_ExportTrainingData: 0
|
|
||||||
m_TrainingDataDestination: TrainingData
|
|
||||||
m_LightProbeSampleCountMultiplier: 4
|
|
||||||
m_LightingDataAsset: {fileID: 0}
|
|
||||||
m_LightingSettings: {fileID: 0}
|
|
||||||
--- !u!196 &4
|
|
||||||
NavMeshSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_BuildSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
agentTypeID: 0
|
|
||||||
agentRadius: 0.5
|
|
||||||
agentHeight: 2
|
|
||||||
agentSlope: 45
|
|
||||||
agentClimb: 0.4
|
|
||||||
ledgeDropHeight: 0
|
|
||||||
maxJumpAcrossDistance: 0
|
|
||||||
minRegionArea: 2
|
|
||||||
manualCellSize: 0
|
|
||||||
cellSize: 0.16666667
|
|
||||||
manualTileSize: 0
|
|
||||||
tileSize: 256
|
|
||||||
accuratePlacement: 0
|
|
||||||
maxJobWorkers: 0
|
|
||||||
preserveTilesOutsideBounds: 0
|
|
||||||
debug:
|
|
||||||
m_Flags: 0
|
|
||||||
m_NavMeshData: {fileID: 0}
|
|
||||||
--- !u!1 &519420028
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 519420032}
|
|
||||||
- component: {fileID: 519420031}
|
|
||||||
- component: {fileID: 519420029}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Main Camera
|
|
||||||
m_TagString: MainCamera
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!81 &519420029
|
|
||||||
AudioListener:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 519420028}
|
|
||||||
m_Enabled: 1
|
|
||||||
--- !u!20 &519420031
|
|
||||||
Camera:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 519420028}
|
|
||||||
m_Enabled: 1
|
|
||||||
serializedVersion: 2
|
|
||||||
m_ClearFlags: 2
|
|
||||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
|
||||||
m_projectionMatrixMode: 1
|
|
||||||
m_GateFitMode: 2
|
|
||||||
m_FOVAxisMode: 0
|
|
||||||
m_SensorSize: {x: 36, y: 24}
|
|
||||||
m_LensShift: {x: 0, y: 0}
|
|
||||||
m_FocalLength: 50
|
|
||||||
m_NormalizedViewPortRect:
|
|
||||||
serializedVersion: 2
|
|
||||||
x: 0
|
|
||||||
y: 0
|
|
||||||
width: 1
|
|
||||||
height: 1
|
|
||||||
near clip plane: 0.3
|
|
||||||
far clip plane: 1000
|
|
||||||
field of view: 60
|
|
||||||
orthographic: 1
|
|
||||||
orthographic size: 5
|
|
||||||
m_Depth: -1
|
|
||||||
m_CullingMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967295
|
|
||||||
m_RenderingPath: -1
|
|
||||||
m_TargetTexture: {fileID: 0}
|
|
||||||
m_TargetDisplay: 0
|
|
||||||
m_TargetEye: 0
|
|
||||||
m_HDR: 1
|
|
||||||
m_AllowMSAA: 0
|
|
||||||
m_AllowDynamicResolution: 0
|
|
||||||
m_ForceIntoRT: 0
|
|
||||||
m_OcclusionCulling: 0
|
|
||||||
m_StereoConvergence: 10
|
|
||||||
m_StereoSeparation: 0.022
|
|
||||||
--- !u!4 &519420032
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 519420028}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 0
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &1535275592
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 1535275595}
|
|
||||||
- component: {fileID: 1535275594}
|
|
||||||
- component: {fileID: 1535275593}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Square
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &1535275593
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1535275592}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 5f096d187f76a734fac022700054dfec, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
spriteRenderer: {fileID: 1535275594}
|
|
||||||
selectedSprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
|
||||||
defaultSprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
|
||||||
--- !u!212 &1535275594
|
|
||||||
SpriteRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1535275592}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CastShadows: 0
|
|
||||||
m_ReceiveShadows: 0
|
|
||||||
m_DynamicOccludee: 1
|
|
||||||
m_StaticShadowCaster: 0
|
|
||||||
m_MotionVectors: 1
|
|
||||||
m_LightProbeUsage: 1
|
|
||||||
m_ReflectionProbeUsage: 1
|
|
||||||
m_RayTracingMode: 0
|
|
||||||
m_RayTraceProcedural: 0
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 10754, 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: 0
|
|
||||||
m_MinimumChartSize: 4
|
|
||||||
m_AutoUVMaxDistance: 0.5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_FlipX: 0
|
|
||||||
m_FlipY: 0
|
|
||||||
m_DrawMode: 0
|
|
||||||
m_Size: {x: 1, y: 1}
|
|
||||||
m_AdaptiveModeThreshold: 0.5
|
|
||||||
m_SpriteTileMode: 0
|
|
||||||
m_WasSpriteAssigned: 1
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_SpriteSortPoint: 0
|
|
||||||
--- !u!4 &1535275595
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1535275592}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: -0.19512245, y: 0.14398842, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 2cda990e2423bbf4892e6590ba056729
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
30
Assets/Scripts/DayTransitionManager.cs
Normal file
30
Assets/Scripts/DayTransitionManager.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class DayTransitionManager : MonoBehaviour {
|
||||||
|
public Animator dayTransitionAnimator;
|
||||||
|
public TextMeshProUGUI dayCountText;
|
||||||
|
public GameObject sleepButton;
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
|
HouseController.NewDayEvent.AddListener(NewDay);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NewDay() {
|
||||||
|
sleepButton.GetComponent<Button>().enabled = false;
|
||||||
|
dayTransitionAnimator.gameObject.SetActive(true);
|
||||||
|
StartCoroutine(PlayTransition());
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator PlayTransition() {
|
||||||
|
dayCountText.text = "Day " + HouseController.DayCount;
|
||||||
|
dayTransitionAnimator.SetTrigger("start");
|
||||||
|
|
||||||
|
yield return new WaitForSeconds(3f);
|
||||||
|
sleepButton.GetComponent<Button>().enabled = true;
|
||||||
|
dayTransitionAnimator.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,9 +6,10 @@ using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
public class HouseController : MonoBehaviour {
|
public class HouseController : MonoBehaviour {
|
||||||
private int _dayCount = 1;
|
private static int _dayCount = 1;
|
||||||
private static UnityEvent _newDayEvent;
|
private static UnityEvent _newDayEvent;
|
||||||
public static UnityEvent NewDayEvent => _newDayEvent;
|
public static UnityEvent NewDayEvent => _newDayEvent;
|
||||||
|
public static int DayCount => _dayCount;
|
||||||
|
|
||||||
public Canvas menu;
|
public Canvas menu;
|
||||||
public TextMeshProUGUI dayCountTextMeshProUGUI;
|
public TextMeshProUGUI dayCountTextMeshProUGUI;
|
||||||
|
|
@ -18,8 +19,11 @@ public class HouseController : MonoBehaviour {
|
||||||
ToggleMenu();
|
ToggleMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start() {
|
private void Awake() {
|
||||||
_newDayEvent ??= new UnityEvent();
|
_newDayEvent ??= new UnityEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Start() {
|
||||||
ToggleMenu();
|
ToggleMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -31,8 +35,7 @@ public class HouseController : MonoBehaviour {
|
||||||
|
|
||||||
public void ToggleMenu() {
|
public void ToggleMenu() {
|
||||||
menu.gameObject.SetActive(!menu.gameObject.activeSelf);
|
menu.gameObject.SetActive(!menu.gameObject.activeSelf);
|
||||||
|
|
||||||
|
|
||||||
if (Camera.main != null) {
|
if (Camera.main != null) {
|
||||||
Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
|
Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
|
||||||
float newPosX = pos.x;
|
float newPosX = pos.x;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,20 @@ using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class HoverManager : MonoBehaviour {
|
public class HoverManager : MonoBehaviour {
|
||||||
|
#region Singleton
|
||||||
|
|
||||||
|
public static HoverManager instance;
|
||||||
|
|
||||||
|
private void Awake() {
|
||||||
|
if (instance != null) {
|
||||||
|
Debug.LogWarning("More than one instance of HoverManager found");
|
||||||
|
}
|
||||||
|
|
||||||
|
instance = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public TextMeshProUGUI descriptionText;
|
public TextMeshProUGUI descriptionText;
|
||||||
public RectTransform descriptionHoverBackground;
|
public RectTransform descriptionHoverBackground;
|
||||||
|
|
||||||
|
|
@ -41,7 +55,7 @@ public class HoverManager : MonoBehaviour {
|
||||||
/**
|
/**
|
||||||
* Hide the description Text
|
* Hide the description Text
|
||||||
*/
|
*/
|
||||||
private void HideDescription() {
|
public void HideDescription() {
|
||||||
descriptionText.text = default;
|
descriptionText.text = default;
|
||||||
descriptionHoverBackground.gameObject.SetActive(false);
|
descriptionHoverBackground.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,25 +16,28 @@ public class Inventory : ItemStorage {
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private const int InventorySpace = 28;
|
private const int _InventorySpace = 28;
|
||||||
private const int MaxItemStack = 999;
|
private const int _MaxItemStack = 999;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified amount of items to the Inventory
|
* Adds the specified amount of items to the Inventory
|
||||||
*/
|
*/
|
||||||
public override 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;
|
||||||
}
|
}
|
||||||
// Sell overflowing Items
|
// Sell overflowing Items
|
||||||
if (items.ContainsKey(item) && items[item] + amount >= MaxItemStack) {
|
if (items.ContainsKey(item) && items[item] + amount >= _MaxItemStack) {
|
||||||
SellItem(item, amount - (MaxItemStack - items[item]));
|
SellItem(item, amount - (_MaxItemStack - items[item]));
|
||||||
amount = MaxItemStack - items[item];
|
amount = _MaxItemStack - items[item];
|
||||||
}
|
}
|
||||||
base.AddItem(item, amount);
|
base.AddItem(item, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calls ItemStorage.RemoveItem() and deselects the item if removed
|
||||||
|
*/
|
||||||
public override void RemoveItem(Item item, int amount) {
|
public override void RemoveItem(Item item, int amount) {
|
||||||
base.RemoveItem(item, amount);
|
base.RemoveItem(item, amount);
|
||||||
if (!items.ContainsKey(item) && PlayerController.instance.GetSelectedItem() == item) {
|
if (!items.ContainsKey(item) && PlayerController.instance.GetSelectedItem() == item) {
|
||||||
|
|
@ -42,6 +45,9 @@ public class Inventory : ItemStorage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sells the Item for the Item Sell Price and puts it in the Shop for the full price
|
||||||
|
*/
|
||||||
public void SellItem(Item item, int amount) {
|
public void SellItem(Item item, int amount) {
|
||||||
PlayerController.instance.ChangeMoney(item.SellPrice);
|
PlayerController.instance.ChangeMoney(item.SellPrice);
|
||||||
Shop.instance.AddItem(item, amount);
|
Shop.instance.AddItem(item, amount);
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,10 @@ using UnityEngine.EventSystems;
|
||||||
|
|
||||||
public class InventorySlot : ItemStorageSlot, IPointerClickHandler {
|
public class InventorySlot : ItemStorageSlot, IPointerClickHandler {
|
||||||
private Inventory _inventory;
|
private Inventory _inventory;
|
||||||
private Shop _shop;
|
|
||||||
private PlayerController _playerController;
|
private PlayerController _playerController;
|
||||||
|
|
||||||
private void Start() {
|
private void Start() {
|
||||||
_inventory = Inventory.instance;
|
_inventory = Inventory.instance;
|
||||||
_shop = Shop.instance;
|
|
||||||
_playerController = PlayerController.instance;
|
_playerController = PlayerController.instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -29,22 +27,15 @@ public class InventorySlot : ItemStorageSlot, IPointerClickHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sells the Item for the Item Sell Price and puts it in the Shop if the selling was a mistake
|
|
||||||
*/
|
|
||||||
private void SellItem() {
|
|
||||||
if(Item) {
|
|
||||||
_inventory.SellItem(Item, 1); //TODO: wie machen mehr als 1 verkaufen?!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets called when the Inventory Slot gets clicked on
|
* Gets called when the Inventory Slot gets clicked on
|
||||||
*/
|
*/
|
||||||
public void OnPointerClick(PointerEventData eventData) {
|
public void OnPointerClick(PointerEventData eventData) {
|
||||||
// When clicked on with right Mouse Button sell the Item
|
// When clicked on with right Mouse Button sell the Item
|
||||||
if(eventData.button == PointerEventData.InputButton.Right) {
|
if(eventData.button == PointerEventData.InputButton.Right) {
|
||||||
SellItem();
|
if(Item) {
|
||||||
|
_inventory.SellItem(Item, 1); //TODO: wie machen mehr als 1 verkaufen?!
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
public class InventoryUI : MonoBehaviour {
|
public class InventoryUI : MonoBehaviour {
|
||||||
public Transform itemsParent;
|
public Transform itemsParent;
|
||||||
|
|
@ -34,8 +36,12 @@ public class InventoryUI : MonoBehaviour {
|
||||||
*/
|
*/
|
||||||
private void ToggleInventory() {
|
private void ToggleInventory() {
|
||||||
inventoryUI.SetActive(!inventoryUI.activeSelf);
|
inventoryUI.SetActive(!inventoryUI.activeSelf);
|
||||||
|
HoverManager.instance.HideDescription();
|
||||||
|
foreach(InventorySlot slot in _slots) {
|
||||||
|
slot.ChangeItemSelectedSprite(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//TODO: sell Items with right click and when shop is open
|
|
||||||
/**
|
/**
|
||||||
* Is called when something in the Inventory UI should update
|
* Is called when something in the Inventory UI should update
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public class ItemStorageSlot : MonoBehaviour, IPointerEnterHandler, IPointerExit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChangeItemSelectedSprite(bool on) {
|
public void ChangeItemSelectedSprite(bool on) {
|
||||||
if(_item) {
|
if(_item) {
|
||||||
if(on) {
|
if(on) {
|
||||||
icon.sprite = _item.selectedSprite;
|
icon.sprite = _item.selectedSprite;
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,9 @@ public class PlayerController : MonoBehaviour {
|
||||||
public int Money => _money;
|
public int Money => _money;
|
||||||
|
|
||||||
public delegate void OnMoneyChanged();
|
public delegate void OnMoneyChanged();
|
||||||
|
|
||||||
public OnMoneyChanged onMoneyChangedCallback;
|
public OnMoneyChanged onMoneyChangedCallback;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
private void Start() {
|
private void Start() {
|
||||||
_inventory = Inventory.instance;
|
_inventory = Inventory.instance;
|
||||||
|
|
@ -51,8 +52,7 @@ public class PlayerController : MonoBehaviour {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeselectItem()
|
public void DeselectItem() {
|
||||||
{
|
|
||||||
_selectedItem = null;
|
_selectedItem = null;
|
||||||
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||||
}
|
}
|
||||||
|
|
@ -63,11 +63,11 @@ public class PlayerController : MonoBehaviour {
|
||||||
|
|
||||||
public void ChangeMoney(int amount) {
|
public void ChangeMoney(int amount) {
|
||||||
_money += amount;
|
_money += amount;
|
||||||
|
|
||||||
onMoneyChangedCallback?.Invoke();
|
onMoneyChangedCallback?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateMoneyUI() {
|
private void UpdateMoneyUI() {
|
||||||
moneyTextMeshProUGUI.text = _money + "µ";
|
moneyTextMeshProUGUI.text = _money + "µ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ public class ShopUI : MonoBehaviour {
|
||||||
*/
|
*/
|
||||||
private void ToggleShop() {
|
private void ToggleShop() {
|
||||||
inventoryUI.gameObject.SetActive(!shopUI.activeSelf);
|
inventoryUI.gameObject.SetActive(!shopUI.activeSelf);
|
||||||
|
HoverManager.instance.HideDescription();
|
||||||
shopUI.SetActive(!shopUI.activeSelf);
|
shopUI.SetActive(!shopUI.activeSelf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,13 @@ using System;
|
||||||
using Tiles;
|
using Tiles;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class TileBehaviour : MonoBehaviour
|
public class TileBehaviour : MonoBehaviour {
|
||||||
{
|
|
||||||
private BaseTile _tile;
|
private BaseTile _tile;
|
||||||
private SpriteRenderer _hoverIndicatorSpriteRenderer;
|
private SpriteRenderer _hoverIndicatorSpriteRenderer;
|
||||||
private static Color _hoverIndicatorColor;
|
private static Color _hoverIndicatorColor;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start() {
|
||||||
{
|
|
||||||
_hoverIndicatorSpriteRenderer = gameObject.transform.GetChild(2).GetComponent<SpriteRenderer>();
|
_hoverIndicatorSpriteRenderer = gameObject.transform.GetChild(2).GetComponent<SpriteRenderer>();
|
||||||
SetHoverIndicatorVisibility(false);
|
SetHoverIndicatorVisibility(false);
|
||||||
SetTile(new GrassTile(gameObject));
|
SetTile(new GrassTile(gameObject));
|
||||||
|
|
@ -19,53 +17,41 @@ public class TileBehaviour : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update() {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnMouseDown()
|
void OnMouseDown() {
|
||||||
{
|
|
||||||
UsableItem usable = null;
|
UsableItem usable = null;
|
||||||
BaseTile tileToSetTo = null;
|
BaseTile tileToSetTo = null;
|
||||||
|
|
||||||
if (PlayerController.instance.GetSelectedItem() != null)
|
if(PlayerController.instance.GetSelectedItem() != null) {
|
||||||
{
|
|
||||||
usable = PlayerController.instance.GetSelectedItem();
|
usable = PlayerController.instance.GetSelectedItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
tileToSetTo = _tile.Clicked(usable);
|
tileToSetTo = _tile.Clicked(usable);
|
||||||
|
|
||||||
if (tileToSetTo != null)
|
if(tileToSetTo != null) {
|
||||||
{
|
|
||||||
SetTile(tileToSetTo);
|
SetTile(tileToSetTo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetTile(BaseTile tileToSet)
|
void SetTile(BaseTile tileToSet) {
|
||||||
{
|
|
||||||
_tile = tileToSet;
|
_tile = tileToSet;
|
||||||
GetComponent<SpriteRenderer>().sprite = _tile.Sprite;
|
GetComponent<SpriteRenderer>().sprite = _tile.Sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMouseEnter()
|
private void OnMouseEnter() {
|
||||||
{
|
|
||||||
SetHoverIndicatorVisibility(true);
|
SetHoverIndicatorVisibility(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMouseExit()
|
private void OnMouseExit() {
|
||||||
{
|
|
||||||
SetHoverIndicatorVisibility(false);
|
SetHoverIndicatorVisibility(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetHoverIndicatorVisibility(bool visible)
|
private void SetHoverIndicatorVisibility(bool visible) {
|
||||||
{
|
if(visible) {
|
||||||
if (visible)
|
|
||||||
{
|
|
||||||
_hoverIndicatorSpriteRenderer.color = _hoverIndicatorColor;
|
_hoverIndicatorSpriteRenderer.color = _hoverIndicatorColor;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
_hoverIndicatorSpriteRenderer.color = Color.clear;
|
_hoverIndicatorSpriteRenderer.color = Color.clear;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue