Merge branch 'refactoring' into saving-module

This commit is contained in:
kabix09 2022-11-24 03:48:23 +01:00
commit ccbc5a2db0
285 changed files with 7378 additions and 3992 deletions

View File

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

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2
<<<<<<< HEAD
guid: 3ee6e7ceeba1b814cb5310e2f2eaf155
=======
guid: e985e9291cdf02245b272d4fafce4289
>>>>>>> refactoring
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 805898525}
- component: {fileID: 805898527}
- component: {fileID: 805898526}
- component: {fileID: 5462276123095309683}
m_Layer: 0
m_Name: Chest1-InteractionMSG
m_TagString: Untagged
@ -28,6 +29,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.095890045, y: -0.058502197, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4669568061092186073}
m_RootOrder: 0
@ -70,6 +72,18 @@ MonoBehaviour:
_tmpPanelAbove: {fileID: 0}
obj: {fileID: 4669568061092186072}
isAllowedToShowPanels: 1
--- !u!114 &5462276123095309683
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 805898524}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a532f2b712a01fc4fad02346f1a69e39, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &4669568061092186072
GameObject:
m_ObjectHideFlags: 0
@ -81,7 +95,6 @@ GameObject:
- component: {fileID: 4669568061092186073}
- component: {fileID: 4669568061092186078}
- component: {fileID: 4669568061092186079}
- component: {fileID: 4669568061092186076}
m_Layer: 0
m_Name: Gold Chest
m_TagString: Untagged
@ -99,6 +112,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 58.59589, y: 32.941498, z: 20}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 805898525}
m_Father: {fileID: 0}
@ -115,6 +129,7 @@ SpriteRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
@ -166,7 +181,7 @@ BoxCollider2D:
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByEffector: 1
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
@ -181,19 +196,3 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 0.95, y: 0.9}
m_EdgeRadius: 0
--- !u!114 &4669568061092186076
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4669568061092186072}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name:
m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0}
developerList: []

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 584661738}
- component: {fileID: 584661740}
- component: {fileID: 584661739}
- component: {fileID: 6369310084342855511}
m_Layer: 0
m_Name: Chest0-InteractionMSG
m_TagString: Untagged
@ -28,6 +29,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.19999695, z: -1.8041458}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5754902894522036728}
m_RootOrder: 0
@ -70,6 +72,18 @@ MonoBehaviour:
_tmpPanelAbove: {fileID: 0}
obj: {fileID: 5754902894522036729}
isAllowedToShowPanels: 1
--- !u!114 &6369310084342855511
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 584661737}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a532f2b712a01fc4fad02346f1a69e39, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5754902894522036729
GameObject:
m_ObjectHideFlags: 0
@ -81,7 +95,6 @@ GameObject:
- component: {fileID: 5754902894522036728}
- component: {fileID: 5754902894522036731}
- component: {fileID: 5754902894522036730}
- component: {fileID: 5754902894522036733}
m_Layer: 0
m_Name: Prize Chest
m_TagString: Untagged
@ -99,6 +112,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 16, y: 51.2, z: 18.195854}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 584661738}
m_Father: {fileID: 0}
@ -115,6 +129,7 @@ SpriteRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
@ -181,19 +196,3 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 1.35, y: 1.1}
m_EdgeRadius: 0
--- !u!114 &5754902894522036733
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5754902894522036729}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name:
m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0}
developerList: []

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 1698721847}
- component: {fileID: 1698721849}
- component: {fileID: 1698721848}
- component: {fileID: 3574830714698708195}
m_Layer: 0
m_Name: Chest3-InteractionMSG
m_TagString: Untagged
@ -28,6 +29,7 @@ Transform:
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: 3972494989842158580}
m_RootOrder: 0
@ -70,6 +72,18 @@ MonoBehaviour:
_tmpPanelAbove: {fileID: 0}
obj: {fileID: 3972494989842158579}
isAllowedToShowPanels: 1
--- !u!114 &3574830714698708195
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1698721846}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a532f2b712a01fc4fad02346f1a69e39, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &3972494989842158579
GameObject:
m_ObjectHideFlags: 0
@ -82,7 +96,6 @@ GameObject:
- component: {fileID: 3972494989842158473}
- component: {fileID: 3972494989842158583}
- component: {fileID: 3972494989842158582}
- component: {fileID: 3972494989842158581}
m_Layer: 0
m_Name: Wooden Chest
m_TagString: Untagged
@ -100,6 +113,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -8.45, y: -3.9, z: 10}
m_LocalScale: {x: 0.5, y: 0.5, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1698721847}
m_Father: {fileID: 0}
@ -116,6 +130,7 @@ SpriteRenderer:
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
@ -208,19 +223,3 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 0.95, y: 1.5900776}
m_EdgeRadius: 0
--- !u!114 &3972494989842158581
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3972494989842158579}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name:
m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0}
developerList: []

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b0e1c4df7cd61824384676c2e7fb2991
guid: a592c74dcbbaafa4a82cc20d574cb331
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -9,18 +9,18 @@ MonoBehaviour:
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 943bb4b7c1123c44fb1cbc048a56a954, type: 3}
m_Name: Lumberjac Axe
m_Script: {fileID: 11500000, guid: a0c176e87b3c91641897c23dc27e92a0, type: 3}
m_Name: Axe
m_EditorClassIdentifier:
id: 0
name: Lumberjac Axe
description: Lumberjack's Axe
id: 2
name: Axe
description: Lumberjack axe
level: 1
image: {fileID: 21300000, guid: d7a7292796eda0941a6a863b7d66bbcb, type: 3}
itemModel: {fileID: 1826809974269949497, guid: 83fa1f81238efb541bd77405dcf33dd1, type: 3}
StrengthBonus: 0
StrengthBonus: 1
AgilityBonus: 0
InteligenceBonus: 0
InteligenceBonus: 5
VitalityBonus: 0
isStackable: 0
EquipmentType: 4
EquipmentType: 5

View File

@ -9,18 +9,12 @@ MonoBehaviour:
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 943bb4b7c1123c44fb1cbc048a56a954, type: 3}
m_Script: {fileID: 11500000, guid: 1c6df47a2440e8a49bef89083164fdc1, type: 3}
m_Name: Gold Ore
m_EditorClassIdentifier:
id: 0
id: 1
name: Gold Ore
description:
level: 0
level: 1
image: {fileID: 21300000, guid: 83bbd515e788cbd4090c1c6649b76a29, type: 3}
itemModel: {fileID: 6960265943931164901, guid: 7aaf1038c5485164ea90044b40c5baa1, type: 3}
StrengthBonus: 0
AgilityBonus: 0
InteligenceBonus: 0
VitalityBonus: 0
isStackable: 0
EquipmentType: 9

View File

@ -9,12 +9,12 @@ MonoBehaviour:
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 943bb4b7c1123c44fb1cbc048a56a954, type: 3}
m_Script: {fileID: 11500000, guid: a0c176e87b3c91641897c23dc27e92a0, type: 3}
m_Name: Pickaxe
m_EditorClassIdentifier:
id: 0
name: pickaxe_test
description: Example pickaxe
name: Pickaxe
description:
level: 1
image: {fileID: 8959118705387878318, guid: 25e473b59d2d7534e803be0a2825e0f7, type: 3}
itemModel: {fileID: 9081071845930167562, guid: 0bccd32818043074d9785f6d90ebdcb3, type: 3}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5e5b0dc687e02e447a5d3464cc5d7a9d
guid: 3ad66b979f0b5444cbeccf9751f4863f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -29,8 +29,8 @@ RectTransform:
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: 5331092056807707113}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5331092055037629063}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -101,9 +101,9 @@ GameObject:
- component: {fileID: 5331092055018478732}
- component: {fileID: 5331092055018478730}
- component: {fileID: 5331092055018478731}
- component: {fileID: 4617582679355695156}
- component: {fileID: 2117488037472856852}
m_Layer: 5
m_Name: chest_panel
m_Name: ChestPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -119,10 +119,12 @@ RectTransform:
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: 5331092055896533710}
- {fileID: 5331092055037629063}
- {fileID: 5331092055143140113}
- {fileID: 5331092056807707113}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -169,7 +171,7 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4617582679355695156
--- !u!114 &2117488037472856852
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -178,15 +180,12 @@ MonoBehaviour:
m_GameObject: {fileID: 5331092055018478733}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8d9e1061a8038f54a87269aa0bd2db04, type: 3}
m_Script: {fileID: 11500000, guid: 84da00f00bb500c46b1e5629ca4a61b8, type: 3}
m_Name:
m_EditorClassIdentifier:
_panel: {fileID: 5331092056807707114}
_blankSlot: {fileID: 3818338910890019850, guid: e2f95cfb3084e6e4f9f16c14170adfb5, type: 3}
_panelCloseButton: {fileID: 5331092055143140112}
_tmp: {fileID: 0}
_itemTemplate: {fileID: 6570396142606985298, guid: 1304511dd1dfefc449e87c3d904ab15f, type: 3}
chest: {fileID: 0}
_panelContent: {fileID: 5331092056807707114}
ChildBoxTemplate: {fileID: 3818338910890019850, guid: e2f95cfb3084e6e4f9f16c14170adfb5, type: 3}
ChildBoxList: []
--- !u!1 &5331092055037629064
GameObject:
m_ObjectHideFlags: 0
@ -216,6 +215,7 @@ RectTransform:
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: 5331092054895676294}
m_Father: {fileID: 5331092055018478732}
@ -323,6 +323,7 @@ RectTransform:
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: 5331092055018478732}
m_RootOrder: 2
@ -442,6 +443,7 @@ RectTransform:
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: 5331092055896533710}
m_RootOrder: 0
@ -576,6 +578,7 @@ RectTransform:
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: 5331092055455069025}
m_Father: {fileID: 5331092055018478732}
@ -652,13 +655,14 @@ RectTransform:
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: 5331092054895676294}
m_RootOrder: 0
m_Father: {fileID: 5331092055018478732}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000024795532}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &5331092056807707111

View File

@ -150,7 +150,7 @@ GameObject:
- component: {fileID: 7379342322136183382}
- component: {fileID: 8625463808668959803}
m_Layer: 5
m_Name: chest_slot
m_Name: ChestSlot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -150,7 +150,7 @@ GameObject:
- component: {fileID: 102800839174329912}
- component: {fileID: 2957687053509197962}
m_Layer: 5
m_Name: equipment_slot
m_Name: EquipmentBox
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

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

View File

@ -225,7 +225,7 @@ GameObject:
- component: {fileID: 7550267750876868091}
- component: {fileID: 6531490600091353741}
m_Layer: 5
m_Name: inventory_slot
m_Name: InventoryBox
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -28,6 +28,7 @@ RectTransform:
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: 9124304228607424520}
m_RootOrder: 0
@ -134,126 +135,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &9124304227312933332
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304227312933335}
- component: {fileID: 9124304227312933320}
- component: {fileID: 9124304227312933321}
- component: {fileID: 9124304227312933334}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9124304227312933335
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227312933332}
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: 9124304227729624650}
m_RootOrder: 2
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: 232.6, y: 404.2}
m_SizeDelta: {x: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9124304227312933320
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227312933332}
m_CullTransparentMesh: 1
--- !u!114 &9124304227312933321
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227312933332}
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: 11277a3f23988ec47908362d708edaa8, 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 &9124304227312933334
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227312933332}
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: 9124304227312933321}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &9124304227602340161
GameObject:
m_ObjectHideFlags: 0
@ -283,6 +164,7 @@ RectTransform:
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: 9124304227903849263}
m_Father: {fileID: 9124304227744546881}
@ -355,9 +237,9 @@ GameObject:
- component: {fileID: 9124304227729624650}
- component: {fileID: 9124304227729624652}
- component: {fileID: 9124304227729624653}
- component: {fileID: 4753590907807807515}
- component: {fileID: 7107743575243314760}
m_Layer: 5
m_Name: inventory_panel
m_Name: InventoryPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -373,10 +255,10 @@ RectTransform:
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: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 9124304228607424520}
- {fileID: 9124304227744546881}
- {fileID: 9124304227312933335}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -423,7 +305,7 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &4753590907807807515
--- !u!114 &7107743575243314760
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -432,16 +314,12 @@ MonoBehaviour:
m_GameObject: {fileID: 9124304227729624651}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0bff20d6fb721a449df16891030739a, type: 3}
m_Script: {fileID: 11500000, guid: b3ae9277a19e5dc49aa607d1d2ec2dc9, type: 3}
m_Name:
m_EditorClassIdentifier:
_panel: {fileID: 9124304227903849260}
_blankSlot: {fileID: 4202482119828722599, guid: 843626bb28e804c4384ea070e0fead67, type: 3}
_panelCloseButton: {fileID: 9124304227312933334}
_instance: {fileID: 0}
_itemTemplate: {fileID: 6570396142606985298, guid: 1304511dd1dfefc449e87c3d904ab15f, type: 3}
_tmp: {fileID: 0}
MAX_SLOT_CUNT: 48
_panelContent: {fileID: 9124304227903849260}
ChildBoxTemplate: {fileID: 4202482119828722599, guid: 843626bb28e804c4384ea070e0fead67, type: 3}
ChildBoxList: []
--- !u!1 &9124304227744546894
GameObject:
m_ObjectHideFlags: 0
@ -471,6 +349,7 @@ RectTransform:
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: 9124304227602340160}
m_Father: {fileID: 9124304227729624650}
@ -577,6 +456,7 @@ RectTransform:
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: 9124304227602340160}
m_RootOrder: 0
@ -652,6 +532,7 @@ RectTransform:
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: 9124304227092242855}
m_Father: {fileID: 9124304227729624650}

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: 169130841095946002}
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 &169130841095946002
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}
ChildBoxTemplate: {fileID: 3337243677719157076, guid: 1cd878accdd121744a3a4829d9bc910f, type: 3}
ChildBoxList: []
--- !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

@ -1,165 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using GUI_Scripts;
using UnityEngine;
public class ChestController : BaseWarehouseController
{
[SerializeField] public GameObject chest;
[SerializeField] public List<Item> developerList = new List<Item>(); // FOR DEVELOPER TESTE - remove later !!!
private Animator m_Animator;
bool isTrigerred = false;
// Start is called before the first frame update
void Start()
{
m_Animator = gameObject.GetComponent<Animator>();
chest = gameObject; // set object on current GameObject
// FOR DEVELOPER TESTE - remove later !!!
for(int i = 0; i < developerList.Count; i++)
{
SetItemOnPosition(i, developerList[i]);
}
}
private bool beingHandled = false;
private static bool Opening;
private static bool Closing;
private IEnumerator OpenChestWithAnimation()
{
beingHandled = true;
// process pre-yield
m_Animator.SetTrigger("OpenIt");
yield return new WaitForSeconds( 0.4f );
this.OpenPanel();
InventoryManager.Instance.OpenPanel();
EquipmentManager.Instance.OpenPanel();
m_Animator.ResetTrigger("OpenIt");
// process post-yield
beingHandled = false;
}
// Update is called once per frame
void Update()
{
if (this._panel && this.isTrigerred && !this.isOpen) // we can open chest only when its closed
{
if (Input.GetKeyDown(KeyCode.E) && !beingHandled)
{
StartCoroutine(OpenChestWithAnimation());
}
}
if (!InventoryManager.Instance.isOpen)
{
if (Input.GetKeyDown(KeyCode.I))
{
InventoryManager.Instance.OpenPanel();
EquipmentManager.Instance.OpenPanel();
}
}
}
void OnTriggerExit2D(Collider2D collision)
{
if (this._panel != null)
{
this.ClosePanel();
}
this.isTrigerred = false;
}
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.tag == "Player")
{
this.isTrigerred = true;
}
}
public override void ClosePanel()
{
base.ClosePanel();
InventoryManager.Instance.ClosePanel();
EquipmentManager.Instance.ClosePanel();
if (!beingHandled)
{
StartCoroutine(CloseChestWithAnimation());
}
ReactivateAnimation();
}
public void CloseChestWithAnimationForOtherPanels()
{
if (!beingHandled)
{
StartCoroutine(CloseChestWithAnimation());
}
ReactivateAnimation();
}
private IEnumerator CloseChestWithAnimation()
{
beingHandled = true;
// process pre-yield
yield return new WaitForSeconds( 0.2f );
m_Animator.SetTrigger("CloseIt");
yield return new WaitForSeconds( 0.1f );
m_Animator.ResetTrigger("CloseIt");
// process post-yield
beingHandled = false;
}
private void ReactivateAnimation()
{
m_Animator.SetTrigger("reactivate");
}
protected override void SetupPanel()
{
if(this.dynamicPanel)
{
this.dynamicPanel.GetComponent<ChestPanelController>().Setup(gameObject, _items);
}
}
// WARNING
// DANGER - functon override position which may be not free
///<summary>
/// Function for placed item in inventory on SPECYFIC position
/// Used by SceneInventoryManager for load saved items on their positions
///</summary>
// WHAT WITH FUNCTION - setupItemOnPosition() - ???
public void SetupItemInChest(int key, EquippableItem pickable)
{
this._items[key] = pickable;
}
public override void SetItemOnPosition(int _keyPosition, Item _item)
{
// Drag setup first end second object on the same panel - should only one - this wwere dropped item
// Becouse of this source slot from other panel is settuping in dropped panel too - list get empty item and it cause errors
if(_item != null)
{
this._items[_keyPosition] = _item;
Debug.Log("Put item on chest"+_item.name);
// Inform Map Chests manager about update - update list to be compliant with the local list
SceneChestManager.Instance.AddItemToChest(gameObject.name, _keyPosition, (EquippableItem)_item);
}
// if we assign null its removed later in EndDrag method
}
public override void RemoveItemFromPosition(int _keyPosition)
{
base.RemoveItemFromPosition(_keyPosition);
Debug.Log("Pick up item from chest");
// Inform Map Chests manager about update - update list to be compliant with the local list
SceneChestManager.Instance.RemoveItemFromChest(gameObject.name, _keyPosition);
}
}

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 ChestPanelController : BasePanelController
{
public override void CloseOnClick()
{
Destroy(gameObject); // destroy panel
if(_instance)
{
_instance.GetComponent<ChestController>().ClosePanel();
}
}
public void Setup(GameObject _chest, Dictionary<int, Item> _chestItems)
{
_instance = _chest;
base.Setup(_chestItems);
}
protected override ISlot SetupSlot(int key, GameObject _parent)
{
ChestSlot _tmpSlot = Instantiate(_blankSlot, _parent.transform.position, Quaternion.identity).GetComponent<ChestSlot>();
_tmpSlot.transform.SetParent(_parent.transform);
_tmpSlot.SetupSlot(key, null, this);
return _tmpSlot;
}
// Islot - > Aslot
// - > B slots
// Ipanel -> Apanel
// -> B panel
// ---------------------------
// will work differently depending if its chest, inventory or equipment panel
// public void Equip(EquippableItem item)
// {
// if(RemoveItem(item))
// {
// EquippableItem previousItem;
// }
// }
}

View File

@ -39,6 +39,12 @@ public class DoorBehaviour : MonoBehaviour
SaveController.GetComponent<SaveController>().SaveQuests();
SaveController.GetComponent<SaveController>().SaveInventory();
SaveController.GetComponent<SaveController>().SaveHealth();
// 1. Save all befor change scene
// SaveController.GetComponent<SaveController>().SaveItems();
SaveController.GetComponent<SaveController>().SaveQuests();
// SaveController.GetComponent<SaveController>().SaveInventory();
// 2. Change scene
SceneManager.LoadScene(gateway.nextMapName);
}

View File

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

View File

@ -1,269 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class EquipmentManager : BaseWarehouseController
{
public static int MAX_ITEMS = 0;
[SerializeField] public EquippableItem _helmet;
[SerializeField] public EquippableItem _chest;
[SerializeField] public EquippableItem _boots;
[SerializeField] public EquippableItem _weapon;
[SerializeField] public EquippableItem _potion_one;
[SerializeField] public EquippableItem _potion_two;
[SerializeField] public EquippableItem _potion_three;
[SerializeField] public EquippableItem _potion_four;
[SerializeField] public EquippableItem _potion_five;
public static EquipmentManager Instance;
Dictionary<int, Item> equipment;
private void Awake()
{
if(Instance == null)
{
Instance = this;
equipment = new Dictionary<int, Item>() {
{ 0, _helmet },
{ 1, _chest },
{ 2, _boots },
{ 3, _weapon },
{ 4, _potion_one },
{ 5, _potion_two },
{ 6, _potion_three },
{ 7, _potion_four },
{ 8, _potion_five }
};
}else if (Instance != this)
{
Destroy(gameObject);
}
}
protected override void SetupPanel()
{
if(this.dynamicPanel)
{
this.dynamicPanel.GetComponent<EquipmentPanelController>().Setup(gameObject, equipment);
}
}
// Handle in Manager items local list
public override void SetItemOnPosition(int _keyPosition, Item _item)
{
// in qeuippment panel its case where we drop drop on empty slot
if(_item == null) // if we move eg. form chest to eq Drop work on Eq Panel where dropitemSlot.Item is Null
return;
_keyPosition = MapItemTypeToSlotNumber((EquippableItem)_item);
this.equipment[_keyPosition] = _item;
this.ApplyEquipmentObject(true, (EquippableItem)_item);
base.SetItemOnPosition(_keyPosition, _item);
}
// Remove from Manager items local list
public override void RemoveItemFromPosition(int _keyPosition)
{
this.equipment.Remove(_keyPosition);
this.ApplyEquipmentObject(_keyPosition);
base.RemoveItemFromPosition(_keyPosition);
}
/*
* Function decide in which slot item should be handled
* Mach item to dictionary key based on items equippment type
* return: dictionary key
*/
private int MapItemTypeToSlotNumber(EquippableItem _item)
{
int key=-1;
if(_item == null)
{
Debug.LogError("Ten item w ogóle nie powinien być rozpatrywany jako dodany do ekwipunku - nigdy nie był typu EquippableItem");
}
switch(_item.EquipmentType)
{
case EquipmentType.Helmet:
{
key = 0;
break;
}
case EquipmentType.Chest:
{
key = 1;
break;
}
case EquipmentType.Boots:
{
key = 2;
break;
}
case EquipmentType.Weapon:
{
key = 3;
break;
}
case EquipmentType.Potion:
{
key = 4;
break;
}
case EquipmentType.Bracelet:
{
key = 5;
break;
}
case EquipmentType.Necklet:
{
key = 6;
break;
}
case EquipmentType.Ring:
{
if(!equipment.ContainsKey(7) || equipment[7] == null)
{
key = 7;
}
if(!equipment.ContainsKey(8) || equipment[8] == null)
{
key = 8;
}
break;
}
default:
{
Debug.Log("Can't mach number to item type");
break;
}
}
return key;
}
/*
* applu EquippableItem to be able to see actual equipment status - mapped with 'qeuipment' Dictioanry which is not showed in amnager panel :/
*/
public void ApplyEquipmentObject(bool put, EquippableItem _item = null)
{
switch(_item.EquipmentType)
{
case EquipmentType.Helmet:
{
_helmet = put ? _item : null;
break;
}
case EquipmentType.Chest:
{
_chest = put ? _item : null;
break;
}
case EquipmentType.Boots:
{
_boots = put ? _item : null;
break;
}
case EquipmentType.Weapon:
{
_weapon = put ? _item : null;
break;
}
case EquipmentType.Potion:
{
_potion_one = put ? _item : null;
break;
}
case EquipmentType.Bracelet:
{
_potion_two = put ? _item : null;
break;
}
case EquipmentType.Necklet:
{
_potion_three = put ? _item : null;
break;
}
case EquipmentType.Ring:
{
if(!equipment.ContainsKey(7) || equipment[7] == null)
{
_potion_four = put ? _item : null;
}
if(!equipment.ContainsKey(8) || equipment[8] == null)
{
_potion_five = put ? _item : null;
}
break;
}
default:
{
Debug.Log("Can't mach number to item type");
break;
}
}
}
public void ApplyEquipmentObject(int _keyPosition)
{
switch(_keyPosition)
{
case 0:
{
_helmet = null;
break;
}
case 1:
{
_chest = null;
break;
}
case 2:
{
_boots = null;
break;
}
case 3:
{
_weapon = null;
break;
}
case 4:
{
_potion_one = null;
break;
}
case 5:
{
_potion_two = null;
break;
}
case 6:
{
_potion_three = null;
break;
}
case 7:
{
_potion_four = null;
break;
}
case 9:
{
_potion_five = null;
break;
}
}
}
}

View File

@ -1,82 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EquipmentPanelController : BasePanelController
{
[Header("Slots List")]
[SerializeField] public const int MAX_SLOT_CUNT = 0;
[SerializeField] public EquipmentSlot _helmet;
[SerializeField] public EquipmentSlot _chest;
[SerializeField] public EquipmentSlot _boots;
[SerializeField] public EquipmentSlot _weapon;
[SerializeField] public EquipmentSlot _potion_one;
[SerializeField] public EquipmentSlot _potion_two;
[SerializeField] public EquipmentSlot _potion_three;
[SerializeField] public EquipmentSlot _potion_four;
[SerializeField] public EquipmentSlot _potion_five;
Dictionary<int, EquipmentSlot> equipment;
// overrwrite this metoh in in parent beacuse we dont have to init any slots
void Awake()
{
base.MAX_SLOT_CUNT = 9;
equipment = new Dictionary<int, EquipmentSlot>() {
{ 0, _helmet },
{ 1, _chest },
{ 2, _boots },
{ 3, _weapon },
{ 4, _potion_one },
{ 5, _potion_two },
{ 6, _potion_three },
{ 7, _potion_four },
{ 8, _potion_five }
};
base.Awake();
}
void Update()
{
if(Input.GetKeyDown("i"))
{
if (_instance)
{
_instance.GetComponent<EquipmentManager>().ClosePanel();
Destroy(gameObject); // destroy panel
}
}
}
public override void CloseOnClick()
{
Destroy(gameObject); // destroy panel
GameObject panel = FindObjectOfType<ChestPanelController>()?.gameObject;
if(panel != null) Destroy(panel);
FindObjectOfType<InventoryManager>()?.ClosePanel();
if(_instance)
{
_instance.GetComponent<EquipmentManager>().ClosePanel();
}
}
public void Setup(GameObject _equipment, Dictionary<int, Item> _equipmentItems)
{
_instance = _equipment;
base.Setup(_equipmentItems);
}
protected override ISlot SetupSlot(int key, GameObject _parent)
{
ISlot tmp = equipment[key];
tmp.SetupSlot(key, null, this);
return tmp;
}
}

View File

@ -1,76 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class InventoryManager : BaseWarehouseController
{
public static int MAX_ITEMS = 5;
public static InventoryManager Instance;
// temporary delegate dragged item to outside static object instance to remember it
[Space]
[SerializeField]
protected ISlot _draggedSlot;
public ISlot DraggedSlot
{
get { return _draggedSlot; }
set
{
_draggedSlot = value;
}
}
private void Awake()
{
if(Instance == null)
{
Instance = this;
}else if (Instance != this)
{
Destroy(gameObject);
}
}
public int AddToInventory(EquippableItem pickable)
{
if(this._items.Count <= MAX_ITEMS)
{
for(int slotNumber=0; slotNumber<MAX_ITEMS; slotNumber++)
{
if(!this._items.ContainsKey(slotNumber))
{
this._items[slotNumber] = pickable;
return slotNumber;
}
}
}
return -1;
}
///<summary>
/// Function for placed item in inventory on SPECYFIC position
/// Used by SceneInventoryManager for load saved items on their positions
///</summary>
public void SetupItemInInventory(int key, EquippableItem pickable)
{
this._items[key] = pickable;
}
protected override void SetupPanel()
{
if(this.dynamicPanel)
{
this.dynamicPanel.GetComponent<InventoryPanelController>().Setup(gameObject, _items);
}
}
// public void DropItem()
// {
// }
}

View File

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

View File

@ -1,80 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
public class InventoryPanelController : BasePanelController
{
public override void CloseOnClick()
{
Destroy(gameObject); // destroy panel
GameObject panel = FindObjectOfType<ChestPanelController>()?.gameObject;
if(panel != null) Destroy(panel);
GameObject.FindObjectOfType<EquipmentManager>()?.ClosePanel();
InventoryManager.Instance.GetComponent<InventoryManager>().ClosePanel();
}
public void Setup(GameObject _inventory, Dictionary<int, Item> _items)
{
_instance = _inventory;
base.Setup(_items);
}
void Update()
{
if (Input.GetKeyDown("i"))
{
Destroy(gameObject); // destroy panel
InventoryManager.Instance.GetComponent<InventoryManager>().ClosePanel();
}
}
protected override ISlot SetupSlot(int key, GameObject _parent)
{
InventorySlot _tmpSlot = Instantiate(_blankSlot, _parent.transform.position, Quaternion.identity).GetComponent<InventorySlot>();
_tmpSlot.transform.SetParent(_parent.transform);
_tmpSlot.SetupSlot(key, null, this);
return _tmpSlot;
}
// public void Drop(ItemSlot<InventoryPanelController> dropItemSlot)
// {
// if(dropItemSlot.CanReceiveItem(draggedSlot.Item) && draggedSlot.CanReceiveItem(dropItemSlot.Item))
// {
// EquippableItem dragItem = draggedSlot.Item as EquippableItem;
// EquippableItem dropItem = dropItemSlot.Item as EquippableItem;
// // for changing chest to evuuipment or onventory panel !!!!
// if(draggedSlot is EquipmentSlot)
// {
// if(dragItem != null) dragItem.Unequip(this);
// if(dropItem != null) dropItem.Equip(this);
// }
// if(dropItemSlot is EquipmentSlot)
// {
// if(dragItem != null) dragItem.Equip(this);
// if(dropItem != null) dropItem.Unequip(this);
// }
// Item draggedItem = draggedSlot.Item; // remember temporary currently dragged item
// draggedSlot.Item = dropItemSlot.Item;
// dropItemSlot.Item = draggedItem;
// // update items position in chest slots
// // - after close paned - items dont reset its positions
// _inventory.GetComponent<InventoryManager>().SetItemOnPosition(draggedSlot.Number, draggedSlot.Item);
// _inventory.GetComponent<InventoryManager>().SetItemOnPosition(dropItemSlot.Number, dropItemSlot.Item);
// }
// }
}

View File

@ -1,41 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum EquipmentType
{
Helmet,
Chest,
Gloves,
Boots,
Weapon,
Potion,
Bracelet,
Necklet,
Ring,
Other
}
[CreateAssetMenu]
[System.Serializable]
public class EquippableItem : Item
{
public int StrengthBonus;
public int AgilityBonus;
public int InteligenceBonus;
public int VitalityBonus;
[Space]
public bool isStackable = false;
[Space]
public EquipmentType EquipmentType;
public EquippableItem(){}
public EquippableItem(Item _item) : base(_item){}
public EquippableItem(string _name, string _description, int _level, GameObject _itemModel, Sprite _image) : base(_name, _description, _level, _itemModel, _image)
{
}
}

View File

@ -39,8 +39,9 @@ public class PickableController : MonoBehaviour
{
if (Input.GetKeyDown(KeyCode.E))
{
if(InventoryManager.Instance.AddToInventory(this.item) >= 0)
if(!InventoryUIManager.Instance.IsFull())
{
InventoryUIManager.Instance.Add(this.item);
isPicked = 1;
//PlayerPrefs.SetInt(name, isPicked);
//gameObject.SetActive(false);
@ -52,12 +53,11 @@ public class PickableController : MonoBehaviour
{
Debug.LogError("Can't pick item - Your inventory is full");
}
}
}
}
private void OnTriggerEnter2D(Collider2D collision)
private void OnTrigerEnter2D(Collider2D collision)
{
if (collision.tag == "Player")
{

View File

@ -152,7 +152,7 @@ public class NPCDialogue : MonoBehaviour
}
if (isQuest == 2)
{
var questItem = InventoryManager.Instance.FindItemInWarehouse(requiredItem);
var questItem = InventoryUIManager.Instance.FindItemInWarehouseByName(requiredItem);
if(!questItem.Equals(new KeyValuePair<int, Item>()))
{
FinishQuestPanel.SetActive(true);
@ -243,7 +243,7 @@ public class NPCDialogue : MonoBehaviour
{
if (sentences.Count == 0)
{
var questItem = InventoryManager.Instance.FindItemInWarehouse(requiredItem);
var questItem = InventoryUIManager.Instance.FindItemInWarehouseByName(requiredItem);
if(!questItem.Equals(new KeyValuePair<int, Item>()))
{
FinishQuestPanel.SetActive(true);
@ -310,7 +310,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();
@ -322,9 +322,9 @@ public class NPCDialogue : MonoBehaviour
public void FinishQuest()
{
// 1. Take item from palyer
var questItem = InventoryManager.Instance.FindItemInWarehouse(requiredItem);
var questItem = InventoryUIManager.Instance.FindItemInWarehouseByName(requiredItem);
InventoryManager.Instance.RemoveItemFromPosition(questItem.Key);
InventoryUIManager.Instance.RemoveByPosition(questItem[0].Key);
// 2. Set as finished
isQuest = 3;

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

@ -176,14 +176,14 @@ public class Player : MonoBehaviour
{
if (canWalk == true)
{
if (!EquipmentManager.Instance._weapon)
if (!EquipmentUIManager.Instance.GetList().Select(el => el.Key == (int)EquipmentPanelSlotsTypeEnum.WeaponSlot).First())
return;
if (EquipmentManager.Instance._weapon.Name.Equals("pickaxe_test") && attackSword)
if (EquipmentUIManager.Instance.GetList().Where(el => el.Key == (int)EquipmentPanelSlotsTypeEnum.WeaponSlot).First().Value.Name.Equals("pickaxe_test") && attackSword)
{
myAnimator.SetTrigger("pickaxe");
}
else if (attackSword && EquipmentManager.Instance._weapon.Name.Equals("Basic_Sword"))
else if (attackSword && EquipmentUIManager.Instance.GetList().Where(el => el.Key == (int)EquipmentPanelSlotsTypeEnum.WeaponSlot).First().Value.Name.Equals("Basic_Sword"))
{
myAnimator.SetTrigger("attack");
}
@ -356,16 +356,16 @@ public class Player : MonoBehaviour
public void ManageStrength()
{
if (!EquipmentManager.Instance._weapon)
if (!EquipmentUIManager.Instance.GetList().Where(el => el.Key == (int)EquipmentPanelSlotsTypeEnum.WeaponSlot).First().Value)
{
attackValue = 0f;
}
else if (EquipmentManager.Instance._weapon.Name.Equals("pickaxe_test"))
else if (EquipmentUIManager.Instance.GetList().Where(el => el.Key == (int)EquipmentPanelSlotsTypeEnum.WeaponSlot).First().Value.Name.Equals("pickaxe_test"))
{
attackValue = 0.5f;
PlayerPrefs.SetFloat("attackValue", attackValue);
}
else if (EquipmentManager.Instance._weapon.Name.Equals("Basic_Sword"))
else if (EquipmentUIManager.Instance.GetList().Where(el => el.Key == (int)EquipmentPanelSlotsTypeEnum.WeaponSlot).First().Value.Name.Equals("Basic_Sword"))
{
attackValue = 1.0f;
PlayerPrefs.SetFloat("attackValue", attackValue);

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 73c868471f0c43479d69afc446536d8b
timeCreated: 1660171705

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f7b6c099a5334c44b977899871b4a61a
timeCreated: 1660483312

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c7042c6d06a175543b01bd0e9d316f53
guid: 888d1783775092f48b15c03485e1562a
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,29 @@
using UnityEditor;
using UnityEngine;
public class ChestController : MonoBehaviour
{
public void Update()
{
}
private void OnTriggerStay2D(Collider2D collision)
{
if (collision.tag == "Player")
{
ChestUIManager.Instance.CurrentChestName = gameObject.transform.parent.name;
}
}
private void OnTriggerExit2D(Collider2D collision)
{
if (collision.tag == "Player")
{
ChestUIManager.Instance.CurrentChestName = null;
ChestUIManager.Instance.ClosePanel();
}
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 26a44ba4cba1985408fca11ba424361c
guid: a532f2b712a01fc4fad02346f1a69e39
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,48 @@
using System;
using System.Collections;
using UnityEngine;
[Serializable]
public class SceneChestBuilder : SceneObjectBuilder<ChestPrefabAsset>
{
[SerializeField] int trest = 0;
protected override string MODEL_SOURCE_PATH { get { return "Chests/"; } }
public override void Build(ChestPrefabAsset objectToBuild)
{
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
if (!globalGUI)
Debug.LogError("GUI frame not found!!");
GameObject newObject = FindModel(objectToBuild.Chest.chestModel.name);
Debug.Log($"Chest {newObject} - name: {objectToBuild.Chest.chestModel.name}");
if (!newObject)
Debug.LogError("Can't find prefarb by name " + objectToBuild.Chest.chestModel.name);
// Build chest on map
GameObject chest = Instantiate(newObject, objectToBuild.Position, Quaternion.identity, globalGUI.transform);
chest.name = objectToBuild.Chest.Name;
chest.transform.localScale = new Vector3(0.5f, 0.5f, 1f);
chest.transform.localPosition = objectToBuild.Position;
// data about chest cpontent should be handled in SceneChestManager class and pass to ChestUIPanel only after opening Panel by Player
// in other words objects dont have full info about its data xd
// confuse and irrational but this way it will be easiet to maintain Data Consistency
}
public override GameObject FindModel(string modelName)
{
var resource = Resources.Load<GameObject>(MODEL_SOURCE_PATH + modelName);
if (!resource)
throw new System.Exception($"Resource {MODEL_SOURCE_PATH + modelName} not found!!");
return resource;
}
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0ba28abf0f2ebba45a0f7743b05d08d9
guid: 3db499bc88166ac409489e99ce706c8d
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 925cd94b992c46259a205c12a9a3b969
timeCreated: 1660171743

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 546db8cdadd345c6a364ed0e1a58c4b7
timeCreated: 1660488534

View File

@ -0,0 +1,27 @@
using UnityEngine;
using System.Collections.Generic;
public class ChestDataListManager : DataListManager<ChestPrefabAsset> // or maybe EquippableItem - but its get conflicts...
{
[SerializeField] protected new ChestUIManager uiManager;
public new DataListManager<ChestPrefabAsset> SetUiManager(ref ChestUIManager _uiManager)
{
uiManager = _uiManager;
return this;
}
public override void AddElementToList(ChestPrefabAsset newElement)
{
Elements.Add(newElement);
}
public override void RemoveElementFromList(ChestPrefabAsset element)
{
throw new System.NotImplementedException();
}
//public void AddElement
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8b07ed99c7ae4d07bb7201c51459dce0
timeCreated: 1660488551

View File

@ -0,0 +1,99 @@
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
public class SaveChestManager : SaveModelSystem<ChestPrefabAsset>
{
public override bool SaveModelItem(ChestPrefabAsset model)
{
return base.SaveModelItem(model);
}
public override bool SaveModelList(List<ChestPrefabAsset> list)
{
BinaryFormatter formatter = new BinaryFormatter();
Debug.Log("Saved Chest at " + Path);
if (!Directory.Exists(Path)) Directory.CreateDirectory(Path);
/* Main logic of conversion data format */
var data = ConvertObjectsListToListOfDataModels(list);
FileStream stream = new FileStream(
Path + GetFileName(ObjectListName),
FileMode.Create
);
formatter.Serialize(stream, data);
stream.Close();
return true;
}
public override ChestPrefabAsset LoadModelItem()
{
return base.LoadModelItem();
}
public override List<ChestPrefabAsset> LoadModelList()
{
string path = Path + GetFileName(ObjectListName);
if (File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
List<ChestPrefabAssetData> questsList = formatter.Deserialize(stream) as List<ChestPrefabAssetData>;
stream.Close();
return ConvertListOfDataModelsToListOfObject(questsList);
}
else
{
Debug.Log("Save file not found in " + path);
}
return new List<ChestPrefabAsset>();
}
// Support function
// 1. From model to data format
private ChestPrefabAssetData ConvertObjectToDataModel(ChestPrefabAsset model)
{
return new ChestPrefabAssetData(model);
}
private List<ChestPrefabAssetData> ConvertObjectsListToListOfDataModels(List<ChestPrefabAsset> modelsList)
{
List<ChestPrefabAssetData> convertedList = new List<ChestPrefabAssetData>();
foreach(ChestPrefabAsset model in modelsList)
{
convertedList.Add(ConvertObjectToDataModel(model));
}
return convertedList;
}
// 2. From data to model format
private ChestPrefabAsset ConvertDataModelToObject(ChestPrefabAssetData dataModel)
{
return (ChestPrefabAsset)dataModel.MapDataToPrefabAssetModel();
}
private List<ChestPrefabAsset> ConvertListOfDataModelsToListOfObject(List<ChestPrefabAssetData> dataModelsList)
{
List<ChestPrefabAsset> convertedList = new List<ChestPrefabAsset>();
foreach (ChestPrefabAssetData dataModel in dataModelsList)
{
convertedList.Add(ConvertDataModelToObject(dataModel));
}
return convertedList;
}
}

View File

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

View File

@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class SceneChestDataLoader : SceneBaseDataLoader<ChestPrefabAsset>
{
public SceneChestDataLoader(string _objectListName, string _objectFolderName)
{
SaveModelSystem = new SaveChestManager();
SaveModelSystem.ObjectFolderName = _objectFolderName;
SaveModelSystem.ObjectListName = _objectListName;
}
/*
public void LoadInventoryItemsList()
{
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;
Dictionary<int, EquippableItemPrefabAssetData> equippableItemsList = SaveInventorySystem.LoadInventoryItemsList(this.ItemsListName);
// itemEntry.Value.MapDataToObject() - map data format to object
// save object
foreach(KeyValuePair<int, EquippableItemPrefabAssetData> itemEntry in equippableItemsList)
{
InventoryManager.Instance.SetupItemInInventory(itemEntry.Key, itemEntry.Value.MapDataToEquippableItemPrefarbAsset().equippableItem);
}
}
}
public void SaveInventoryItems()
{
// 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(InventoryManager.Instance._items.Count > 0) {
// 1. Map From Dictionary<int, Item>' to 'Dictionary<int, EquippableItemPrefabAsset>'
Dictionary<int, EquippableItemPrefabAsset> mappedList = new Dictionary<int, EquippableItemPrefabAsset>();
foreach(KeyValuePair<int, Item> itemElement in InventoryManager.Instance._items)
{
mappedList[itemElement.Key] = new EquippableItemPrefabAsset(
itemElement.Value.Name,
itemElement.Value.ItemModel.name,
new Vector3(0,0,0),
(EquippableItem) itemElement.Value
);
}
// 2. Save Items
SaveInventorySystem.SaveInventoryItemsList(mappedList, 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
}
*/
protected override List<ChestPrefabAsset> LoadStaticData() { throw new System.NotImplementedException(); }
protected override List<ChestPrefabAsset> LoadDynamicData()
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().WithMap(CurrentMap).WithDataType(SceneElementTypeEnum.Dynamic).GetString();
return SaveModelSystem.LoadModelList();
}
protected override bool SaveStaticData(List<ChestPrefabAsset> _elements) { throw new System.NotImplementedException(); }
protected override bool SaveDynamicData(List<ChestPrefabAsset> _elements)
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().WithMap(CurrentMap).WithDataType(SceneElementTypeEnum.Dynamic).GetString();
Debug.Log(SaveModelSystem.Path);
try
{
SaveModelSystem.SaveModelList(_elements);
return true;
}
catch (Exception e) { Debug.LogError(e.Message); }
return false;
}
protected override List<ChestPrefabAsset> LoadGenericData() { throw new NotImplementedException(); }
protected override bool SaveGenericData(List<ChestPrefabAsset> _elements) { throw new NotImplementedException(); }
}

View File

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

View File

@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class SceneChestDataManager : SceneBaseDataManager<ChestPrefabAsset>
{
protected override string OBJECT_FOLDER_NAME { get { return "Chest"; } }
protected override string OBJECT_LIST_NAME { get { return "ChestList"; } }
//protected new SceneBaseDataLoader<ChestPrefabAsset> DataLoader { get; set; }
protected SceneChestBuilder ChestBuilder { get; set; }
[SerializeField] Chest CurrentChest;
[SerializeField] public List<ChestPrefabAssetData> ElementsToBuildOnSceneList = new List<ChestPrefabAssetData>();
[SerializeField] List<ChestPrefabAsset> convertDataToAsset = new List<ChestPrefabAsset>();
// tmp var
bool NewGame = true;
public override void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Destroy(gameObject);
}
}
private void Start()
{
Debug.Log("Start SceneChestData manager");
//TaskUIManager.FindOrCreateInstance();
var chestManager = ChestUIManager.Instance;
if (chestManager == null)
throw new NullReferenceException("ChestUIManager not found!!!");
StaticDataList = (new ChestDataListManager()).SetUiManager(ref chestManager);
DynamicDataList = (new ChestDataListManager()).SetUiManager(ref chestManager);
DataLoader = new SceneChestDataLoader(OBJECT_LIST_NAME, OBJECT_FOLDER_NAME);
ChestBuilder = new SceneChestBuilder();
//ChestBuilder.ElementsToBuildOnSceneList = ElementsToBuildOnSceneList;
//SaveData(StaticDataList.GetList(), SceneElementTypeEnum.None);
//LoadData(SceneElementTypeEnum.None, ref StaticDataList);
// LoadDynamicData();
//inventoryManager.SetList(StaticDataList.GetList());
//inventoryManager.OpenPanel();
if (NewGame)
{
foreach (ChestPrefabAssetData asset in ElementsToBuildOnSceneList) { convertDataToAsset.Add((ChestPrefabAsset)asset.MapDataToPrefabAssetModel()); }
ChestBuilder.ElementsToBuildOnSceneList = convertDataToAsset;
ChestBuilder.BuildList();
DynamicDataList.SetList(convertDataToAsset);
List<Chest> tmp = new List<Chest>();
foreach (ChestPrefabAsset asset in ChestBuilder.ElementsToBuildOnSceneList) { tmp.Add(asset.Chest); }
chestManager.SetList(tmp);
}
else
{
LoadDynamicData();
ChestBuilder.ElementsToBuildOnSceneList = DynamicDataList.GetList();
ChestBuilder.BuildList();
List<Chest> tmp = new List<Chest>();
foreach (ChestPrefabAsset asset in ChestBuilder.ElementsToBuildOnSceneList) { tmp.Add(asset.Chest); }
chestManager.SetList(tmp);
// BuildList();
// when chest detect player in near arrea and player press "c"
// open panel -> chest controller handle Open panel in Scene Chest Manager passing info about what Chest Palyer want to open
// Manager Build panel and pass info about chest content
}
}
// TODO - save ChestPrefabAsset (we need to save coords...) but in manager handle Chest data..
//
protected SceneBaseDataManager<ChestPrefabAsset> GetObjectType()
{
return GameObject.FindObjectOfType<SceneChestDataManager>();
}
protected SceneBaseDataManager<ChestPrefabAsset> CreateInstance(ref GameObject managerGameObject)
{
return managerGameObject.AddComponent<SceneChestDataManager>();
}
// TODO manager api
// open panel extend function
// close panel extend function
public void OpenPanel(string chestName)
{
}
// TODO chest api
// add to chest - find chest by its name np
// remove from chest - select chest by its name -
// chesk item in chest - check chest by tis name
}

View File

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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4e66e807c2717ee45923ec12b22309d0
guid: d0d5e0b950ca6424a96910337a7f6325
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
public class EquipmentDataListManager : DataListManager<IndexValuePair<int, EquippableItem>>
{
public new DataListManager<IndexValuePair<int, EquippableItem>> SetUiManager(ref EquipmentUIManager _uiManager)
{
uiManager = _uiManager;
return this;
}
/// <summary>
/// Function to init equipment list
/// We should init this before each operation on equipment
/// </summary>
/// <returns></returns>
public List<IndexValuePair<int, EquippableItem>> InitEquipment()
{
List<IndexValuePair<int, EquippableItem>> convertedList = new List<IndexValuePair<int, EquippableItem>>();
foreach (EquipmentPanelSlotsTypeEnum emptyElement in Enum.GetValues(typeof(EquipmentPanelSlotsTypeEnum))) { convertedList.Add(new IndexValuePair<int, EquippableItem>((int)emptyElement, null)); }
return convertedList;
}
public override void AddElementToList(IndexValuePair<int, EquippableItem> newElement)
{
Elements
.Where(equipment => equipment.Key == newElement.Key)
.ToList()
.ForEach(equipment => equipment.Value = newElement.Value);
}
public override void RemoveElementFromList(IndexValuePair<int, EquippableItem> element)
{
Elements
.Where(equipment => equipment.Key == element.Key)
.ToList()
.ForEach(equipment => equipment.Value = null);
}
}

View File

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

View File

@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class EquipmentDataLoader : SceneBaseDataLoader<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>>
{
public EquipmentDataLoader(string _objectListName, string _objectFolderName)
{
SaveModelSystem = new SaveEquipmentManager();
SaveModelSystem.ObjectFolderName = _objectFolderName;
SaveModelSystem.ObjectListName = _objectListName;
}
protected override List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> LoadGenericData()
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
return SaveModelSystem.LoadModelList();
}
protected override bool SaveGenericData(List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> _elements)
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
try
{
SaveModelSystem.SaveModelList(_elements);
return true;
}
catch (Exception e) { Debug.LogError(e.Message); }
return false;
}
protected override List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> LoadDynamicData()
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
return SaveModelSystem.LoadModelList();
}
protected override List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> LoadStaticData(){ throw new System.NotImplementedException(); }
protected override bool SaveDynamicData(List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> _elements)
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
try
{
SaveModelSystem.SaveModelList(_elements);
return true;
}
catch (Exception e) { Debug.LogError(e.Message); }
return false;
}
protected override bool SaveStaticData(List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> _elements) { throw new System.NotImplementedException(); }
}

View File

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

View File

@ -0,0 +1,156 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class EquipmentDataManager : SceneBaseDataManager<IndexValuePair<int, EquippableItem>>
{
protected override string OBJECT_FOLDER_NAME { get { return "Equipment"; } }
protected override string OBJECT_LIST_NAME { get { return "EquipmentList"; } }
protected new SceneBaseDataLoader<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> DataLoader { get; set; }
bool NewGame = false;
public override void Awake()
{
if (Instance == null)
{
Debug.Log("Create: " + gameObject);
Instance = this;
}
else
{
Debug.Log(Instance);
Debug.LogError(gameObject);
Destroy(gameObject);
}
}
private void Start()
{
Debug.Log("Start SceneEquipmentData manager");
//TaskUIManager.FindOrCreateInstance();
var taskManager = EquipmentUIManager.Instance;
if (taskManager == null)
throw new NullReferenceException("EquipmentUIManager not found!!!");
//StaticDataList = (new EquipmentDataListManager()).SetUiManager(ref taskManager);
DynamicDataList = (new EquipmentDataListManager()).SetUiManager(ref taskManager);
DataLoader = new EquipmentDataLoader(OBJECT_LIST_NAME, OBJECT_FOLDER_NAME);
// taskManager.SetList();
//SaveData(taskManager.GetList(), SceneElementTypeEnum.None);
((EquipmentDataListManager)DynamicDataList).InitEquipment();
//LoadData(SceneElementTypeEnum.None, ref StaticDataList);
//taskManager.SetList(StaticDataList.GetList());
if (NewGame)
{
//taskManager.SetList(tmp);
}
else
{
LoadDynamicData();
taskManager.SetList(DynamicDataList.GetList());
// BuildList();
// when chest detect player in near arrea and player press "c"
// open panel -> chest controller handle Open panel in Scene Chest Manager passing info about what Chest Palyer want to open
// Manager Build panel and pass info about chest content
}
}
#region override load & save
protected override bool LoadData(SceneElementTypeEnum type, ref DataListManager<IndexValuePair<int, EquippableItem>> dataListManager)
{
try
{
// 1. Convert EquippableItemPrefabAsset to EquippableItem list
List<IndexValuePair<int, EquippableItem>> convertedList = new List<IndexValuePair<int, EquippableItem>>();
foreach (IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset> loadedEquippableItemPrefarbAssetElement in (List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>>)DataLoader.LoadData(type))
{
if(loadedEquippableItemPrefarbAssetElement.Value != null)
convertedList.Add(new IndexValuePair<int, EquippableItem>((int)loadedEquippableItemPrefarbAssetElement.Key, (EquippableItem)loadedEquippableItemPrefarbAssetElement.Value.EquippableItem));
else
convertedList.Add(new IndexValuePair<int, EquippableItem>((int)loadedEquippableItemPrefarbAssetElement.Key, null));
}
// 2. Pass loaded list to InventoryDataManager
dataListManager.SetList(convertedList);
return true;
}
catch (Exception e)
{
Debug.LogError(e.Message);
}
return false;
}
protected override bool SaveData(List<IndexValuePair<int, EquippableItem>> _elements, SceneElementTypeEnum type)
{
try
{
// 1. Convert EquippableItem to EquippableItemPrefabAsset list
List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> convertedList = new List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>>();
foreach (IndexValuePair<int, EquippableItem> itemElement in _elements)
{
if(itemElement.Value)
convertedList.Add(new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>(
(EquipmentPanelSlotsTypeEnum)itemElement.Key,
new EquippableItemPrefabAsset(
itemElement.Value.Name,
itemElement.Value.ItemModel.name,
new Vector3(0, 0, 0),
itemElement.Value
)
));
else
convertedList.Add(new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>((EquipmentPanelSlotsTypeEnum)itemElement.Key, null));
}
// 2. Pass loaded list to InventoryDataManager
DataLoader.SaveData(convertedList, type);
return true;
}
catch (Exception e)
{
Debug.LogError(e.Message);
}
return false;
}
#endregion
protected SceneBaseDataManager<IndexValuePair<int, EquippableItem>> GetObjectType()
{
return GameObject.FindObjectOfType<EquipmentDataManager>();
}
protected SceneBaseDataManager<IndexValuePair<int, EquippableItem>> CreateInstance(ref GameObject managerGameObject)
{
return managerGameObject.AddComponent<EquipmentDataManager>();
}
public override bool SaveDynamicData()
{
Debug.Log("SaveDynamicData");
// tem approach
DynamicDataList.SetList(EquipmentUIManager.Instance.GetList());
return base.SaveDynamicData();
}
}

View File

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

View File

@ -0,0 +1,134 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
public class SaveEquipmentManager : SaveModelSystem<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>>
{
public override bool SaveModelItem(IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset> model)
{
return base.SaveModelItem(model);
}
public override bool SaveModelList(List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> list)
{
BinaryFormatter formatter = new BinaryFormatter();
Debug.Log("Saved Equipment at " + Path);
if (!Directory.Exists(Path)) Directory.CreateDirectory(Path);
/* Main logic of conversion data format */
var data = ConvertObjectsListToListOfDataModels(list);
FileStream stream = new FileStream(
Path + GetFileName(ObjectListName),
FileMode.Create
);
formatter.Serialize(stream, data);
stream.Close();
return true;
}
public override IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset> LoadModelItem()
{
return base.LoadModelItem();
}
public override List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> LoadModelList()
{
string path = Path + GetFileName(ObjectListName);
if (File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>> euipmentList = formatter.Deserialize(stream) as List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>>;
stream.Close();
return ConvertListOfDataModelsToListOfObject(euipmentList);
}
else
{
Debug.Log("Save file not found in " + path);
}
return new List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>>();
}
// Support function
// 1. From model to data format
private IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData> ConvertObjectToDataModel(IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset> model)
{
if (model.Value != null)
return new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>(model.Key, new EquippableItemPrefabAssetData(model.Value));
else
return new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>(model.Key, null);
}
private List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>> ConvertObjectsListToListOfDataModels(List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> modelsList)
{
// 1. prepare list with all slot possibiliteies
List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>> convertedList = GetEmptyListOfEquipmentSlotsPrefabData();
// 2. Assign values
foreach (IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset> model in modelsList)
{
convertedList.RemoveAll(slot => slot.Key == model.Key);
convertedList.Add(ConvertObjectToDataModel(model));
}
return convertedList;
}
// 2. From data to model format
private IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset> ConvertDataModelToObject(IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData> dataModel)
{
if(dataModel.Value != null)
return new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>(dataModel.Key, (EquippableItemPrefabAsset)dataModel.Value.MapDataToPrefabAssetModel());
else
return new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>(dataModel.Key, null);
}
private List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> ConvertListOfDataModelsToListOfObject(List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>> dataModelsList)
{
// 1. prepare list with all slot possibiliteies
List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> convertedList = GetEmptyListOfEquipmentSlotsPrefab();
// 2. Assign values
foreach (IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData> dataModel in dataModelsList)
{
convertedList.RemoveAll(slot => slot.Key == (EquipmentPanelSlotsTypeEnum)dataModel.Key);
convertedList.Add(ConvertDataModelToObject(dataModel));
}
return convertedList;
}
// Empty list factories functions
private List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> GetEmptyListOfEquipmentSlotsPrefab()
{
List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>> convertedList = new List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>>();
foreach (EquipmentPanelSlotsTypeEnum emptyElement in Enum.GetValues(typeof(EquipmentPanelSlotsTypeEnum))) { convertedList.Add(new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAsset>(emptyElement, null)); }
return convertedList;
}
private List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>> GetEmptyListOfEquipmentSlotsPrefabData()
{
List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>> convertedList = new List<IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>>();
foreach (EquipmentPanelSlotsTypeEnum emptyElement in Enum.GetValues(typeof(EquipmentPanelSlotsTypeEnum))) { convertedList.Add(new IndexValuePair<EquipmentPanelSlotsTypeEnum, EquippableItemPrefabAssetData>(emptyElement, null)); }
return convertedList;
}
}

View File

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

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fe46dc8c381d43eb971d9e24236d16f0
timeCreated: 1660405143

View File

@ -0,0 +1,22 @@
using System.Collections.Generic;
using UnityEngine;
public class InventoryDataListManager : DataListManager<IndexValuePair<int, EquippableItem>> // or maybe EquippableItem - but its get conflicts...
{
public new DataListManager<IndexValuePair<int, EquippableItem>> SetUiManager(ref InventoryUIManager _uiManager)
{
uiManager = _uiManager;
return this;
}
public override void AddElementToList(IndexValuePair<int, EquippableItem> newElement)
{
Elements.Add(newElement);
}
public override void RemoveElementFromList(IndexValuePair<int, EquippableItem> element)
{
throw new System.NotImplementedException();
}
}

View File

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

View File

@ -0,0 +1,99 @@
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
public class SaveInventoryManager : SaveModelSystem<IndexValuePair<int, EquippableItemPrefabAsset>>
{
public override bool SaveModelItem(IndexValuePair<int, EquippableItemPrefabAsset> model)
{
return base.SaveModelItem(model);
}
public override bool SaveModelList(List<IndexValuePair<int, EquippableItemPrefabAsset>> list)
{
BinaryFormatter formatter = new BinaryFormatter();
Debug.Log("Saved Inventory at " + Path);
if (!Directory.Exists(Path)) Directory.CreateDirectory(Path);
/* Main logic of conversion data format */
var data = ConvertObjectsListToListOfDataModels(list);
FileStream stream = new FileStream(
Path + GetFileName(ObjectListName),
FileMode.Create
);
formatter.Serialize(stream, data);
stream.Close();
return true;
}
public override IndexValuePair<int, EquippableItemPrefabAsset> LoadModelItem()
{
return base.LoadModelItem();
}
public override List<IndexValuePair<int, EquippableItemPrefabAsset>> LoadModelList()
{
string path = Path + GetFileName(ObjectListName);
if (File.Exists(path))
{
BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream(path, FileMode.Open);
List<IndexValuePair<int, EquippableItemPrefabAssetData>> questsList = formatter.Deserialize(stream) as List<IndexValuePair<int, EquippableItemPrefabAssetData>>;
stream.Close();
return ConvertListOfDataModelsToListOfObject(questsList);
}
else
{
Debug.Log("Save file not found in " + path);
}
return new List<IndexValuePair<int, EquippableItemPrefabAsset>>();
}
// Support function
// 1. From model to data format
private IndexValuePair<int, EquippableItemPrefabAssetData> ConvertObjectToDataModel(IndexValuePair<int, EquippableItemPrefabAsset> model)
{
return new IndexValuePair<int, EquippableItemPrefabAssetData>(model.Key, new EquippableItemPrefabAssetData(model.Value));
}
private List<IndexValuePair<int, EquippableItemPrefabAssetData>> ConvertObjectsListToListOfDataModels(List<IndexValuePair<int, EquippableItemPrefabAsset>> modelsList)
{
List<IndexValuePair<int, EquippableItemPrefabAssetData>> convertedList = new List<IndexValuePair<int, EquippableItemPrefabAssetData>>();
foreach(IndexValuePair<int, EquippableItemPrefabAsset> model in modelsList)
{
convertedList.Add(ConvertObjectToDataModel(model));
}
return convertedList;
}
// 2. From data to model format
private IndexValuePair<int, EquippableItemPrefabAsset> ConvertDataModelToObject(IndexValuePair<int, EquippableItemPrefabAssetData> dataModel)
{
return new IndexValuePair<int, EquippableItemPrefabAsset>(dataModel.Key, (EquippableItemPrefabAsset)dataModel.Value.MapDataToPrefabAssetModel());
}
private List<IndexValuePair<int, EquippableItemPrefabAsset>> ConvertListOfDataModelsToListOfObject(List<IndexValuePair<int, EquippableItemPrefabAssetData>> dataModelsList)
{
List<IndexValuePair<int, EquippableItemPrefabAsset>> convertedList = new List<IndexValuePair<int, EquippableItemPrefabAsset>>();
foreach (IndexValuePair<int, EquippableItemPrefabAssetData> dataModel in dataModelsList)
{
convertedList.Add(ConvertDataModelToObject(dataModel));
}
return convertedList;
}
}

View File

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

View File

@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class SceneInventoryDataLoader : SceneBaseDataLoader<IndexValuePair<int, EquippableItemPrefabAsset>>
{
public SceneInventoryDataLoader(string _objectListName, string _objectFolderName)
{
SaveModelSystem = new SaveInventoryManager();
SaveModelSystem.ObjectFolderName = _objectFolderName;
SaveModelSystem.ObjectListName = _objectListName;
}
protected override List<IndexValuePair<int, EquippableItemPrefabAsset>> LoadGenericData()
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
return SaveModelSystem.LoadModelList();
}
protected override bool SaveGenericData(List<IndexValuePair<int, EquippableItemPrefabAsset>> _elements)
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
try
{
SaveModelSystem.SaveModelList(_elements);
return true;
}
catch (Exception e) { Debug.LogError(e.Message); }
return false;
}
protected override List<IndexValuePair<int, EquippableItemPrefabAsset>> LoadStaticData() { throw new System.NotImplementedException(); }
protected override List<IndexValuePair<int, EquippableItemPrefabAsset>> LoadDynamicData()
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
return SaveModelSystem.LoadModelList();
}
protected override bool SaveStaticData(List<IndexValuePair<int, EquippableItemPrefabAsset>> _elements) { throw new System.NotImplementedException(); }
protected override bool SaveDynamicData(List<IndexValuePair<int, EquippableItemPrefabAsset>> _elements)
{
SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString();
Debug.Log(SaveModelSystem.Path);
try
{
SaveModelSystem.SaveModelList(_elements);
return true;
}
catch (Exception e) { Debug.LogError(e.Message); }
return false;
}
}

View File

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

Some files were not shown because too many files have changed in this diff Show More