Panel refactoring - player quests

This commit is contained in:
kabix09 2022-10-22 18:04:21 +02:00
parent 1794b60fb0
commit db575614ec
72 changed files with 2769 additions and 428 deletions

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 58865c060b4d23f41af849da7f95c807
guid: e985e9291cdf02245b272d4fafce4289
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3ad66b979f0b5444cbeccf9751f4863f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,949 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3337243677719157076
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243677719157067}
- component: {fileID: 3337243677719157066}
- component: {fileID: 1136979341}
m_Layer: 5
m_Name: TaskBox
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243677719157067
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243677719157076}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 2.5, y: 2.5, z: 1}
m_Children:
- {fileID: 3337243678242528397}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3337243677719157066
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243677719157076}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
--- !u!114 &1136979341
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243677719157076}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3358a3890cb9d764aa23f481299e229d, type: 3}
m_Name:
m_EditorClassIdentifier:
taskBox_header: {fileID: 3337243678199584009}
taskBox_body: {fileID: 3337243679785832160}
title: {fileID: 3337243677751433640}
content: {fileID: 3337243679043656668}
task: {fileID: 0}
--- !u!1 &3337243677751433640
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243677751433647}
- component: {fileID: 3337243677751433645}
- component: {fileID: 3337243677751433646}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243677751433647
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243677751433640}
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_Children: []
m_Father: {fileID: 3337243678199584008}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 105, y: -10}
m_SizeDelta: {x: 150, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3337243677751433645
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243677751433640}
m_CullTransparentMesh: 1
--- !u!114 &3337243677751433646
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243677751433640}
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: Lorem ipsum title
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: 4282532448
m_fontColor: {r: 0.3773585, g: 0.25809896, b: 0.25809896, 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: 10
m_fontSizeBase: 10
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.044948574, y: 0.6672936, z: -0.14154793, w: 1.2620177}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3337243678199584009
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243678199584008}
- component: {fileID: 3337243678199584013}
- component: {fileID: 3337243678199584014}
- component: {fileID: 3337243678199584015}
m_Layer: 5
m_Name: Header
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243678199584008
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678199584009}
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_Children:
- {fileID: 3337243678447623330}
- {fileID: 3337243678969414444}
- {fileID: 3337243677751433647}
m_Father: {fileID: 3337243678242528397}
m_RootOrder: 0
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: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3337243678199584013
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678199584009}
m_CullTransparentMesh: 1
--- !u!114 &3337243678199584014
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678199584009}
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: 99ef742ea21894b4d995d1bc6209bd91, type: 3}
m_Type: 0
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!114 &3337243678199584015
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678199584009}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 20
m_PreferredWidth: -1
m_PreferredHeight: 20
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!1 &3337243678242528398
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243678242528397}
- component: {fileID: 3337243678242528387}
- component: {fileID: 3337243678242528396}
m_Layer: 5
m_Name: Window Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243678242528397
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678242528398}
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_Children:
- {fileID: 3337243678199584008}
- {fileID: 3337243679785832167}
m_Father: {fileID: 3337243677719157067}
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: 0, y: 0}
m_SizeDelta: {x: 200, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &3337243678242528387
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678242528398}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &3337243678242528396
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678242528398}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!1 &3337243678447623342
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243678447623330}
- component: {fileID: 3337243678447623331}
- component: {fileID: 3337243678447623340}
- component: {fileID: 3337243678447623341}
m_Layer: 0
m_Name: Expand Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &3337243678447623330
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678447623342}
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_Children: []
m_Father: {fileID: 3337243678199584008}
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: 20, y: -10}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3337243678447623331
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678447623342}
m_CullTransparentMesh: 1
--- !u!114 &3337243678447623340
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678447623342}
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: 10915, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 0
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!114 &3337243678447623341
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678447623342}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3337243678447623340}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3337243678447623342}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 3337243678969414445}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
- m_Target: {fileID: 3337243679785832160}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
--- !u!1 &3337243678969414445
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243678969414444}
- component: {fileID: 3337243678969414433}
- component: {fileID: 3337243678969414434}
- component: {fileID: 3337243678969414435}
m_Layer: 0
m_Name: Collapse Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243678969414444
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678969414445}
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_Children: []
m_Father: {fileID: 3337243678199584008}
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: 20, y: -10}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3337243678969414433
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678969414445}
m_CullTransparentMesh: 1
--- !u!114 &3337243678969414434
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678969414445}
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: 10915, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 0
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!114 &3337243678969414435
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243678969414445}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3337243678969414434}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 3337243678447623342}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 1
m_CallState: 2
- m_Target: {fileID: 3337243678969414445}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- m_Target: {fileID: 3337243679785832160}
m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine
m_MethodName: SetActive
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &3337243679043656668
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243679043656659}
- component: {fileID: 3337243679043656657}
- component: {fileID: 3337243679043656658}
m_Layer: 0
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243679043656659
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679043656668}
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_Children: []
m_Father: {fileID: 3337243679785832167}
m_RootOrder: 0
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.5, y: 0.5}
--- !u!222 &3337243679043656657
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679043656668}
m_CullTransparentMesh: 1
--- !u!114 &3337243679043656658
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679043656668}
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: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean et consequat
nibh, et rhoncus dolor. Mauris lobortis volutpat ullamcorper. Etiam dictum consequat
null
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: 8
m_fontSizeBase: 8
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_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!1 &3337243679785832160
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3337243679785832167}
- component: {fileID: 3337243679785832155}
- component: {fileID: 3337243679785832164}
- component: {fileID: 3337243679785832165}
- component: {fileID: 3337243679785832166}
m_Layer: 0
m_Name: Body
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3337243679785832167
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679785832160}
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_Children:
- {fileID: 3337243679043656659}
m_Father: {fileID: 3337243678242528397}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 100, y: 0}
m_SizeDelta: {x: 200, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &3337243679785832155
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679785832160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!114 &3337243679785832164
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679785832160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 10
m_Right: 8
m_Top: 8
m_Bottom: 8
m_ChildAlignment: 0
m_Spacing: 5
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!222 &3337243679785832165
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679785832160}
m_CullTransparentMesh: 1
--- !u!114 &3337243679785832166
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3337243679785832160}
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: 99ef742ea21894b4d995d1bc6209bd91, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1cd878accdd121744a3a4829d9bc910f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,585 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4136979550770096709
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4136979550770096714}
- component: {fileID: 4136979550770096713}
- component: {fileID: 4136979550770096712}
- component: {fileID: 4136979550770096715}
m_Layer: 5
m_Name: Scroll View
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4136979550770096714
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550770096709}
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: 4136979550912312139}
m_Father: {fileID: 4136979550784496705}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.0000038146973, y: 0.0000076293945}
m_SizeDelta: {x: 550, y: 715}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4136979550770096713
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550770096709}
m_CullTransparentMesh: 1
--- !u!114 &4136979550770096712
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550770096709}
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: c7b158bba3938c6498313b06b868b9a7, type: 3}
m_Type: 0
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!114 &4136979550770096715
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550770096709}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 4136979552221407524}
m_Horizontal: 0
m_Vertical: 0
m_MovementType: 2
m_Elasticity: 0.5
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 1
m_Viewport: {fileID: 4136979550912312139}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 2
m_VerticalScrollbarVisibility: 2
m_HorizontalScrollbarSpacing: -3
m_VerticalScrollbarSpacing: -3
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &4136979550784496704
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4136979550784496705}
- component: {fileID: 4136979550784496711}
- component: {fileID: 4136979550784496710}
- component: {fileID: 23121313890645495}
m_Layer: 5
m_Name: TaskPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4136979550784496705
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550784496704}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.4, y: 0.4, z: 0.4}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4136979551920493059}
- {fileID: 4136979550770096714}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 225, y: 0}
m_SizeDelta: {x: 550, y: 715}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4136979550784496711
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550784496704}
m_CullTransparentMesh: 0
--- !u!114 &4136979550784496710
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550784496704}
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: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
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!114 &23121313890645495
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550784496704}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b8a6f254fe36462ca3d3e3d705026c56, type: 3}
m_Name:
m_EditorClassIdentifier:
_panelContent: {fileID: 4136979552221407527}
TaskBoxTemplate: {fileID: 3337243677719157076, guid: 1cd878accdd121744a3a4829d9bc910f, type: 3}
TaskBoxList: []
--- !u!1 &4136979550912312138
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4136979550912312139}
- component: {fileID: 4136979550912312142}
- component: {fileID: 4136979550912312137}
- component: {fileID: 4136979550912312136}
m_Layer: 5
m_Name: Viewport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4136979550912312139
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550912312138}
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: 4136979552221407524}
m_Father: {fileID: 4136979550770096714}
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: -25}
m_SizeDelta: {x: 0, y: -47}
m_Pivot: {x: 0, y: 1}
--- !u!222 &4136979550912312142
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550912312138}
m_CullTransparentMesh: 1
--- !u!114 &4136979550912312137
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550912312138}
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: 5891182583b3e7a42a21ed9d1cb46e97, type: 3}
m_Type: 0
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!114 &4136979550912312136
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979550912312138}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 1
--- !u!1 &4136979551422401455
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4136979551422401452}
- component: {fileID: 4136979551422401362}
- component: {fileID: 4136979551422401453}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4136979551422401452
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979551422401455}
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: 4136979551920493059}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4136979551422401362
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979551422401455}
m_CullTransparentMesh: 1
--- !u!114 &4136979551422401453
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979551422401455}
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: Quests
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 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!1 &4136979551920493058
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4136979551920493059}
- component: {fileID: 4136979551920493057}
- component: {fileID: 4136979551920493056}
m_Layer: 5
m_Name: Header
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4136979551920493059
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979551920493058}
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: 4136979551422401452}
m_Father: {fileID: 4136979550784496705}
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: 397.5}
m_SizeDelta: {x: -130, y: -635}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4136979551920493057
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979551920493058}
m_CullTransparentMesh: 1
--- !u!114 &4136979551920493056
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979551920493058}
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: fc7810d5df3d6b64eb3b231f24cf22f9, type: 3}
m_Type: 0
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!1 &4136979552221407527
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4136979552221407524}
- component: {fileID: 4136979552221407530}
- component: {fileID: 4136979552221407525}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4136979552221407524
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979552221407527}
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: 4136979550912312139}
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: 0, y: -20}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &4136979552221407530
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979552221407527}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 2
--- !u!114 &4136979552221407525
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4136979552221407527}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 25
m_Right: 0
m_Top: 0
m_Bottom: 10
m_ChildAlignment: 0
m_Spacing: 10
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 1
m_ReverseArrangement: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1878952481d1cf74bb217849e5b3fca8
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -35,9 +35,9 @@ public class DoorBehaviour : MonoBehaviour
public void ScenetToMoveTo()
{
// 1. Save all befor change scene
SaveController.GetComponent<SaveController>().SaveItems();
// SaveController.GetComponent<SaveController>().SaveItems();
SaveController.GetComponent<SaveController>().SaveQuests();
SaveController.GetComponent<SaveController>().SaveInventory();
// SaveController.GetComponent<SaveController>().SaveInventory();
// 2. Change scene
SceneManager.LoadScene(this.SceneName);
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d7edafbad889ba34e9aae593d927c3a5
guid: 754d016cd82f48f408221e1d4f04a31a
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -173,7 +173,7 @@ public class NPCDialogue : MonoBehaviour
// 1. Add task to palyer quests list
Task myTask = gameObject.GetComponent<NPCQuest>().AcceptTask();
TaskManager.Instance.AddTask(myTask);
TaskUIManager.Instance.Add(myTask);
// 2. Drop Axe On Map
gameObject.GetComponent<NPCQuest>().DropItem();

View File

@ -17,7 +17,7 @@ public class NPCQuest : MonoBehaviour
// Start is called before the first frame update
void Start()
{
this.Quest = new Task(1, "Help the Lumberjack", "Find his axe in the forest and bring it back to him.", TaskHardship.Easy);
this.Quest = new Task(1, "Help the Lumberjack", "Find his axe in the forest and bring it back to him.", TaskDifficultyEnum.Easy);
}
// Update is called once per frame

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: db2d46d6a30b4fce99f390ef0852d536
timeCreated: 1660405127

View File

@ -0,0 +1,56 @@
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
public class SaveTaskDataManager : SaveModelSystem<Task>
{
public override bool SaveModelItem(Task model)
{
return base.SaveModelItem(model);
}
public override bool SaveModelList(List<Task> list)
{
BinaryFormatter formatter = new BinaryFormatter();
Debug.Log("Saved Quest at " + Path);
if (!Directory.Exists(Path)) Directory.CreateDirectory(Path);
FileStream stream = new FileStream(
Path + GetFileName(ObjectListName),
FileMode.Create
);
formatter.Serialize(stream, list);
stream.Close();
return true;
}
public override Task LoadModelItem()
{
return base.LoadModelItem();
}
public override IEnumerable<Task> LoadModelList()
{
string path = Path + GetFileName(ObjectListName);
if(File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
List<Task> questsList = formatter.Deserialize(stream) as List<Task>;
stream.Close();
return questsList;
} else {
Debug.Log("Save file not found in " + path);
}
return new List<Task>();
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 619da76c6ff64ea280fc9781d3251ca0
timeCreated: 1662819152

View File

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public class SceneTaskDataLoader : SceneBaseDataLoader<Task>
{
public SceneTaskDataLoader(string _objectListName, string _objectFolderName)
{
SaveModelSystem = new SaveTaskDataManager();
SaveModelSystem.ObjectFolderName = _objectFolderName;
SaveModelSystem.ObjectListName = _objectListName;
}
// public override List<Task> LoadData(SceneElementTypeEnum type)
// {
// string path = SaveSystem.GetSavePath();
//
// if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load
// return new List<Task>();
//
// FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles();
//
// foreach(FileInfo file in fileInfo)
// {
// if(file.Name != ItemsListName + ".fun")
// continue;
//
// List<Task> taskList = SaveQuestSystem.LoadQuestsList(ItemsListName);
//
// foreach(Task task in taskList)
// Elements.Add(task);
// }
//
// return Elements;
// }
// public override void SaveData(List<Task> _elements, SceneElementTypeEnum type)
// {
// // Case I - if we remember all list
// // 1) if after removed item form DynamicList is empty - remove all file
// // 2) if after removed item form DynamciList there are another one - save updated list again
// if(TaskManager.Instance.taskList.Count > 0) {
// SaveQuestSystem.SaveQuestsList(_elements, ItemsListName);
// } else {
// string _path = SaveSystem.GetSavePath() + "/" + ItemsListName + ".fun";
//
// try
// {
// Debug.Log("File to remove: " + _path);
//
// if(File.Exists(_path))
// {
// File.Delete(_path);
// }
// }
// catch (IOException ioExp)
// {
// Debug.LogError(ioExp.Message);
// }
// }
//
// // Case II - if we rememenber object per file
// // 1) remove specyfic file
// //
// // Unfortunatelly we don't use this way of saving items yet :D
//
// }
protected override IEnumerable<Task> LoadGenericData()
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
return SaveModelSystem.LoadModelList();
}
protected override bool SaveGenericData(List<Task> _elements)
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
try
{
SaveModelSystem.SaveModelList(_elements);
return true;
}
catch (Exception e) { Debug.LogError(e.Message); }
return false;
}
protected override IEnumerable<Task> LoadStaticData() { throw new System.NotImplementedException(); }
protected override List<Task> LoadDynamicData() { throw new System.NotImplementedException(); }
protected override bool SaveStaticData(List<Task> _elements) { throw new System.NotImplementedException(); }
protected override bool SaveDynamicData(List<Task> _elements) { throw new System.NotImplementedException(); }
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 719120390a134f03829928aa42f144c9
timeCreated: 1660503812

View File

@ -0,0 +1,43 @@
using System;
using UnityEngine;
public class SceneTaskDataManager : SceneBaseDataManager<Task>
{
protected override string OBJECT_FOLDER_NAME { get { return "Quest"; } }
protected override string OBJECT_LIST_NAME { get { return "QuestsList"; } }
private void Start()
{
Debug.Log("Start SceneTaskdata manager");
//TaskUIManager.FindOrCreateInstance();
var taskManager = TaskUIManager.Instance;
if (taskManager == null)
throw new NullReferenceException("TaskUIManager not found!!!");
StaticDataList = (new TaskDataListManager()).SetUiManager(ref taskManager);
// DynamicDataList = (new TaskDataListManager()).SetUiManager(ref taskManager);
DataLoader = new SceneTaskDataLoader(OBJECT_LIST_NAME, OBJECT_FOLDER_NAME);
// taskManager.SetList();
LoadStaticData();
// LoadDynamicData();
taskManager.SetList(StaticDataList.GetList());
taskManager.OpenPanel();
}
protected SceneBaseDataManager<Task> GetObjectType()
{
return GameObject.FindObjectOfType<SceneTaskDataManager>();
}
protected SceneBaseDataManager<Task> CreateInstance(ref GameObject managerGameObject)
{
return managerGameObject.AddComponent<SceneTaskDataManager>();
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 696dabb3bc014c2181a73c86e59506cb
timeCreated: 1660406543

View File

@ -0,0 +1,17 @@
public class TaskDataListManager : DataListManager<Task>
{
// public override void Build()
// {
// foreach(var quest in Elements)
// uiManager.Add(quest);
// }
public override void AddElementToList(Task newElement)
{
throw new System.NotImplementedException();
}
public override void RemoveElementFromList(Task element)
{
throw new System.NotImplementedException();
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3d3827a1d6324de6addcd5e444bbee9f
timeCreated: 1660405164

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 14f9e76ffa2443ce8dcf555c7cf3d04e
timeCreated: 1660165914

View File

@ -0,0 +1,41 @@
using System.Collections.Generic;
using UnityEngine;
public abstract class DataListManager<T> : SceneDataListManagerInterface<T>
{
[SerializeField] protected List<T> Elements;
[SerializeField] protected UIBaseManager<T> uiManager;
/// <summary>
/// Pass ref to global instance of class
/// </summary>
/// <param name="_uiManager"></param>
public DataListManager<T> SetUiManager(ref UIBaseManager<T> _uiManager)
{
uiManager = _uiManager;
return this;
}
public List<T> GetList()
{
return Elements;
}
public void SetList(List<T> _elements)
{
Elements = _elements;
}
public void AddElementToList(T newElement)
{
throw new System.NotImplementedException();
}
public void RemoveElementFromList(T element)
{
throw new System.NotImplementedException();
}
//public abstract void Build();
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8e99a0ad506941feaae39ce411792be3
timeCreated: 1660401804

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5a593b8f8685477295db56223cebd3eb
timeCreated: 1660487127

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 77ed1a571d1643f1993ccef6284861fd
timeCreated: 1660166978

View File

@ -0,0 +1,78 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public abstract class SceneBaseDataLoader<T> : SceneDataLoaderInterface<T>
{
protected SaveModelSystem<T> SaveModelSystem;
protected PathBuilder PathBuilder;
protected string CurrentMap;
protected SceneBaseDataLoader()
{
PathBuilder = new PathBuilder();
CurrentMap = SceneManager.GetActiveScene().name;
}
public List<T> LoadData(SceneElementTypeEnum type)
{
switch (type)
{
case SceneElementTypeEnum.None:
{
return LoadGenericData();
}
case SceneElementTypeEnum.Static:
{
return LoadStaticData();
}
case SceneElementTypeEnum.Dynamic:
{
return LoadDynamicData();
}
default: // for SceneElementTypeEnum.All
{
Debug.Log("Handle All case...");
return new List<T>();
}
}
}
public bool SaveData(List<T> _elements, SceneElementTypeEnum type)
{
switch (type)
{
case SceneElementTypeEnum.None:
{
return SaveGenericData(_elements);
}
case SceneElementTypeEnum.Static:
{
return SaveStaticData(_elements);
}
case SceneElementTypeEnum.Dynamic:
{
return SaveDynamicData(_elements);
}
default: // for SceneElementTypeEnum.All
{
Debug.Log("Handle All case...");
return true;
}
}
}
protected abstract List<T> LoadStaticData();
protected abstract List<T> LoadDynamicData();
protected abstract List<T> LoadGenericData();
protected abstract bool SaveStaticData(List<T> _elements);
protected abstract bool SaveDynamicData(List<T> _elements);
protected abstract bool SaveGenericData(List<T> _elements);
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 034018ef5e8e4e87981ec92fb3addb17
timeCreated: 1660677467

View File

@ -0,0 +1,161 @@
using System;
using System.Collections.Generic;
using UnityEngine;
public abstract class SceneBaseDataManager<T> : MonoBehaviour where T : Task
{
protected virtual string OBJECT_FOLDER_NAME => "";
protected virtual string OBJECT_LIST_NAME => "";
protected bool IsNewGame = true; // change to use global "gateway"
protected DataListManager<T> StaticDataList;
protected DataListManager<T> DynamicDataList;
protected SceneDataLoaderInterface<T> DataLoader { get; set; }
public static SceneBaseDataManager<T> Instance; // { get; private set; }
public static SceneBaseDataManager<T> FindOrCreateInstance() // ref GameObject managerGameObject
{
var instance = GetObjectType();
if (instance != null)
{
return instance;
}
Instance = CreateInstance();
return Instance;
}
protected static SceneBaseDataManager<T> GetObjectType()
{
return GameObject.FindObjectOfType<SceneBaseDataManager<T>>();
}
protected static SceneBaseDataManager<T> CreateInstance()
{
var managerGameObject = HandleManagerOnScene();
if (!managerGameObject)
throw new Exception("Game object to srote Managers scripts not found on scene!!!");
return managerGameObject.AddComponent<SceneBaseDataManager<T>>();
}
/// <summary>
/// Function to handel GLOBAL manager object from scene
/// </summary>
/// <returns></returns>
protected static GameObject HandleManagerOnScene()
{
return GameObject.FindGameObjectWithTag("Manager").transform.Find("DataManger").gameObject;
}
// /// <summary>
// /// Part of core functions
// /// </summary>
// private void Build()
// {
// // StaticDataList.Build();
// //
// // DynamicDataList.Build();
// }
private bool LoadData(SceneElementTypeEnum type, ref DataListManager<T> dataListManager)
{
try
{
dataListManager.SetList(
DataLoader.LoadData(SceneElementTypeEnum.None)
);
return true;
}
catch (Exception e) {
Debug.LogWarning(e.Message);
}
return false;
}
private bool SaveData(List<T> _elements, SceneElementTypeEnum type)
{
try
{
DataLoader.SaveData(_elements, type);
return true;
}
catch (Exception e) {
Debug.LogWarning(e.Message);
}
return false;
}
/// <summary>
/// Part of static list CURD methods
/// </summary>
public bool LoadStaticData()
{
return LoadData(SceneElementTypeEnum.Static, ref StaticDataList);
}
protected virtual void AddElementToStaticList(T _element)
{
StaticDataList.AddElementToList(_element);
}
protected virtual void RemoveElementFromStaticList(T _element)
{
StaticDataList.RemoveElementFromList(_element);
}
public bool SaveStaticData()
{
// TODO
// how to get list
// 1. List in UI manager should be synchronized with list in this manager
// approach:
// 1. get from outside, update local list && us it
// 2. Handle list synchronized all the time & pass local list
return SaveData(StaticDataList.GetList(), SceneElementTypeEnum.Static);
}
/// <summary>
/// Part of dynamic list CURD methods
/// </summary>
public bool LoadDynamicData()
{
return LoadData(SceneElementTypeEnum.Dynamic, ref DynamicDataList);
}
protected virtual void AddElementToDynamicList(T _element)
{
DynamicDataList.AddElementToList(_element);
}
protected virtual void RemoveElementFromDynamicList(T _element)
{
DynamicDataList.RemoveElementFromList(_element);
}
public bool SaveDynamicData()
{
// TODO
// how to get list
// 1. List in UI manager should be synchronized with list in this manager
// approach:
// 1. get from outside, update local list && us it
// 2. Handle list synchronized all the time & pass local list
return SaveData(DynamicDataList.GetList(), SceneElementTypeEnum.Dynamic);
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: eb0f55bac42241c08bb2070017e4cb20
timeCreated: 1660169448

View File

@ -0,0 +1,87 @@
using UnityEditor;
using UnityEngine;
// Base class for Build method fo
// - SceneChestManager
// - SceneEquippableItemManager
public abstract class SceneDataListManager<T> : DataListManager<T>
{
private readonly string gameObjectLocalization;
private readonly string assetLocalization;
protected SceneDataListManager(string gameObjectLocalization, string assetLocalization)
{
this.gameObjectLocalization = gameObjectLocalization;
this.assetLocalization = assetLocalization;
}
// public override void Build()
// {
// foreach(var prefabAsset in Elements)
// {
//
// GameObject newObject = (GameObject)AssetDatabase.LoadAssetAtPath(gameObjectLocalization + prefabAsset.prefarbAssetName + ".prefab", typeof(GameObject));
//
// if(!newObject)
// {
// Debug.Log("Can't find prefarb by name " + prefabAsset.prefarbAssetName);
// break;
// }
//
//
// GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
//
// if(globalGUI)
// {
// // 1. Create gameObject by handled prefab
// // 2. SetUp
// // 2.1 Set position
// GameObject _object = Instantiate(newObject, prefabAsset.position, Quaternion.identity, globalGUI.transform);
//
// // 2.2 Set name
// _object.name = prefabAsset.name;
//
// //chest.transform.SetParent(globalGUI.transform);
// // 2.3 Set pransform
// _object.transform.localScale = new Vector3(0.5f, 0.5f, 1);
//
//
// doBuild(_object);
// // // 3. SetUp EqippableItems list
// // Dictionary<int, EquippableItemPrefarbAsset> itemsOfChestList = prefabAsset.content;
// //
// // string[] assetNames = AssetDatabase.FindAssets("t:EquippableItem", new[] { assetLocalization });
// //
// // foreach(KeyValuePair<int, EquippableItemPrefarbAsset> itemsOfChestEntry in itemsOfChestList)
// // {
// // // 3.1 find object
// // foreach (string SOName in assetNames)
// // {
// // var SOpath = AssetDatabase.GUIDToAssetPath(SOName);
// //
// // if(SOpath.Contains(itemsOfChestEntry.Value.prefarbAssetName + ".asset"))
// // {
// // // 3.2 set EquippableItem object
// // chest.GetComponent<ChestController>().SetupItemInChest(
// // itemsOfChestEntry.Key,
// // AssetDatabase.LoadAssetAtPath<EquippableItem>(SOpath)
// // );
// //
// // break;
// // }
// // }
// // }
//
//
//
//
// } else {
// Debug.LogError("Can't find global GUI object!!!");
// break;
// }
// }
// }
protected abstract void doBuild(GameObject _object);
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 49f6e0c5adf347168186d1d7bb1159f0
timeCreated: 1660404506

View File

@ -0,0 +1,14 @@
using System.Collections.Generic;
public interface SceneDataListManagerInterface<T>
{
public List<T> GetList();
public void SetList(List<T> _elements);
public void AddElementToList(T element);
public void RemoveElementFromList(T element);
// public void Build();
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7d524fbe014347b8b3c2ac74c24fb09a
timeCreated: 1660169011

View File

@ -0,0 +1,8 @@
using System.Collections.Generic;
public interface SceneDataLoaderInterface<T>
{
public List<T> LoadData(SceneElementTypeEnum type);
public bool SaveData(List<T> _elements, SceneElementTypeEnum type);
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bc92edf0fa5e4ee4ad55c5b2569c6b19
timeCreated: 1660169422

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: eccd248bafab41d4a1ad15de7767418f
timeCreated: 1660166968

View File

@ -0,0 +1,22 @@
using System.Collections.Generic;
using UnityEngine;
public interface ManagerInterface<T>
{
//public void SetPanelController(ref PanelController<T> dynamicPanelController);
public bool OpenPanel();
public bool ClosePanel();
public void SetupPanel();
public List<T> GetList();
public void SetList(List<T> list);
public void Add(T model);
public void UpdateList();
public void Remove();
/* public T Find();
*/
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0e59c6ba74b84b7a80f6380afd812c08
timeCreated: 1660464178

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb2f9c4cd51c9984f994a1a8d9580371
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public abstract class PanelController<T> : MonoBehaviour, PanelControllerInterface<T>
{
[Header("Panel Information")]
[SerializeField] protected GameObject _panelContent;
//[SerializeField] private TaskBox TaskBoxTemplate;
[SerializeField] protected GameObject ChildBoxTemplate;
[SerializeField] protected List<GameObject> ChildBoxList;
/// <summary>
/// Fetch reference to static instance of UiManager script
/// </summary>
private static UIBaseManager<T> _uiManager;
protected UIBaseManager<T> UiManager
{
get
{
if (_uiManager == null) { return FetchUiManager(); }
return null;
}
}
// TODO decide whick method use and where bind object with itself
// public abstract void Bind(ManagerInterfac<T>e manager);
protected abstract UIBaseManager<T> FetchUiManager();
public virtual void SetUp(List<T> elements)
{
BuildPanelSlots();
BuildPanelContent(elements);
}
public virtual void BuildPanelContent(List<T> elements)
{
if (_panelContent == null)
throw new Exception("Panel content is not attaches");
}
public abstract void BuildPanelSlots();
public abstract GameObject BuildSlot(int key, GameObject _parent);
public abstract void ClearSlots();
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b8a65f0b147a2e44e8f244301ff0de57
guid: a437cb891c09a1148a9748b9858dbaf6
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,36 @@
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public interface PanelControllerInterface<T>
{
/// <summary>
/// Function to build panel content
/// </summary>
/// <param name="Elements"></param>
public void SetUp(List<T> Elements);
/// <summary>
/// Function to build panels content template
/// </summary>
public void BuildPanelSlots();
/// <summary>
/// Function to create single slot inside panel
/// </summary>
/// <param name="key"></param>
/// <param name="_parent"></param>
/// <returns></returns>
public GameObject BuildSlot(int key, GameObject _parent);
/// <summary>
/// Function to fefill slotys with items
/// </summary>
/// <param name="Elements"></param>
public void BuildPanelContent(List<T> Elements);
/// <summary>
/// Function to restore slots config to default settings
/// </summary>
public void ClearSlots();
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 24fcf11bf60d7c14685586981559ae5f
guid: e30588d8235c90f4fa7a53b5afd92a42
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,173 @@
using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public abstract class UIBaseManager<T> : MonoBehaviour, ManagerInterface<T>
{
public static UIBaseManager<T> Instance { get; private set; }
[SerializeField] protected GameObject DynamicPanel;
[SerializeField] public KeyCode keyToOpen;
/// <summary>
/// Managed objects list - most important element in module
/// </summary>
[SerializeField] protected List<T> Elements = new List<T>(); // { get; set; } - this block inspector
public void Awake()
{
if (Instance == null)
{
Instance = this;
} else
{
Destroy(gameObject);
}
}
public void Update()
{
if (Input.GetKeyDown(keyToOpen))
{
if (!DynamicPanel)
{
this.OpenPanel();
}
else
{
this.ClosePanel();
}
}
}
/// <summary>
/// Function to fetch currently opened panel asociated with this UI manager
/// </summary>
/// <param name="panelConrtoller"></param>
public void SetPanelController(GameObject panelConrtoller)
{
// ToDo change fetched types
//DynamicPanel = dynamicPanelController;
}
public bool OpenPanel()
{
Console.WriteLine("Panel opened");
//try
//{
GameObject globalGUI = GameObject.FindGameObjectWithTag("GUI");
if(!globalGUI)
throw new Exception("Panel could not be opened - can't find global GUI object!!");
GameObject uiPanelTemplate = GetTemplatePanel();
//GameObject.Instantiate(muzzleFlashPrefab, transform.position, transform.rotation);
DynamicPanel = GameObject.Instantiate(uiPanelTemplate, uiPanelTemplate.transform.position, Quaternion.identity, globalGUI.transform); // 4'th arg allow set object as child
DynamicPanel.transform.localPosition = uiPanelTemplate.transform.position; // prevent overwritten position by... environment???
SetupPanel();
return true;
//} catch (Exception ex) { Debug.LogError(ex.Message); }
return false;
}
public bool ClosePanel()
{
Console.WriteLine("Panel closed");
try
{
Destroy(DynamicPanel);
return true;
} catch (Exception ex) { Debug.LogError(ex.Message); }
return true;
}
public virtual void SetupPanel()
{
if(!DynamicPanel)
throw new Exception("Panel not found - UIBaseManager don't have UI Panel instance!!");
// bind this class instance
//DynamicPanel.GetComponent<TaskPanelController>().Bind(this);
}
/// <summary>
/// Function which return panel status
/// True - if panel is opened and it's instance is handled
/// false - if panel is closed and it's instance is not handled
/// </summary>
/// <returns></returns>
public bool GetPanelStatus()
{
return DynamicPanel != null;
}
public List<T> GetList()
{
return Elements;
}
/// <summary>
/// Function to setting list of elements - invoked once at the beginning
/// Reset current content
/// </summary>
/// <param name="list"></param>
/// <exception cref="NotImplementedException"></exception>
public void SetList(List<T> list)
{
Elements = list;
if(DynamicPanel != null) // is null = is close - when we firstly init list content before open panel in SceneTaskDataManager file
UpdateList();
}
/// <summary>
/// Set of functions to synchronize local list with list from SystemManager
/// </summary>
public void Add(T model)
{
// throw new System.NotImplementedException();
Elements.Add(model);
UpdateList();
// add to local list
// and rebuild view - sync lists (this.UpdateList() ;) )
}
public abstract void UpdateList();
public void Remove()
{
UpdateList();
throw new System.NotImplementedException();
// remove from local list
// and rebuild view - sync lists (this.UpdateList() ;) )
}
/// <summary>
/// Function to find saved template of created panel instance
/// </summary>
/// <returns></returns>
protected abstract GameObject GetTemplatePanel();
/* public T Find(string itemName)
{
throw new NotImplementedException();
}*/
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d3ded2235c28485481afe6d8bf3a2220
timeCreated: 1660410923

View File

@ -0,0 +1,54 @@
using System.IO;
using UnityEngine;
public class PathBuilder
{
private static string Path;
private string STATIC_ELEMENT_LOCATION { get { return "/StaticElements/"; } }
private string DYNAMIC_ELEMENT_LOCATION { get { return "/DynamicElements/"; } }
public PathBuilder BuildSavePath()
{
Path = Application.persistentDataPath + "/";
return this;
}
public PathBuilder WithMap(string map = "")
{
Path += map;
return this;
}
public PathBuilder WithDataType(SceneElementTypeEnum elementTypeEnum)
{
switch (elementTypeEnum)
{
case SceneElementTypeEnum.None:
{
Path += "/";
break;
}
case SceneElementTypeEnum.Dynamic:
{
Path += "/DynamicElements/";
break;
}
case SceneElementTypeEnum.Static:
{
Path += "/StaticElements/";
break;
}
}
return this;
}
public string GetString()
{
return Path;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 16beabd146d6459faaf17008bf5bb1b1
timeCreated: 1663425229

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bfb65fa1b680494fbb3c5ce6f6fd5516
timeCreated: 1662817592

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
public abstract class SaveModelSystem<T>
{
public string Path { get; set; }
public string ObjectListName { get; set; }
public string ObjectFolderName { get; set; }
protected string GetFileName(string _fileName)
{
return _fileName + ".fun";
}
public virtual bool SaveModelItem(T model) { return true; }
public virtual bool SaveModelList(List<T> list) { return true; }
public virtual T LoadModelItem() { return (T)Activator.CreateInstance(typeof(T), new object[] { }); }
public virtual List<T> LoadModelList() { return new List<T>(); }
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 5d320552ecb945f4922f82637129f15e
timeCreated: 1662817611

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a6f64b428a1f40dc9a2dcd29ef9b97b6
timeCreated: 1663537361

View File

@ -0,0 +1,85 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
public class TaskPanelController : MonoBehaviour
{
[Header("Panel Information")]
[SerializeField] protected GameObject _panelContent;
//[SerializeField] private TaskBox TaskBoxTemplate;
[SerializeField] private GameObject TaskBoxTemplate;
[SerializeField] private List<GameObject> TaskBoxList;
/// <summary>
/// Fetch reference to static instance of UiManager script
/// </summary>
private static UIBaseManager<Task> _uiManager;
private UIBaseManager<Task> UiManager
{
get
{
if (_uiManager == null) { _uiManager = FetchUiManager(); }
return _uiManager;
}
}
// TODO decide whick method use and where bind object with itself
// public abstract void Bind(ManagerInterfac<T>e manager);
private UIBaseManager<Task> FetchUiManager() // check if need return by ref
{
var uiManager = GameObject.FindObjectOfType<TaskUIManager>();
// uiManager.SetPanelController(gameObject); - unnecessary
return uiManager;
}
public void InitPanelBoxes(List<Task> _tasks)
{
if (_panelContent == null)
throw new Exception("Panel content is not attaches");
for(int i = 0; i < _tasks.Count; i++)
{
this.AddTask(_tasks[i]);
}
}
protected GameObject SetupTaskBox(Task _task)
{
if (TaskBoxTemplate == null)
throw new Exception("taskbox_template is empty");
GameObject _newTaskBox = Instantiate(TaskBoxTemplate, _panelContent.transform.position, Quaternion.identity); //.GetComponent<TaskBox>();
_newTaskBox.transform.SetParent(_panelContent.transform);
_newTaskBox.transform.localScale = new Vector3(2.5f, 2.5f, 1.0f);
_newTaskBox.GetComponent<TaskBox>().SetTask(_task);
return _newTaskBox;
}
public void Setup(List<Task> _tasks)
{
this.InitPanelBoxes(_tasks);
}
public void AddTask(Task _task)
{
// update TaskManager main list of task
//TaskManager.Instance.AddTask(_task);
// add task to local panel contant
GameObject newTaskBox = SetupTaskBox(_task);
// Set new Slot instance
TaskBoxList.Add(newTaskBox);
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b8a6f254fe36462ca3d3e3d705026c56
timeCreated: 1664309406

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 65bb481e6538451cad604d5c3644043a
timeCreated: 1662328781

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class TaskUIManager : UIBaseManager<Task>
{
public const string ITEM_LOCALIZATION = "UiPanels/";
public const string PANEL_NAME = "TaskPanel";
public override void SetupPanel()
{
base.SetupPanel();
// setup models list
DynamicPanel.GetComponent<TaskPanelController>().SetUp(Elements);
}
public override void UpdateList()
{
DynamicPanel.GetComponent<TaskPanelController>().BuildPanelContent(Elements);
}
protected override GameObject GetTemplatePanel()
{
// Resources = default path - Asset/Resources ... .obj
return Resources.Load(ITEM_LOCALIZATION + PANEL_NAME) as GameObject;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a6684146805f4d85a427005443c221a6
timeCreated: 1662328793

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 88559027d691496b829a0591baa13dd3
timeCreated: 1662414082

View File

@ -0,0 +1,7 @@
public enum SceneElementTypeEnum
{
None,
Static,
Dynamic,
All
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 70d473eabf5147fe8163acb0dde82488
timeCreated: 1662414155

View File

@ -0,0 +1,8 @@
public enum TaskDifficultyEnum
{
Easy,
Normal,
Medium,
Hard,
Impossible
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d8816338338357349be1c84352410dde
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 65f7529d7a9a4ff2ad3aa7214a1eeab0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,19 +2,11 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum TaskHardship {
Easy,
Normal,
Classic,
Medium,
Hard,
Impossible
}
[System.Serializable]
public class Task
{
[SerializeField] public int id;
public int Id
{
get { return id; }
@ -22,6 +14,7 @@ public class Task
}
[SerializeField] public string title;
public string Title
{
get { return title; }
@ -29,24 +22,25 @@ public class Task
}
[SerializeField] public string description;
public string Description
{
get { return description; }
set { description = value; }
}
[SerializeField] public TaskHardship hardnessLevel;
[SerializeField] public TaskDifficultyEnum difficulty;
public Task(int _id)
{
id = _id;
}
public Task(int _id, string _title, string _description, TaskHardship _hardnessLevel)
public Task(int _id, string _title, string _description, TaskDifficultyEnum difficulty)
{
this.id = _id;
this.title = _title;
this.description = _description;
this.hardnessLevel = _hardnessLevel;
this.difficulty = difficulty;
}
}

View File

@ -14,13 +14,6 @@ public class TaskBox : MonoBehaviour
[SerializeField] public Task task;
public void Start()
{
}
public void Update()
{
RectTransform rt = gameObject.GetComponent<RectTransform>();

View File

@ -26,7 +26,9 @@ public class SaveController : MonoBehaviour
public void SaveQuests()
{
SceneTaskManager.Instance.SaveQuests();
SceneTaskDataManager.Instance.SaveStaticData();
// right now, we dont need to save dynamic list :D
}
public void SaveInventory()

View File

@ -1,92 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
public static class SaveQuestSystem
{
public static void SaveQuestItem(Task quest, string ElementFolderName)
{
BinaryFormatter formatter = new BinaryFormatter();
// todo: add in scene name folder
string path = SaveSystem.GetSavePath(ElementFolderName);
Debug.Log(path);
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
path += "/" + quest.title + ".fun";
FileStream stream = new FileStream(path, FileMode.Create);
formatter.Serialize(stream, quest);
stream.Close();
}
public static void SaveQuestsList(List<Task> questsList, string ElementName)
{
BinaryFormatter formatter = new BinaryFormatter();
// todo: add in scene name folder
string path = SaveSystem.GetSavePath();
Debug.Log("Saved Quest at " + path);
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
path += "/" + ElementName + ".fun";
FileStream stream = new FileStream(path, FileMode.Create);
formatter.Serialize(stream, questsList);
stream.Close();
}
private static void Save()
{
}
public static Task LoadQuestItem(string questTitle, string ElementFolderName)
{
string path = SaveSystem.GetSavePath(ElementFolderName) + "/" + questTitle;// + ".fun";
if(File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
Task quest = formatter.Deserialize(stream) as Task;
stream.Close();
return quest;
} else {
Debug.Log("Save file not found in " + path);
return null;
}
}
public static List<Task> LoadQuestsList(string ElementName)
{
string path = SaveSystem.GetSavePath() + "/" + ElementName + ".fun";
if(File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
List<Task> questsList = formatter.Deserialize(stream) as List<Task>;
stream.Close();
return questsList;
} else {
Debug.Log("Save file not found in " + path);
return null;
}
}
private static void Load()
{
}
}

View File

@ -1,135 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.SceneManagement;
using System.IO;
using System.Linq;
public class SceneTaskManager : MonoBehaviour
{
private const string DYNAMIC_ELEMENT = "/DynamicElements/";
private const string STATIC_ELEMENT = "/StaticElements/";
[SerializeField]
public List<Task> TaskElements;
public bool isNewGame = true;
public bool isContinued = false;
public string MapName;
public string ElementFolderName = "Quest";
public string ItemsListName = "QuestsList";
public static SceneTaskManager Instance;
public void Awake()
{
if(Instance == null)
{
this.MapName = SceneManager.GetActiveScene().name;
Instance = this;
}else if (Instance != this)
{
Destroy(gameObject);
}
}
public void Start()
{
LoadQuests(); // load user quests
BuildQuests(TaskElements); // pass them to TaskManager
}
///<summary>
/// Pass quest to taskManager after load data
///</summary>
public void BuildQuests(List<Task> questList)
{
// pass to taskManager singleton
foreach(Task quest in questList)
TaskManager.Instance.AddTask(quest);
}
public int AddQuest(GameObject dynamicObject)
{
Task quest = dynamicObject.GetComponent<TaskBox>().task;
this.TaskElements.Add(quest);
return this.TaskElements.Count - 1;
}
// NIE UŻYWANA !!!
// TODO - usuwane mają być elementy z listy tasków z Taskmanagera - pozbyć sie tej listy najepiej tu
// TA LISTA SŁUŻY TYLKO DO ODCZYTU Z PLIKÓW I PRZEKAZANIU WARTOŚCI DO MANAGERA - NIR DO KASOWANIA
public void RemoveQuest(string _title)
{
// 1. Fetch all matched quests - we search by title which shoudl be unique but who know :D
List<Task> questList = this.TaskElements.Where(quest => quest.title == _title).ToList();
// 2. Remove them
this.TaskElements.RemoveAll(quest => quest.title == _title);
}
///<summary>
/// Use TaskManaager list to save user quests - TaskManager.Instance.taskList
///</summary>
public void SaveQuests()
{
// Case I - if we remember all list
// 1) if after removed item form DynamicList is empty - remove all file
// 2) if after removed item form DynamciList there are another one - save updated list again
if(TaskManager.Instance.taskList.Count > 0) {
SaveQuestSystem.SaveQuestsList(TaskManager.Instance.taskList, this.ItemsListName);
} else {
string _path = SaveSystem.GetSavePath() + "/" + this.ItemsListName + ".fun";
try
{
Debug.Log("File to remove: " + _path);
if(File.Exists(_path))
{
File.Delete(_path);
}
}
catch (IOException ioExp)
{
Debug.LogError(ioExp.Message);
}
}
// Case II - if we rememenber object per file
// 1) remove specyfic file
//
// Unfortunatelly we don't use this way of saving items yet :D
}
///<summary>
/// Load quests to local list
/// Pass this to taskManager in outside method
///</summary>
public void LoadQuests()
{
string path = SaveSystem.GetSavePath();
if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load
return;
FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles();
foreach(FileInfo file in fileInfo)
{
if(file.Name != this.ItemsListName + ".fun")
continue;
List<Task> taskList = SaveQuestSystem.LoadQuestsList(this.ItemsListName);
foreach(Task task in taskList)
TaskElements.Add(task);
}
}
}

View File

@ -1,96 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class TaskManager : MonoBehaviour
{
public static TaskManager Instance;
[SerializeField] public GameObject _panel_template;
protected GameObject dynamicPanel;
public bool isOpen = false;
[Header("Tasks list")]
[SerializeField] public List<Task> taskList;
private void Awake()
{
if(Instance == null)
{
Instance = this;
}else if (Instance != this)
{
Destroy(gameObject);
}
}
public void Update()
{
if (Input.GetKeyDown(KeyCode.Q))
{
if (this._panel_template && !this.isOpen)
{
this.OpenPanel();
} else
{
this.ClosePanel();
}
}
}
/// <summary>
// Function which opne Task Panel if its close
//
// Create new Task Panel object instance on scene
/// </summary>
public void OpenPanel()
{
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
if(globalGUI)
{
this.dynamicPanel = Instantiate(_panel_template, _panel_template.transform.position, Quaternion.identity, globalGUI.transform); // 4'th arg allow set object as child
this.dynamicPanel.transform.localPosition = _panel_template.transform.position; // prevent overwritten position by... environment???
this.SetupPanel(); // bind pandel to current chest
isOpen = true;
} else {
Debug.Log("Can't find global GUI object!!!");
}
}
/// <summary>
// Function which close Task Panel if its open
/// </summary>
public virtual void ClosePanel()
{
Destroy(dynamicPanel);
isOpen = false;
}
/// <summary>
// Function which allow to add new task to manager list of tasks
//
// Task Panel use this list during setup process
/// </summary>
public void AddTask(Task _task)
{
taskList.Add(_task);
}
private void SetupPanel()
{
if(this.dynamicPanel)
{
this.dynamicPanel.GetComponent<TaskPanelController>().Setup(taskList);
}
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: cfdba4ab39859774dab558d713b06989
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,55 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
public class TaskPanelController : MonoBehaviour
{
[Header("Panel Information")]
[SerializeField] protected GameObject _panelContent;
[SerializeField] private TaskBox taskbox_template;
[SerializeField] private List<TaskBox> taskBox_list;
protected void InitPanelBoxes(List<Task> _tasks)
{
if(_panelContent)
{
for(int i = 0; i < _tasks.Count; i++)
{
this.AddTask(_tasks[i]);
}
}
}
protected TaskBox SetupTaskBox(Task _task)
{
TaskBox _newTaskBox = Instantiate(taskbox_template, _panelContent.transform.position, Quaternion.identity).GetComponent<TaskBox>();
_newTaskBox.transform.SetParent(_panelContent.transform);
_newTaskBox.transform.localScale = new Vector3(2.5f, 2.5f, 1.0f);
_newTaskBox.SetTask(_task);
return _newTaskBox;
}
public void Setup(List<Task> _tasks)
{
this.InitPanelBoxes(_tasks);
}
public void AddTask(Task _task)
{
// update TaskManager main list of task
//TaskManager.Instance.AddTask(_task);
// add task to local panel contant
TaskBox newTaskBox = SetupTaskBox(_task);
// Set new Slot instance
taskBox_list.Add(newTaskBox);
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9f07b313ccbd175489a00fcaf7521761
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: