diff --git a/Assets/Prefarbs/Equipment/equipment_panel.prefab.meta b/Assets/Prefarbs/Equipment/equipment_panel.prefab.meta deleted file mode 100644 index 6f498821..00000000 --- a/Assets/Prefarbs/Equipment/equipment_panel.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d220ca711ae86664d8bb4f9c1622b13f -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources.meta b/Assets/Resources.meta index d70b0aca..02384264 100644 --- a/Assets/Resources.meta +++ b/Assets/Resources.meta @@ -1,5 +1,9 @@ fileFormatVersion: 2 +<<<<<<< HEAD guid: 3ee6e7ceeba1b814cb5310e2f2eaf155 +======= +guid: e985e9291cdf02245b272d4fafce4289 +>>>>>>> refactoring folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Items/Chest.meta b/Assets/Resources/Chests.meta similarity index 100% rename from Assets/Items/Chest.meta rename to Assets/Resources/Chests.meta diff --git a/Assets/Items/Chest/Gold Chest.prefab b/Assets/Resources/Chests/Gold Chest.prefab similarity index 93% rename from Assets/Items/Chest/Gold Chest.prefab rename to Assets/Resources/Chests/Gold Chest.prefab index 8a5d00a6..b9a34278 100644 --- a/Assets/Items/Chest/Gold Chest.prefab +++ b/Assets/Resources/Chests/Gold Chest.prefab @@ -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: [] diff --git a/Assets/Items/Chest/Gold Chest.prefab.meta b/Assets/Resources/Chests/Gold Chest.prefab.meta similarity index 100% rename from Assets/Items/Chest/Gold Chest.prefab.meta rename to Assets/Resources/Chests/Gold Chest.prefab.meta diff --git a/Assets/Items/Chest/Prize Chest.prefab b/Assets/Resources/Chests/Prize Chest.prefab similarity index 94% rename from Assets/Items/Chest/Prize Chest.prefab rename to Assets/Resources/Chests/Prize Chest.prefab index e3fd6d5d..2c1839c9 100644 --- a/Assets/Items/Chest/Prize Chest.prefab +++ b/Assets/Resources/Chests/Prize Chest.prefab @@ -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: [] diff --git a/Assets/Items/Chest/Prize Chest.prefab.meta b/Assets/Resources/Chests/Prize Chest.prefab.meta similarity index 100% rename from Assets/Items/Chest/Prize Chest.prefab.meta rename to Assets/Resources/Chests/Prize Chest.prefab.meta diff --git a/Assets/Items/Chest/Wooden Chest.prefab b/Assets/Resources/Chests/Wooden Chest.prefab similarity index 94% rename from Assets/Items/Chest/Wooden Chest.prefab rename to Assets/Resources/Chests/Wooden Chest.prefab index 7e8062d1..8d061a27 100644 --- a/Assets/Items/Chest/Wooden Chest.prefab +++ b/Assets/Resources/Chests/Wooden Chest.prefab @@ -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: [] diff --git a/Assets/Items/Chest/Wooden Chest.prefab.meta b/Assets/Resources/Chests/Wooden Chest.prefab.meta similarity index 100% rename from Assets/Items/Chest/Wooden Chest.prefab.meta rename to Assets/Resources/Chests/Wooden Chest.prefab.meta diff --git a/Assets/Items.meta b/Assets/Resources/Items.meta similarity index 77% rename from Assets/Items.meta rename to Assets/Resources/Items.meta index cd34b519..c192d4e6 100644 --- a/Assets/Items.meta +++ b/Assets/Resources/Items.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b0e1c4df7cd61824384676c2e7fb2991 +guid: a592c74dcbbaafa4a82cc20d574cb331 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Items/Lumberjac Axe.asset b/Assets/Resources/Items/Axe.asset similarity index 70% rename from Assets/Items/Lumberjac Axe.asset rename to Assets/Resources/Items/Axe.asset index ccf52304..74429a18 100644 --- a/Assets/Items/Lumberjac Axe.asset +++ b/Assets/Resources/Items/Axe.asset @@ -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 diff --git a/Assets/Items/Lumberjac Axe.asset.meta b/Assets/Resources/Items/Axe.asset.meta similarity index 100% rename from Assets/Items/Lumberjac Axe.asset.meta rename to Assets/Resources/Items/Axe.asset.meta diff --git a/Assets/Items/Lumberjac Axe.prefab b/Assets/Resources/Items/Axe.prefab similarity index 100% rename from Assets/Items/Lumberjac Axe.prefab rename to Assets/Resources/Items/Axe.prefab diff --git a/Assets/Items/Lumberjac Axe.prefab.meta b/Assets/Resources/Items/Axe.prefab.meta similarity index 100% rename from Assets/Items/Lumberjac Axe.prefab.meta rename to Assets/Resources/Items/Axe.prefab.meta diff --git a/Assets/Items/Basic_Sword.asset b/Assets/Resources/Items/Basic_Sword.asset similarity index 100% rename from Assets/Items/Basic_Sword.asset rename to Assets/Resources/Items/Basic_Sword.asset diff --git a/Assets/Items/Basic_Sword.asset.meta b/Assets/Resources/Items/Basic_Sword.asset.meta similarity index 100% rename from Assets/Items/Basic_Sword.asset.meta rename to Assets/Resources/Items/Basic_Sword.asset.meta diff --git a/Assets/Items/Basic_Sword.prefab b/Assets/Resources/Items/Basic_Sword.prefab similarity index 100% rename from Assets/Items/Basic_Sword.prefab rename to Assets/Resources/Items/Basic_Sword.prefab diff --git a/Assets/Items/Basic_Sword.prefab.meta b/Assets/Resources/Items/Basic_Sword.prefab.meta similarity index 100% rename from Assets/Items/Basic_Sword.prefab.meta rename to Assets/Resources/Items/Basic_Sword.prefab.meta diff --git a/Assets/Items/Chestplate.asset b/Assets/Resources/Items/Chestplate.asset similarity index 100% rename from Assets/Items/Chestplate.asset rename to Assets/Resources/Items/Chestplate.asset diff --git a/Assets/Items/Chestplate.asset.meta b/Assets/Resources/Items/Chestplate.asset.meta similarity index 100% rename from Assets/Items/Chestplate.asset.meta rename to Assets/Resources/Items/Chestplate.asset.meta diff --git a/Assets/Items/Chestplate.prefab b/Assets/Resources/Items/Chestplate.prefab similarity index 100% rename from Assets/Items/Chestplate.prefab rename to Assets/Resources/Items/Chestplate.prefab diff --git a/Assets/Items/Chestplate.prefab.meta b/Assets/Resources/Items/Chestplate.prefab.meta similarity index 100% rename from Assets/Items/Chestplate.prefab.meta rename to Assets/Resources/Items/Chestplate.prefab.meta diff --git a/Assets/Items/Gold Ore.asset b/Assets/Resources/Items/Gold Ore.asset similarity index 70% rename from Assets/Items/Gold Ore.asset rename to Assets/Resources/Items/Gold Ore.asset index 7b5b3312..a2eececd 100644 --- a/Assets/Items/Gold Ore.asset +++ b/Assets/Resources/Items/Gold Ore.asset @@ -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 diff --git a/Assets/Items/Gold Ore.asset.meta b/Assets/Resources/Items/Gold Ore.asset.meta similarity index 100% rename from Assets/Items/Gold Ore.asset.meta rename to Assets/Resources/Items/Gold Ore.asset.meta diff --git a/Assets/Items/Gold Ore.prefab b/Assets/Resources/Items/Gold Ore.prefab similarity index 100% rename from Assets/Items/Gold Ore.prefab rename to Assets/Resources/Items/Gold Ore.prefab diff --git a/Assets/Items/Gold Ore.prefab.meta b/Assets/Resources/Items/Gold Ore.prefab.meta similarity index 100% rename from Assets/Items/Gold Ore.prefab.meta rename to Assets/Resources/Items/Gold Ore.prefab.meta diff --git a/Assets/Items/Pickaxe.asset b/Assets/Resources/Items/Pickaxe.asset similarity index 82% rename from Assets/Items/Pickaxe.asset rename to Assets/Resources/Items/Pickaxe.asset index f5c9e648..8a3f9d86 100644 --- a/Assets/Items/Pickaxe.asset +++ b/Assets/Resources/Items/Pickaxe.asset @@ -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} diff --git a/Assets/Items/Pickaxe.asset.meta b/Assets/Resources/Items/Pickaxe.asset.meta similarity index 100% rename from Assets/Items/Pickaxe.asset.meta rename to Assets/Resources/Items/Pickaxe.asset.meta diff --git a/Assets/Items/Pickaxe.prefab b/Assets/Resources/Items/Pickaxe.prefab similarity index 100% rename from Assets/Items/Pickaxe.prefab rename to Assets/Resources/Items/Pickaxe.prefab diff --git a/Assets/Items/Pickaxe.prefab.meta b/Assets/Resources/Items/Pickaxe.prefab.meta similarity index 100% rename from Assets/Items/Pickaxe.prefab.meta rename to Assets/Resources/Items/Pickaxe.prefab.meta diff --git a/Assets/Items/Private_Helmet.asset b/Assets/Resources/Items/Private_Helmet.asset similarity index 100% rename from Assets/Items/Private_Helmet.asset rename to Assets/Resources/Items/Private_Helmet.asset diff --git a/Assets/Items/Private_Helmet.asset.meta b/Assets/Resources/Items/Private_Helmet.asset.meta similarity index 100% rename from Assets/Items/Private_Helmet.asset.meta rename to Assets/Resources/Items/Private_Helmet.asset.meta diff --git a/Assets/Items/Private_Helmet.prefab b/Assets/Resources/Items/Private_Helmet.prefab similarity index 100% rename from Assets/Items/Private_Helmet.prefab rename to Assets/Resources/Items/Private_Helmet.prefab diff --git a/Assets/Items/Private_Helmet.prefab.meta b/Assets/Resources/Items/Private_Helmet.prefab.meta similarity index 100% rename from Assets/Items/Private_Helmet.prefab.meta rename to Assets/Resources/Items/Private_Helmet.prefab.meta diff --git a/Assets/Prefarbs/Inventory UI.meta b/Assets/Resources/UiPanels.meta similarity index 77% rename from Assets/Prefarbs/Inventory UI.meta rename to Assets/Resources/UiPanels.meta index 2b3edc53..82c4ee43 100644 --- a/Assets/Prefarbs/Inventory UI.meta +++ b/Assets/Resources/UiPanels.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5e5b0dc687e02e447a5d3464cc5d7a9d +guid: 3ad66b979f0b5444cbeccf9751f4863f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Prefarbs/Chest/chest_panel.prefab b/Assets/Resources/UiPanels/ChestPanel.prefab similarity index 96% rename from Assets/Prefarbs/Chest/chest_panel.prefab rename to Assets/Resources/UiPanels/ChestPanel.prefab index 47b5c828..c36de0ab 100644 --- a/Assets/Prefarbs/Chest/chest_panel.prefab +++ b/Assets/Resources/UiPanels/ChestPanel.prefab @@ -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 diff --git a/Assets/Prefarbs/Chest/chest_panel.prefab.meta b/Assets/Resources/UiPanels/ChestPanel.prefab.meta similarity index 100% rename from Assets/Prefarbs/Chest/chest_panel.prefab.meta rename to Assets/Resources/UiPanels/ChestPanel.prefab.meta diff --git a/Assets/Prefarbs/Chest/chest_slot.prefab b/Assets/Resources/UiPanels/ChestSlot.prefab similarity index 99% rename from Assets/Prefarbs/Chest/chest_slot.prefab rename to Assets/Resources/UiPanels/ChestSlot.prefab index 952980e7..b0927dc9 100644 --- a/Assets/Prefarbs/Chest/chest_slot.prefab +++ b/Assets/Resources/UiPanels/ChestSlot.prefab @@ -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 diff --git a/Assets/Prefarbs/Chest/chest_slot.prefab.meta b/Assets/Resources/UiPanels/ChestSlot.prefab.meta similarity index 100% rename from Assets/Prefarbs/Chest/chest_slot.prefab.meta rename to Assets/Resources/UiPanels/ChestSlot.prefab.meta diff --git a/Assets/Prefarbs/Inventory UI/DraggableItem.prefab b/Assets/Resources/UiPanels/DraggableItem.prefab similarity index 100% rename from Assets/Prefarbs/Inventory UI/DraggableItem.prefab rename to Assets/Resources/UiPanels/DraggableItem.prefab diff --git a/Assets/Prefarbs/Inventory UI/DraggableItem.prefab.meta b/Assets/Resources/UiPanels/DraggableItem.prefab.meta similarity index 100% rename from Assets/Prefarbs/Inventory UI/DraggableItem.prefab.meta rename to Assets/Resources/UiPanels/DraggableItem.prefab.meta diff --git a/Assets/Prefarbs/Equipment/equipment_slot.prefab b/Assets/Resources/UiPanels/EquipmentBox.prefab similarity index 99% rename from Assets/Prefarbs/Equipment/equipment_slot.prefab rename to Assets/Resources/UiPanels/EquipmentBox.prefab index 6e3726cc..700d09fb 100644 --- a/Assets/Prefarbs/Equipment/equipment_slot.prefab +++ b/Assets/Resources/UiPanels/EquipmentBox.prefab @@ -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 diff --git a/Assets/Prefarbs/Equipment/equipment_slot.prefab.meta b/Assets/Resources/UiPanels/EquipmentBox.prefab.meta similarity index 100% rename from Assets/Prefarbs/Equipment/equipment_slot.prefab.meta rename to Assets/Resources/UiPanels/EquipmentBox.prefab.meta diff --git a/Assets/Prefarbs/Equipment/equipment_panel.prefab b/Assets/Resources/UiPanels/EquipmentPanel.prefab similarity index 81% rename from Assets/Prefarbs/Equipment/equipment_panel.prefab rename to Assets/Resources/UiPanels/EquipmentPanel.prefab index 6dc1b33a..f73cfc58 100644 --- a/Assets/Prefarbs/Equipment/equipment_panel.prefab +++ b/Assets/Resources/UiPanels/EquipmentPanel.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &260959341737924918 +--- !u!1 &429268561425699357 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,51 +8,132 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 260959341737924917} - - component: {fileID: 260959341737924906} - - component: {fileID: 260959341737924907} - - component: {fileID: 260959341737924916} + - component: {fileID: 4116106613650971739} + - component: {fileID: 7123986941375226150} + - component: {fileID: 5325331951181561256} m_Layer: 5 - m_Name: Button + m_Name: Content_vertical m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &260959341737924917 +--- !u!224 &4116106613650971739 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959341737924918} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 429268561425699357} + 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: 3583098472670073449} + - {fileID: 4491565494541573007} + - {fileID: 251587108048000912} + - {fileID: 4504652696978532822} + - {fileID: 6907309526462690080} + m_Father: {fileID: 6661176406092379127} + m_RootOrder: 1 + 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: -556} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &7123986941375226150 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 429268561425699357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 0 +--- !u!114 &5325331951181561256 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 429268561425699357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 45 + m_Right: 0 + m_Top: 40 + m_Bottom: 40 + m_ChildAlignment: 0 + m_StartCorner: 0 + m_StartAxis: 1 + m_CellSize: {x: 65, y: 65} + m_Spacing: {x: 35, y: 0} + m_Constraint: 0 + m_ConstraintCount: 1 +--- !u!1 &5352872063262343913 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5233930375019896633} + - component: {fileID: 8574572456929222782} + - component: {fileID: 1341612237709242367} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5233930375019896633 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5352872063262343913} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 3.7, y: 5.3, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 260959342237683368} + m_Father: {fileID: 6661176406092379127} 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_AnchoredPosition: {x: 50, y: 67} + m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &260959341737924906 +--- !u!222 &8574572456929222782 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959341737924918} + m_GameObject: {fileID: 5352872063262343913} m_CullTransparentMesh: 1 ---- !u!114 &260959341737924907 +--- !u!114 &1341612237709242367 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959341737924918} + m_GameObject: {fileID: 5352872063262343913} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -66,7 +147,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 11277a3f23988ec47908362d708edaa8, type: 3} + m_Sprite: {fileID: 21300000, guid: 968b2ea4edc9cb44e8b83b067b92cd79, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -76,51 +157,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!114 &260959341737924916 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959341737924918} - 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: 260959341737924907} - m_OnClick: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &260959342094440867 +--- !u!1 &6661176405948328697 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -128,209 +165,10 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 260959342094440866} - - component: {fileID: 260959342094440871} - - component: {fileID: 260959342094440864} - - component: {fileID: 260959342094440865} - m_Layer: 5 - m_Name: Viewport - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &260959342094440866 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342094440867} - 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: 260959343401436109} - - {fileID: 7417715205507905038} - - {fileID: 1678992152378652012} - m_Father: {fileID: 260959342252114083} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 1} ---- !u!222 &260959342094440871 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342094440867} - m_CullTransparentMesh: 1 ---- !u!114 &260959342094440864 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342094440867} - 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 &260959342094440865 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342094440867} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ShowMaskGraphic: 1 ---- !u!1 &260959342237683369 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 260959342237683368} - - component: {fileID: 260959342237683374} - - component: {fileID: 260959342237683375} - - component: {fileID: 3587820332014416633} - m_Layer: 5 - m_Name: equipment_panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &260959342237683368 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342237683369} - 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_Children: - - {fileID: 260959343098444010} - - {fileID: 260959342252114083} - - {fileID: 260959341737924917} - 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: 550, y: 715} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &260959342237683374 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342237683369} - m_CullTransparentMesh: 0 ---- !u!114 &260959342237683375 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342237683369} - 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.392} - 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 &3587820332014416633 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342237683369} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 42863f9f48506b944b90213e49c99763, type: 3} - m_Name: - m_EditorClassIdentifier: - _panel: {fileID: 260959343401436110} - _blankSlot: {fileID: 4202482119828722599, guid: 843626bb28e804c4384ea070e0fead67, type: 3} - _panelCloseButton: {fileID: 260959341737924916} - _instance: {fileID: 0} - _itemTemplate: {fileID: 6570396142606985298, guid: 1304511dd1dfefc449e87c3d904ab15f, type: 3} - _tmp: {fileID: 0} - MAX_SLOT_CUNT: 0 - _helmet: {fileID: 299675377812383720} - _chest: {fileID: 299675379385184912} - _boots: {fileID: 299675378044996704} - _weapon: {fileID: 299675377607892010} - _potion_one: {fileID: 1487537317611376851} - _potion_two: {fileID: 1965906284937926965} - _potion_three: {fileID: 2765389911185380650} - _potion_four: {fileID: 1990256364651981676} - _potion_five: {fileID: 8846973155828920730} ---- !u!1 &260959342252114092 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 260959342252114083} - - component: {fileID: 260959342252114080} - - component: {fileID: 260959342252114081} - - component: {fileID: 260959342252114082} + - component: {fileID: 6661176405948328694} + - component: {fileID: 6661176405948328693} + - component: {fileID: 6661176405948328692} + - component: {fileID: 6661176405948328695} m_Layer: 5 m_Name: Scroll View m_TagString: Untagged @@ -338,19 +176,20 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &260959342252114083 +--- !u!224 &6661176405948328694 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342252114092} + m_GameObject: {fileID: 6661176405948328697} 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: 260959342094440866} - m_Father: {fileID: 260959342237683368} + - {fileID: 6661176406092379127} + m_Father: {fileID: 6661176405967447293} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} @@ -358,21 +197,21 @@ RectTransform: m_AnchoredPosition: {x: 0.0000038146973, y: 0.0000076293945} m_SizeDelta: {x: 550, y: 715} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &260959342252114080 +--- !u!222 &6661176405948328693 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342252114092} + m_GameObject: {fileID: 6661176405948328697} m_CullTransparentMesh: 1 ---- !u!114 &260959342252114081 +--- !u!114 &6661176405948328692 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342252114092} + m_GameObject: {fileID: 6661176405948328697} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -396,19 +235,19 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!114 &260959342252114082 +--- !u!114 &6661176405948328695 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342252114092} + m_GameObject: {fileID: 6661176405948328697} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} m_Name: m_EditorClassIdentifier: - m_Content: {fileID: 260959343401436109} + m_Content: {fileID: 6661176407399442840} m_Horizontal: 0 m_Vertical: 0 m_MovementType: 2 @@ -416,7 +255,7 @@ MonoBehaviour: m_Inertia: 1 m_DecelerationRate: 0.135 m_ScrollSensitivity: 1 - m_Viewport: {fileID: 260959342094440866} + m_Viewport: {fileID: 6661176406092379127} m_HorizontalScrollbar: {fileID: 0} m_VerticalScrollbar: {fileID: 0} m_HorizontalScrollbarVisibility: 2 @@ -426,7 +265,7 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] ---- !u!1 &260959342606639430 +--- !u!1 &6661176405967447292 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -434,9 +273,197 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 260959342606639429} - - component: {fileID: 260959342606639547} - - component: {fileID: 260959342606639428} + - component: {fileID: 6661176405967447293} + - component: {fileID: 6661176405967447291} + - component: {fileID: 6661176405967447290} + - component: {fileID: 8180298454704774455} + m_Layer: 5 + m_Name: EquipmentPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6661176405967447293 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176405967447292} + 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: 6661176407096365759} + - {fileID: 6661176405948328694} + 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: 550, y: 715} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6661176405967447291 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176405967447292} + m_CullTransparentMesh: 0 +--- !u!114 &6661176405967447290 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176405967447292} + 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.392} + 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 &8180298454704774455 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176405967447292} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e143aeb4404531f4aadd27d560e12565, type: 3} + m_Name: + m_EditorClassIdentifier: + _panelContent: {fileID: 6661176407399442843} + ChildBoxTemplate: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + ChildBoxList: [] + _panelAdditionalSlotsContent: {fileID: 429268561425699357} +--- !u!1 &6661176406092379126 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6661176406092379127} + - component: {fileID: 6661176406092379122} + - component: {fileID: 6661176406092379125} + - component: {fileID: 6661176406092379124} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6661176406092379127 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176406092379126} + 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: 6661176407399442840} + - {fileID: 4116106613650971739} + - {fileID: 5233930375019896633} + m_Father: {fileID: 6661176405948328694} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!222 &6661176406092379122 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176406092379126} + m_CullTransparentMesh: 1 +--- !u!114 &6661176406092379125 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176406092379126} + 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 &6661176406092379124 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6661176406092379126} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 1 +--- !u!1 &6661176406604630803 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6661176406604630800} + - component: {fileID: 6661176406604631022} + - component: {fileID: 6661176406604630801} m_Layer: 5 m_Name: Text (TMP) m_TagString: Untagged @@ -444,18 +471,19 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &260959342606639429 +--- !u!224 &6661176406604630800 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342606639430} + m_GameObject: {fileID: 6661176406604630803} 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: 260959343098444010} + m_Father: {fileID: 6661176407096365759} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} @@ -463,21 +491,21 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 200, y: 50} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &260959342606639547 +--- !u!222 &6661176406604631022 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342606639430} + m_GameObject: {fileID: 6661176406604630803} m_CullTransparentMesh: 1 ---- !u!114 &260959342606639428 +--- !u!114 &6661176406604630801 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959342606639430} + m_GameObject: {fileID: 6661176406604630803} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -560,7 +588,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &260959343098444011 +--- !u!1 &6661176407096365758 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -568,9 +596,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 260959343098444010} - - component: {fileID: 260959343098444008} - - component: {fileID: 260959343098444009} + - component: {fileID: 6661176407096365759} + - component: {fileID: 6661176407096365757} + - component: {fileID: 6661176407096365756} m_Layer: 5 m_Name: Header m_TagString: Untagged @@ -578,19 +606,20 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &260959343098444010 +--- !u!224 &6661176407096365759 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959343098444011} + m_GameObject: {fileID: 6661176407096365758} 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: 260959342606639429} - m_Father: {fileID: 260959342237683368} + - {fileID: 6661176406604630800} + m_Father: {fileID: 6661176405967447293} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -598,21 +627,21 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 397.5} m_SizeDelta: {x: -130, y: -635} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &260959343098444008 +--- !u!222 &6661176407096365757 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959343098444011} + m_GameObject: {fileID: 6661176407096365758} m_CullTransparentMesh: 1 ---- !u!114 &260959343098444009 +--- !u!114 &6661176407096365756 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959343098444011} + m_GameObject: {fileID: 6661176407096365758} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -636,7 +665,7 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!1 &260959343401436110 +--- !u!1 &6661176407399442843 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -644,9 +673,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 260959343401436109} - - component: {fileID: 260959343401436099} - - component: {fileID: 260959343401436108} + - component: {fileID: 6661176407399442840} + - component: {fileID: 6661176407399442838} + - component: {fileID: 6661176407399442841} m_Layer: 5 m_Name: Content m_TagString: Untagged @@ -654,22 +683,23 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &260959343401436109 +--- !u!224 &6661176407399442840 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959343401436110} + m_GameObject: {fileID: 6661176407399442843} 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: 9141048243282579207} - - {fileID: 9141048243789896319} - - {fileID: 9141048243489010885} - - {fileID: 9141048242982397071} - m_Father: {fileID: 260959342094440866} + - {fileID: 2393060084093789522} + - {fileID: 2393060084600844330} + - {fileID: 2393060084299882128} + - {fileID: 2393060083793530586} + m_Father: {fileID: 6661176406092379127} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} @@ -677,13 +707,13 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0.000024795532} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} ---- !u!114 &260959343401436099 +--- !u!114 &6661176407399442838 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959343401436110} + m_GameObject: {fileID: 6661176407399442843} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} @@ -691,13 +721,13 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 2 m_VerticalFit: 2 ---- !u!114 &260959343401436108 +--- !u!114 &6661176407399442841 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 260959343401436110} + m_GameObject: {fileID: 6661176407399442843} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} @@ -715,175 +745,28 @@ MonoBehaviour: m_Spacing: {x: 50, y: 50} m_Constraint: 1 m_ConstraintCount: 1 ---- !u!1 &1560327131859249340 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1678992152378652012} - - component: {fileID: 2959249499662305835} - - component: {fileID: 5579960751671166378} - m_Layer: 5 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1678992152378652012 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560327131859249340} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 3.7, y: 5.3, z: 1} - m_Children: [] - m_Father: {fileID: 260959342094440866} - 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: 50, y: 67} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2959249499662305835 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560327131859249340} - m_CullTransparentMesh: 1 ---- !u!114 &5579960751671166378 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1560327131859249340} - 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: 968b2ea4edc9cb44e8b83b067b92cd79, 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 &6492867945818437704 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7417715205507905038} - - component: {fileID: 4409905729573718899} - - component: {fileID: 1587867088829306877} - m_Layer: 5 - m_Name: Content_vertical - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7417715205507905038 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6492867945818437704} - 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: 7951075000641665084} - - {fileID: 7042330746678145498} - - {fileID: 6670830099476413893} - - {fileID: 7020513991146046339} - - {fileID: 15178687145597301} - m_Father: {fileID: 260959342094440866} - m_RootOrder: 1 - 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: -556} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 1} ---- !u!114 &4409905729573718899 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6492867945818437704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HorizontalFit: 0 - m_VerticalFit: 0 ---- !u!114 &1587867088829306877 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6492867945818437704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 45 - m_Right: 0 - m_Top: 40 - m_Bottom: 40 - m_ChildAlignment: 0 - m_StartCorner: 0 - m_StartAxis: 1 - m_CellSize: {x: 65, y: 65} - m_Spacing: {x: 35, y: 0} - m_Constraint: 0 - m_ConstraintCount: 1 ---- !u!1001 &1111109055714645408 +--- !u!1001 &874628547542244165 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 7417715205507905038} + m_TransformParent: {fileID: 4116106613650971739} m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 8 + objectReference: {fileID: 0} - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: EquipmentType - value: 7 + value: 6 objectReference: {fileID: 0} - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_Name - value: equipment_slot_necklet + value: equipment_slot_potion_ii objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_Pivot.x @@ -895,7 +778,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 4 objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_AnchorMax.x @@ -903,7 +786,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_AnchorMin.x @@ -911,15 +794,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 65 objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 65 objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_LocalScale.x @@ -963,12 +846,150 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 477.5 objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_AnchoredPosition.y + value: -72.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 49fddd07e72d574498e38d681c64ae4b, type: 3} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 0} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Color.a + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} +--- !u!224 &6907309526462690080 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + m_PrefabInstance: {fileID: 874628547542244165} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &5802094586366394357 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4116106613650971739} + m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: EquipmentType + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Name + value: equipment_slot_necklet + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.x + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.y + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.x + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.y + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.z + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 277.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.y + value: -72.5 + objectReference: {fileID: 0} - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 @@ -995,33 +1016,444 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &6670830099476413893 stripped +--- !u!224 &251587108048000912 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 1111109055714645408} + m_PrefabInstance: {fileID: 5802094586366394357} m_PrefabAsset: {fileID: 0} ---- !u!114 &2765389911185380650 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 1111109055714645408} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &3252577080186974746 +--- !u!1001 &7080017600250362380 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 260959343401436109} + m_TransformParent: {fileID: 4116106613650971739} m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 4 + objectReference: {fileID: 0} - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: EquipmentType + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Name + value: equipment_slot_ring + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.y value: 1 objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.x + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.y + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.x + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.y + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.z + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 77.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.y + value: -72.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 49fddd07e72d574498e38d681c64ae4b, type: 3} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 0} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Color.a + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} +--- !u!224 &3583098472670073449 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + m_PrefabInstance: {fileID: 7080017600250362380} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &7888972493924860339 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4116106613650971739} + m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: EquipmentType + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Name + value: equipment_slot_potion_i + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.x + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.y + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.x + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.y + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.z + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 377.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.y + value: -72.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 49fddd07e72d574498e38d681c64ae4b, type: 3} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 0} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Color.a + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} +--- !u!224 &4504652696978532822 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + m_PrefabInstance: {fileID: 7888972493924860339} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &7903184475144352746 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4116106613650971739} + m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: EquipmentType + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Name + value: equipment_slot_bracelet + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.x + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_SizeDelta.y + value: 65 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.x + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.y + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalScale.z + value: 1.4 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 177.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_AnchoredPosition.y + value: -72.5 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 21300000, guid: 1154e82a9799308428894b18a2472969, type: 3} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Sprite + value: + objectReference: {fileID: 0} + - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: m_Color.a + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} +--- !u!224 &4491565494541573007 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + m_PrefabInstance: {fileID: 7903184475144352746} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &8272307787122186319 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 6661176407399442840} + m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: EquipmentType + value: 2 + objectReference: {fileID: 0} - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_Name value: equipment_slot_armor @@ -1136,33 +1568,30 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &9141048243789896319 stripped +--- !u!224 &2393060084600844330 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577080186974746} + m_PrefabInstance: {fileID: 8272307787122186319} m_PrefabAsset: {fileID: 0} ---- !u!114 &299675379385184912 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577080186974746} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &3252577080998464746 +--- !u!1001 &8272307787933886143 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 260959343401436109} + m_TransformParent: {fileID: 6661176407399442840} m_Modifications: - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: EquipmentType + propertyPath: type value: 3 objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: EquipmentType + value: 4 + objectReference: {fileID: 0} - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_Name value: equipment_slot_boots @@ -1277,32 +1706,29 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &9141048242982397071 stripped +--- !u!224 &2393060083793530586 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577080998464746} + m_PrefabInstance: {fileID: 8272307787933886143} m_PrefabAsset: {fileID: 0} ---- !u!114 &299675378044996704 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577080998464746} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &3252577081494592672 +--- !u!1001 &8272307788429752053 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 260959343401436109} + m_TransformParent: {fileID: 6661176407399442840} m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: type + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: _number + value: 2 + objectReference: {fileID: 0} - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: EquipmentType - value: 4 + value: 5 objectReference: {fileID: 0} - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_Name @@ -1418,29 +1844,22 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!114 &299675377607892010 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577081494592672} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!224 &9141048243489010885 stripped +--- !u!224 &2393060084299882128 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577081494592672} + m_PrefabInstance: {fileID: 8272307788429752053} m_PrefabAsset: {fileID: 0} ---- !u!1001 &3252577081833301858 +--- !u!1001 &8272307788768775479 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: - m_TransformParent: {fileID: 260959343401436109} + m_TransformParent: {fileID: 6661176407399442840} m_Modifications: + - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} + propertyPath: EquipmentType + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} propertyPath: m_Name value: equipment_slot_helmet @@ -1555,583 +1974,8 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!114 &299675377812383720 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577081833301858} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!224 &9141048243282579207 stripped +--- !u!224 &2393060084093789522 stripped RectTransform: m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3252577081833301858} + m_PrefabInstance: {fileID: 8272307788768775479} m_PrefabAsset: {fileID: 0} ---- !u!1001 &3621912169964034495 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 7417715205507905038} - m_Modifications: - - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: EquipmentType - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Name - value: equipment_slot_bracelet - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.x - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.y - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.z - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 21300000, guid: 1154e82a9799308428894b18a2472969, type: 3} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 0} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Color.a - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &7042330746678145498 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3621912169964034495} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1965906284937926965 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3621912169964034495} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &3644853738914098150 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 7417715205507905038} - m_Modifications: - - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: EquipmentType - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Name - value: equipment_slot_ring - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.x - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.y - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.z - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 21300000, guid: 49fddd07e72d574498e38d681c64ae4b, type: 3} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 0} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Color.a - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &7020513991146046339 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3644853738914098150} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1990256364651981676 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 3644853738914098150} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &4444802124159455321 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 7417715205507905038} - m_Modifications: - - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: EquipmentType - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Name - value: equipment_slot - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.x - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.y - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.z - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 21300000, guid: 49fddd07e72d574498e38d681c64ae4b, type: 3} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 0} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Color.a - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &7951075000641665084 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 4444802124159455321} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1487537317611376851 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 4444802124159455321} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &6038504125105795344 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 7417715205507905038} - m_Modifications: - - target: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: EquipmentType - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881892, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Name - value: equipment_slot_ring - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_RootOrder - value: 4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.x - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.y - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalScale.z - value: 1.4 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 6050866944478881894, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 21300000, guid: 49fddd07e72d574498e38d681c64ae4b, type: 3} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Sprite - value: - objectReference: {fileID: 0} - - target: {fileID: 6050866944784408656, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - propertyPath: m_Color.a - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} ---- !u!224 &15178687145597301 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6050866944478881893, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 6038504125105795344} - m_PrefabAsset: {fileID: 0} ---- !u!114 &8846973155828920730 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 2957687053509197962, guid: 27d62cf80d88f774abdf05e1c1663f1c, type: 3} - m_PrefabInstance: {fileID: 6038504125105795344} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f706c6230646be46be4f61e0096060c, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Resources/UiPanels/EquipmentPanel.prefab.meta b/Assets/Resources/UiPanels/EquipmentPanel.prefab.meta new file mode 100644 index 00000000..7f51d0f9 --- /dev/null +++ b/Assets/Resources/UiPanels/EquipmentPanel.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eca52e174922c014ba37e2e8c0884dd8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefarbs/Inventory UI/inventory_slot.prefab b/Assets/Resources/UiPanels/InventoryBox.prefab similarity index 99% rename from Assets/Prefarbs/Inventory UI/inventory_slot.prefab rename to Assets/Resources/UiPanels/InventoryBox.prefab index 84ce3da7..f40d340a 100644 --- a/Assets/Prefarbs/Inventory UI/inventory_slot.prefab +++ b/Assets/Resources/UiPanels/InventoryBox.prefab @@ -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 diff --git a/Assets/Prefarbs/Inventory UI/inventory_slot.prefab.meta b/Assets/Resources/UiPanels/InventoryBox.prefab.meta similarity index 100% rename from Assets/Prefarbs/Inventory UI/inventory_slot.prefab.meta rename to Assets/Resources/UiPanels/InventoryBox.prefab.meta diff --git a/Assets/Prefarbs/Inventory UI/inventory_panel.prefab b/Assets/Resources/UiPanels/InventoryPanel.prefab similarity index 79% rename from Assets/Prefarbs/Inventory UI/inventory_panel.prefab rename to Assets/Resources/UiPanels/InventoryPanel.prefab index 3fdcdabb..690a3219 100644 --- a/Assets/Prefarbs/Inventory UI/inventory_panel.prefab +++ b/Assets/Resources/UiPanels/InventoryPanel.prefab @@ -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} diff --git a/Assets/Prefarbs/Inventory UI/inventory_panel.prefab.meta b/Assets/Resources/UiPanels/InventoryPanel.prefab.meta similarity index 100% rename from Assets/Prefarbs/Inventory UI/inventory_panel.prefab.meta rename to Assets/Resources/UiPanels/InventoryPanel.prefab.meta diff --git a/Assets/Resources/UiPanels/TaskBox.prefab b/Assets/Resources/UiPanels/TaskBox.prefab new file mode 100644 index 00000000..eb1dc681 --- /dev/null +++ b/Assets/Resources/UiPanels/TaskBox.prefab @@ -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 diff --git a/Assets/Resources/UiPanels/TaskBox.prefab.meta b/Assets/Resources/UiPanels/TaskBox.prefab.meta new file mode 100644 index 00000000..ea8d0d6b --- /dev/null +++ b/Assets/Resources/UiPanels/TaskBox.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1cd878accdd121744a3a4829d9bc910f +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UiPanels/TaskPanel.prefab b/Assets/Resources/UiPanels/TaskPanel.prefab new file mode 100644 index 00000000..ad0a4d6f --- /dev/null +++ b/Assets/Resources/UiPanels/TaskPanel.prefab @@ -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 diff --git a/Assets/Resources/UiPanels/TaskPanel.prefab.meta b/Assets/Resources/UiPanels/TaskPanel.prefab.meta new file mode 100644 index 00000000..cc05d7a0 --- /dev/null +++ b/Assets/Resources/UiPanels/TaskPanel.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1878952481d1cf74bb217849e5b3fca8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Chest/ChestController.cs b/Assets/Scripts/Chest/ChestController.cs deleted file mode 100644 index 156edf00..00000000 --- a/Assets/Scripts/Chest/ChestController.cs +++ /dev/null @@ -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 developerList = new List(); // 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(); - 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().Setup(gameObject, _items); - } - } - // WARNING - // DANGER - functon override position which may be not free - - /// - /// Function for placed item in inventory on SPECYFIC position - /// Used by SceneInventoryManager for load saved items on their positions - /// - - // 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); - } -} diff --git a/Assets/Scripts/Chest/ChestPanelController.cs b/Assets/Scripts/Chest/ChestPanelController.cs deleted file mode 100644 index 4f781678..00000000 --- a/Assets/Scripts/Chest/ChestPanelController.cs +++ /dev/null @@ -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().ClosePanel(); - } - } - - public void Setup(GameObject _chest, Dictionary _chestItems) - { - _instance = _chest; - - base.Setup(_chestItems); - } - - protected override ISlot SetupSlot(int key, GameObject _parent) - { - ChestSlot _tmpSlot = Instantiate(_blankSlot, _parent.transform.position, Quaternion.identity).GetComponent(); - - _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; - // } - // } -} diff --git a/Assets/Scripts/DoorBehaviour.cs b/Assets/Scripts/DoorBehaviour.cs index f6e4f19c..54e8e31c 100644 --- a/Assets/Scripts/DoorBehaviour.cs +++ b/Assets/Scripts/DoorBehaviour.cs @@ -39,6 +39,12 @@ public class DoorBehaviour : MonoBehaviour SaveController.GetComponent().SaveQuests(); SaveController.GetComponent().SaveInventory(); SaveController.GetComponent().SaveHealth(); + + // 1. Save all befor change scene + // SaveController.GetComponent().SaveItems(); + SaveController.GetComponent().SaveQuests(); + // SaveController.GetComponent().SaveInventory(); + // 2. Change scene SceneManager.LoadScene(gateway.nextMapName); } diff --git a/Assets/Scripts/DoorBehaviour.cs.meta b/Assets/Scripts/DoorBehaviour.cs.meta index 48e3176b..94a38ab5 100644 --- a/Assets/Scripts/DoorBehaviour.cs.meta +++ b/Assets/Scripts/DoorBehaviour.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d7edafbad889ba34e9aae593d927c3a5 +guid: 754d016cd82f48f408221e1d4f04a31a MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/Equipment/EquipmentManager.cs b/Assets/Scripts/Equipment/EquipmentManager.cs deleted file mode 100644 index 10063d5b..00000000 --- a/Assets/Scripts/Equipment/EquipmentManager.cs +++ /dev/null @@ -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 equipment; - - private void Awake() - { - if(Instance == null) - { - Instance = this; - - equipment = new Dictionary() { - { 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().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; - } - } - } -} diff --git a/Assets/Scripts/Equipment/EquipmentPanelController.cs b/Assets/Scripts/Equipment/EquipmentPanelController.cs deleted file mode 100644 index caddc4e0..00000000 --- a/Assets/Scripts/Equipment/EquipmentPanelController.cs +++ /dev/null @@ -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 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() { - { 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().ClosePanel(); - Destroy(gameObject); // destroy panel - } - } - } - - public override void CloseOnClick() - { - Destroy(gameObject); // destroy panel - GameObject panel = FindObjectOfType()?.gameObject; - if(panel != null) Destroy(panel); - FindObjectOfType()?.ClosePanel(); - - - if(_instance) - { - _instance.GetComponent().ClosePanel(); - } - } - - public void Setup(GameObject _equipment, Dictionary _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; - } - -} diff --git a/Assets/Scripts/Inventory/InventoryManager.cs b/Assets/Scripts/Inventory/InventoryManager.cs deleted file mode 100644 index 3326f420..00000000 --- a/Assets/Scripts/Inventory/InventoryManager.cs +++ /dev/null @@ -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 - /// Function for placed item in inventory on SPECYFIC position - /// Used by SceneInventoryManager for load saved items on their positions - /// - public void SetupItemInInventory(int key, EquippableItem pickable) - { - this._items[key] = pickable; - } - - protected override void SetupPanel() - { - if(this.dynamicPanel) - { - this.dynamicPanel.GetComponent().Setup(gameObject, _items); - } - } - - - // public void DropItem() - // { - - // } -} diff --git a/Assets/Scripts/Inventory/InventoryManager.cs.meta b/Assets/Scripts/Inventory/InventoryManager.cs.meta deleted file mode 100644 index 1f57da92..00000000 --- a/Assets/Scripts/Inventory/InventoryManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7610fa3cdda79614e94110dd314fbfed -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Inventory/InventoryPanelController.cs b/Assets/Scripts/Inventory/InventoryPanelController.cs deleted file mode 100644 index f3ec8dd0..00000000 --- a/Assets/Scripts/Inventory/InventoryPanelController.cs +++ /dev/null @@ -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()?.gameObject; - if(panel != null) Destroy(panel); - GameObject.FindObjectOfType()?.ClosePanel(); - InventoryManager.Instance.GetComponent().ClosePanel(); - } - - public void Setup(GameObject _inventory, Dictionary _items) - { - _instance = _inventory; - - base.Setup(_items); - } - - void Update() - { - if (Input.GetKeyDown("i")) - { - Destroy(gameObject); // destroy panel - - InventoryManager.Instance.GetComponent().ClosePanel(); - } - } - - protected override ISlot SetupSlot(int key, GameObject _parent) - { - InventorySlot _tmpSlot = Instantiate(_blankSlot, _parent.transform.position, Quaternion.identity).GetComponent(); - _tmpSlot.transform.SetParent(_parent.transform); - - _tmpSlot.SetupSlot(key, null, this); - - return _tmpSlot; - } - - // public void Drop(ItemSlot 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().SetItemOnPosition(draggedSlot.Number, draggedSlot.Item); - // _inventory.GetComponent().SetItemOnPosition(dropItemSlot.Number, dropItemSlot.Item); - // } - // } - -} diff --git a/Assets/Scripts/Item/EquippableItem.cs b/Assets/Scripts/Item/EquippableItem.cs deleted file mode 100644 index da08f7c7..00000000 --- a/Assets/Scripts/Item/EquippableItem.cs +++ /dev/null @@ -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) - { - } -} diff --git a/Assets/Scripts/Item/PickableController.cs b/Assets/Scripts/Item/PickableController.cs index b8bd37d2..2317aa32 100644 --- a/Assets/Scripts/Item/PickableController.cs +++ b/Assets/Scripts/Item/PickableController.cs @@ -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") { diff --git a/Assets/Scripts/NPCs' Scripts/NPCDialogue.cs b/Assets/Scripts/NPCs' Scripts/NPCDialogue.cs index 08fccfbf..bfc55475 100644 --- a/Assets/Scripts/NPCs' Scripts/NPCDialogue.cs +++ b/Assets/Scripts/NPCs' Scripts/NPCDialogue.cs @@ -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())) { 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())) { FinishQuestPanel.SetActive(true); @@ -310,7 +310,7 @@ public class NPCDialogue : MonoBehaviour // 1. Add task to palyer quests list Task myTask = gameObject.GetComponent().AcceptTask(); - TaskManager.Instance.AddTask(myTask); + TaskUIManager.Instance.Add(myTask); // 2. Drop Axe On Map gameObject.GetComponent().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; diff --git a/Assets/Scripts/NPCs' Scripts/NPCQuest.cs b/Assets/Scripts/NPCs' Scripts/NPCQuest.cs index ef1022c9..ac5cabc0 100644 --- a/Assets/Scripts/NPCs' Scripts/NPCQuest.cs +++ b/Assets/Scripts/NPCs' Scripts/NPCQuest.cs @@ -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 diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs index 62ce55b2..1fcc8915 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -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); diff --git a/Assets/Scripts/REFACTORING.meta b/Assets/Scripts/REFACTORING.meta new file mode 100644 index 00000000..a98c20ce --- /dev/null +++ b/Assets/Scripts/REFACTORING.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 73c868471f0c43479d69afc446536d8b +timeCreated: 1660171705 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application.meta b/Assets/Scripts/REFACTORING/Application.meta new file mode 100644 index 00000000..67e78205 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f7b6c099a5334c44b977899871b4a61a +timeCreated: 1660483312 \ No newline at end of file diff --git a/Assets/Scripts/Chest.meta b/Assets/Scripts/REFACTORING/Application/Chest.meta similarity index 77% rename from Assets/Scripts/Chest.meta rename to Assets/Scripts/REFACTORING/Application/Chest.meta index b09fcec1..a9b29aad 100644 --- a/Assets/Scripts/Chest.meta +++ b/Assets/Scripts/REFACTORING/Application/Chest.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c7042c6d06a175543b01bd0e9d316f53 +guid: 888d1783775092f48b15c03485e1562a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/REFACTORING/Application/Chest/ChestController.cs b/Assets/Scripts/REFACTORING/Application/Chest/ChestController.cs new file mode 100644 index 00000000..727057da --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Chest/ChestController.cs @@ -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(); + } + } +} diff --git a/Assets/Scripts/Chest/ChestController.cs.meta b/Assets/Scripts/REFACTORING/Application/Chest/ChestController.cs.meta similarity index 83% rename from Assets/Scripts/Chest/ChestController.cs.meta rename to Assets/Scripts/REFACTORING/Application/Chest/ChestController.cs.meta index 80857311..d967306d 100644 --- a/Assets/Scripts/Chest/ChestController.cs.meta +++ b/Assets/Scripts/REFACTORING/Application/Chest/ChestController.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 26a44ba4cba1985408fca11ba424361c +guid: a532f2b712a01fc4fad02346f1a69e39 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Application/Chest/SceneChestBuilder.cs b/Assets/Scripts/REFACTORING/Application/Chest/SceneChestBuilder.cs new file mode 100644 index 00000000..33a698eb --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Chest/SceneChestBuilder.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections; +using UnityEngine; + +[Serializable] +public class SceneChestBuilder : SceneObjectBuilder +{ + [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(MODEL_SOURCE_PATH + modelName); + + if (!resource) + throw new System.Exception($"Resource {MODEL_SOURCE_PATH + modelName} not found!!"); + + return resource; + } +} diff --git a/Assets/Scripts/Equipment/EquipmentManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Chest/SceneChestBuilder.cs.meta similarity index 83% rename from Assets/Scripts/Equipment/EquipmentManager.cs.meta rename to Assets/Scripts/REFACTORING/Application/Chest/SceneChestBuilder.cs.meta index 815fb66a..0cc1761b 100644 --- a/Assets/Scripts/Equipment/EquipmentManager.cs.meta +++ b/Assets/Scripts/REFACTORING/Application/Chest/SceneChestBuilder.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0ba28abf0f2ebba45a0f7743b05d08d9 +guid: 3db499bc88166ac409489e99ce706c8d MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Application/Panel.meta b/Assets/Scripts/REFACTORING/Application/Panel.meta new file mode 100644 index 00000000..e8f8afb3 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 925cd94b992c46259a205c12a9a3b969 +timeCreated: 1660171743 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest.meta b/Assets/Scripts/REFACTORING/Application/Panel/Chest.meta new file mode 100644 index 00000000..9e36e78e --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 546db8cdadd345c6a364ed0e1a58c4b7 +timeCreated: 1660488534 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/ChestDataListManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Chest/ChestDataListManager.cs new file mode 100644 index 00000000..9e575c69 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/ChestDataListManager.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using System.Collections.Generic; + +public class ChestDataListManager : DataListManager // or maybe EquippableItem - but its get conflicts... +{ + [SerializeField] protected new ChestUIManager uiManager; + + public new DataListManager 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 +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/ChestDataListManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Chest/ChestDataListManager.cs.meta new file mode 100644 index 00000000..eef5e2fb --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/ChestDataListManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8b07ed99c7ae4d07bb7201c51459dce0 +timeCreated: 1660488551 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/SaveChestManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SaveChestManager.cs new file mode 100644 index 00000000..ce5aa603 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SaveChestManager.cs @@ -0,0 +1,99 @@ +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; +using UnityEngine; + +public class SaveChestManager : SaveModelSystem +{ + public override bool SaveModelItem(ChestPrefabAsset model) + { + return base.SaveModelItem(model); + } + + public override bool SaveModelList(List 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 LoadModelList() + { + string path = Path + GetFileName(ObjectListName); + + if (File.Exists(path)) + { + BinaryFormatter formatter = new BinaryFormatter(); + FileStream stream = new FileStream(path, FileMode.Open); + + List questsList = formatter.Deserialize(stream) as List; + stream.Close(); + + return ConvertListOfDataModelsToListOfObject(questsList); + } + else + { + Debug.Log("Save file not found in " + path); + } + + return new List(); + } + + // Support function + + // 1. From model to data format + private ChestPrefabAssetData ConvertObjectToDataModel(ChestPrefabAsset model) + { + return new ChestPrefabAssetData(model); + } + + private List ConvertObjectsListToListOfDataModels(List modelsList) + { + List convertedList = new List(); + + 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 ConvertListOfDataModelsToListOfObject(List dataModelsList) + { + List convertedList = new List(); + + foreach (ChestPrefabAssetData dataModel in dataModelsList) + { + convertedList.Add(ConvertDataModelToObject(dataModel)); + } + + return convertedList; + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/SaveChestManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SaveChestManager.cs.meta new file mode 100644 index 00000000..48c01ad8 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SaveChestManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 33ba3be2d80a64440ac0f48c05695285 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataLoader.cs b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataLoader.cs new file mode 100644 index 00000000..0c92f084 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataLoader.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public class SceneChestDataLoader : SceneBaseDataLoader +{ + 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 equippableItemsList = SaveInventorySystem.LoadInventoryItemsList(this.ItemsListName); + + // itemEntry.Value.MapDataToObject() - map data format to object + + // save object + foreach(KeyValuePair 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' to 'Dictionary' + Dictionary mappedList = new Dictionary(); + + foreach(KeyValuePair 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 LoadStaticData() { throw new System.NotImplementedException(); } + + protected override List LoadDynamicData() + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().WithMap(CurrentMap).WithDataType(SceneElementTypeEnum.Dynamic).GetString(); + + return SaveModelSystem.LoadModelList(); + } + + protected override bool SaveStaticData(List _elements) { throw new System.NotImplementedException(); } + + protected override bool SaveDynamicData(List _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 LoadGenericData() { throw new NotImplementedException(); } + + protected override bool SaveGenericData(List _elements) { throw new NotImplementedException(); } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataLoader.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataLoader.cs.meta new file mode 100644 index 00000000..7703b350 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataLoader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d3926d80a4de1b7449f0346556a1b07d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataManager.cs new file mode 100644 index 00000000..a73a0599 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataManager.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class SceneChestDataManager : SceneBaseDataManager +{ + protected override string OBJECT_FOLDER_NAME { get { return "Chest"; } } + protected override string OBJECT_LIST_NAME { get { return "ChestList"; } } + + //protected new SceneBaseDataLoader DataLoader { get; set; } + protected SceneChestBuilder ChestBuilder { get; set; } + + + + [SerializeField] Chest CurrentChest; + + [SerializeField] public List ElementsToBuildOnSceneList = new List(); + + + [SerializeField] List convertDataToAsset = new List(); + + + // 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 tmp = new List(); + foreach (ChestPrefabAsset asset in ChestBuilder.ElementsToBuildOnSceneList) { tmp.Add(asset.Chest); } + + chestManager.SetList(tmp); + } + else + { + LoadDynamicData(); + + ChestBuilder.ElementsToBuildOnSceneList = DynamicDataList.GetList(); + ChestBuilder.BuildList(); + + List tmp = new List(); + 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 GetObjectType() + { + return GameObject.FindObjectOfType(); + } + + protected SceneBaseDataManager CreateInstance(ref GameObject managerGameObject) + { + return managerGameObject.AddComponent(); + } + + + // 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 + +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataManager.cs.meta new file mode 100644 index 00000000..a672e860 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Chest/SceneChestDataManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0b2d7931c00ea64eb1da159de0455e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Equipment.meta b/Assets/Scripts/REFACTORING/Application/Panel/Equipment.meta similarity index 77% rename from Assets/Scripts/Equipment.meta rename to Assets/Scripts/REFACTORING/Application/Panel/Equipment.meta index 4720d441..885017b7 100644 --- a/Assets/Scripts/Equipment.meta +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4e66e807c2717ee45923ec12b22309d0 +guid: d0d5e0b950ca6424a96910337a7f6325 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataListManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataListManager.cs new file mode 100644 index 00000000..eece5cfa --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataListManager.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +public class EquipmentDataListManager : DataListManager> +{ + public new DataListManager> SetUiManager(ref EquipmentUIManager _uiManager) + { + uiManager = _uiManager; + + return this; + } + + /// + /// Function to init equipment list + /// We should init this before each operation on equipment + /// + /// + public List> InitEquipment() + { + List> convertedList = new List>(); + + foreach (EquipmentPanelSlotsTypeEnum emptyElement in Enum.GetValues(typeof(EquipmentPanelSlotsTypeEnum))) { convertedList.Add(new IndexValuePair((int)emptyElement, null)); } + + return convertedList; + } + + public override void AddElementToList(IndexValuePair newElement) + { + Elements + .Where(equipment => equipment.Key == newElement.Key) + .ToList() + .ForEach(equipment => equipment.Value = newElement.Value); + + } + + public override void RemoveElementFromList(IndexValuePair element) + { + Elements + .Where(equipment => equipment.Key == element.Key) + .ToList() + .ForEach(equipment => equipment.Value = null); + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataListManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataListManager.cs.meta new file mode 100644 index 00000000..958a7ac8 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataListManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9d53e77851b9a5e47bdc923549ae2993 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataLoader.cs b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataLoader.cs new file mode 100644 index 00000000..1a51b4f7 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataLoader.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public class EquipmentDataLoader : SceneBaseDataLoader> +{ + public EquipmentDataLoader(string _objectListName, string _objectFolderName) + { + SaveModelSystem = new SaveEquipmentManager(); + SaveModelSystem.ObjectFolderName = _objectFolderName; + SaveModelSystem.ObjectListName = _objectListName; + } + + protected override List> LoadGenericData() + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + return SaveModelSystem.LoadModelList(); + } + + protected override bool SaveGenericData(List> _elements) + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + try + { + SaveModelSystem.SaveModelList(_elements); + + return true; + } + catch (Exception e) { Debug.LogError(e.Message); } + + return false; + } + + + + protected override List> LoadDynamicData() + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + return SaveModelSystem.LoadModelList(); + } + + protected override List> LoadStaticData(){ throw new System.NotImplementedException(); } + + protected override bool SaveDynamicData(List> _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> _elements) { throw new System.NotImplementedException(); } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataLoader.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataLoader.cs.meta new file mode 100644 index 00000000..cd57dcd8 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataLoader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 25443d561c199cd4ba9ee3b0aeea1014 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataManager.cs new file mode 100644 index 00000000..3c233f20 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataManager.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public class EquipmentDataManager : SceneBaseDataManager> +{ + protected override string OBJECT_FOLDER_NAME { get { return "Equipment"; } } + protected override string OBJECT_LIST_NAME { get { return "EquipmentList"; } } + + protected new SceneBaseDataLoader> 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> dataListManager) + { + try + { + // 1. Convert EquippableItemPrefabAsset to EquippableItem list + List> convertedList = new List>(); + + foreach (IndexValuePair loadedEquippableItemPrefarbAssetElement in (List>)DataLoader.LoadData(type)) + { + if(loadedEquippableItemPrefarbAssetElement.Value != null) + convertedList.Add(new IndexValuePair((int)loadedEquippableItemPrefarbAssetElement.Key, (EquippableItem)loadedEquippableItemPrefarbAssetElement.Value.EquippableItem)); + else + convertedList.Add(new IndexValuePair((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> _elements, SceneElementTypeEnum type) + { + try + { + // 1. Convert EquippableItem to EquippableItemPrefabAsset list + List> convertedList = new List>(); + + foreach (IndexValuePair itemElement in _elements) + { + if(itemElement.Value) + convertedList.Add(new IndexValuePair( + (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)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> GetObjectType() + { + return GameObject.FindObjectOfType(); + } + + protected SceneBaseDataManager> CreateInstance(ref GameObject managerGameObject) + { + return managerGameObject.AddComponent(); + } + + public override bool SaveDynamicData() + { + Debug.Log("SaveDynamicData"); + // tem approach + DynamicDataList.SetList(EquipmentUIManager.Instance.GetList()); + + return base.SaveDynamicData(); + } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataManager.cs.meta new file mode 100644 index 00000000..278506fd --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/EquipmentDataManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1126efb434c50f446b49891f5584c786 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/SaveEquipmentManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/SaveEquipmentManager.cs new file mode 100644 index 00000000..a934744d --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/SaveEquipmentManager.cs @@ -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> +{ + public override bool SaveModelItem(IndexValuePair model) + { + return base.SaveModelItem(model); + } + + public override bool SaveModelList(List> 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 LoadModelItem() + { + return base.LoadModelItem(); + } + + public override List> LoadModelList() + { + string path = Path + GetFileName(ObjectListName); + + if (File.Exists(path)) + { + BinaryFormatter formatter = new BinaryFormatter(); + FileStream stream = new FileStream(path, FileMode.Open); + + List> euipmentList = formatter.Deserialize(stream) as List>; + stream.Close(); + + return ConvertListOfDataModelsToListOfObject(euipmentList); + } + else + { + Debug.Log("Save file not found in " + path); + } + + return new List>(); + } + + // Support function + + // 1. From model to data format + private IndexValuePair ConvertObjectToDataModel(IndexValuePair model) + { + if (model.Value != null) + return new IndexValuePair(model.Key, new EquippableItemPrefabAssetData(model.Value)); + else + return new IndexValuePair(model.Key, null); + + } + + private List> ConvertObjectsListToListOfDataModels(List> modelsList) + { + // 1. prepare list with all slot possibiliteies + List> convertedList = GetEmptyListOfEquipmentSlotsPrefabData(); + + // 2. Assign values + foreach (IndexValuePair model in modelsList) + { + convertedList.RemoveAll(slot => slot.Key == model.Key); + convertedList.Add(ConvertObjectToDataModel(model)); + } + + return convertedList; + } + + // 2. From data to model format + private IndexValuePair ConvertDataModelToObject(IndexValuePair dataModel) + { + if(dataModel.Value != null) + return new IndexValuePair(dataModel.Key, (EquippableItemPrefabAsset)dataModel.Value.MapDataToPrefabAssetModel()); + else + return new IndexValuePair(dataModel.Key, null); + } + + private List> ConvertListOfDataModelsToListOfObject(List> dataModelsList) + { + // 1. prepare list with all slot possibiliteies + List> convertedList = GetEmptyListOfEquipmentSlotsPrefab(); + + // 2. Assign values + foreach (IndexValuePair dataModel in dataModelsList) + { + convertedList.RemoveAll(slot => slot.Key == (EquipmentPanelSlotsTypeEnum)dataModel.Key); + convertedList.Add(ConvertDataModelToObject(dataModel)); + } + + return convertedList; + } + + + // Empty list factories functions + private List> GetEmptyListOfEquipmentSlotsPrefab() + { + List> convertedList = new List>(); + + foreach (EquipmentPanelSlotsTypeEnum emptyElement in Enum.GetValues(typeof(EquipmentPanelSlotsTypeEnum))) { convertedList.Add(new IndexValuePair(emptyElement, null)); } + + return convertedList; + } + + private List> GetEmptyListOfEquipmentSlotsPrefabData() + { + List> convertedList = new List>(); + + foreach (EquipmentPanelSlotsTypeEnum emptyElement in Enum.GetValues(typeof(EquipmentPanelSlotsTypeEnum))) { convertedList.Add(new IndexValuePair(emptyElement, null)); } + + return convertedList; + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Equipment/SaveEquipmentManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/SaveEquipmentManager.cs.meta new file mode 100644 index 00000000..26f645ba --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Equipment/SaveEquipmentManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 71f06b6e41edc7c4aa8393be45e09f12 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory.meta b/Assets/Scripts/REFACTORING/Application/Panel/Inventory.meta new file mode 100644 index 00000000..531cc88b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fe46dc8c381d43eb971d9e24236d16f0 +timeCreated: 1660405143 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/InventoryDataListManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/InventoryDataListManager.cs new file mode 100644 index 00000000..459cb1df --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/InventoryDataListManager.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using UnityEngine; + +public class InventoryDataListManager : DataListManager> // or maybe EquippableItem - but its get conflicts... +{ + public new DataListManager> SetUiManager(ref InventoryUIManager _uiManager) + { + uiManager = _uiManager; + + return this; + } + + public override void AddElementToList(IndexValuePair newElement) + { + Elements.Add(newElement); + } + + public override void RemoveElementFromList(IndexValuePair element) + { + throw new System.NotImplementedException(); + } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/InventoryDataListManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/InventoryDataListManager.cs.meta new file mode 100644 index 00000000..7e3a750a --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/InventoryDataListManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c7ff03e3ec547d39ea36456237d74e5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SaveInventoryManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SaveInventoryManager.cs new file mode 100644 index 00000000..f7af7c59 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SaveInventoryManager.cs @@ -0,0 +1,99 @@ +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; +using UnityEngine; + +public class SaveInventoryManager : SaveModelSystem> +{ + public override bool SaveModelItem(IndexValuePair model) + { + return base.SaveModelItem(model); + } + + public override bool SaveModelList(List> 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 LoadModelItem() + { + return base.LoadModelItem(); + } + + public override List> LoadModelList() + { + string path = Path + GetFileName(ObjectListName); + + if (File.Exists(path)) + { + BinaryFormatter formatter = new BinaryFormatter(); + FileStream stream = new FileStream(path, FileMode.Open); + + List> questsList = formatter.Deserialize(stream) as List>; + stream.Close(); + + return ConvertListOfDataModelsToListOfObject(questsList); + } + else + { + Debug.Log("Save file not found in " + path); + } + + return new List>(); + } + + // Support function + + // 1. From model to data format + private IndexValuePair ConvertObjectToDataModel(IndexValuePair model) + { + return new IndexValuePair(model.Key, new EquippableItemPrefabAssetData(model.Value)); + } + + private List> ConvertObjectsListToListOfDataModels(List> modelsList) + { + List> convertedList = new List>(); + + foreach(IndexValuePair model in modelsList) + { + convertedList.Add(ConvertObjectToDataModel(model)); + } + + return convertedList; + } + + // 2. From data to model format + private IndexValuePair ConvertDataModelToObject(IndexValuePair dataModel) + { + return new IndexValuePair(dataModel.Key, (EquippableItemPrefabAsset)dataModel.Value.MapDataToPrefabAssetModel()); + } + + private List> ConvertListOfDataModelsToListOfObject(List> dataModelsList) + { + List> convertedList = new List>(); + + foreach (IndexValuePair dataModel in dataModelsList) + { + convertedList.Add(ConvertDataModelToObject(dataModel)); + } + + return convertedList; + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SaveInventoryManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SaveInventoryManager.cs.meta new file mode 100644 index 00000000..e3a25375 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SaveInventoryManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae3fbd7c37d1aa140a398a84afd9adb4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataLoader.cs b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataLoader.cs new file mode 100644 index 00000000..b99416a4 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataLoader.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public class SceneInventoryDataLoader : SceneBaseDataLoader> +{ + public SceneInventoryDataLoader(string _objectListName, string _objectFolderName) + { + SaveModelSystem = new SaveInventoryManager(); + SaveModelSystem.ObjectFolderName = _objectFolderName; + SaveModelSystem.ObjectListName = _objectListName; + } + + protected override List> LoadGenericData() + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + return SaveModelSystem.LoadModelList(); + } + + protected override bool SaveGenericData(List> _elements) + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + try + { + SaveModelSystem.SaveModelList(_elements); + + return true; + } + catch (Exception e) { Debug.LogError(e.Message); } + + return false; + } + + protected override List> LoadStaticData() { throw new System.NotImplementedException(); } + + protected override List> LoadDynamicData() + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + return SaveModelSystem.LoadModelList(); + } + + protected override bool SaveStaticData(List> _elements) { throw new System.NotImplementedException(); } + + protected override bool SaveDynamicData(List> _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; + } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataLoader.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataLoader.cs.meta new file mode 100644 index 00000000..5f32d88b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataLoader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: baf283801c6e7974fa09be212719ea78 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataManager.cs new file mode 100644 index 00000000..1e956575 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataManager.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class SceneInventoryDataManager : SceneBaseDataManager> +{ + protected override string OBJECT_FOLDER_NAME { get { return "Inventory"; } } + protected override string OBJECT_LIST_NAME { get { return "InventoryList"; } } + + protected new SceneBaseDataLoader> DataLoader { get; set; } + + public new static SceneBaseDataManager> Instance; // { get; private set; } + + + 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 SceneInventoryData manager"); + + //TaskUIManager.FindOrCreateInstance(); + var inventoryManager = InventoryUIManager.Instance; + + if (inventoryManager == null) + throw new NullReferenceException("InventoryUIManager not found!!!"); + + StaticDataList = (new InventoryDataListManager()).SetUiManager(ref inventoryManager); + // DynamicDataList = (new TaskDataListManager()).SetUiManager(ref taskManager); + + DataLoader = new SceneInventoryDataLoader(OBJECT_LIST_NAME, OBJECT_FOLDER_NAME); + + + //SaveData(StaticDataList.GetList(), SceneElementTypeEnum.None); + + // LoadData(SceneElementTypeEnum.None, ref StaticDataList); + // LoadDynamicData(); + + //inventoryManager.SetList(StaticDataList.GetList()); + + //inventoryManager.OpenPanel(); + } + + #region override load & save + protected override bool LoadData(SceneElementTypeEnum type, ref DataListManager> dataListManager) + { + try + { + // 1. Convert EquippableItemPrefabAsset to EquippableItem list + List> convertedList = new List>(); + + foreach(IndexValuePair loadedEquippableItemPrefarbAssetElement in (List>)DataLoader.LoadData(SceneElementTypeEnum.None)) + { + convertedList.Add(new IndexValuePair(loadedEquippableItemPrefarbAssetElement.Key, (EquippableItem)loadedEquippableItemPrefarbAssetElement.Value.EquippableItem)); + } + + // 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> _elements, SceneElementTypeEnum type) + { + try + { + // 1. Convert EquippableItem to EquippableItemPrefabAsset list + List> convertedList = new List>(); + + foreach (IndexValuePair itemElement in _elements) + { + convertedList.Add(new IndexValuePair( + itemElement.Key, + new EquippableItemPrefabAsset( + itemElement.Value.Name, + itemElement.Value.ItemModel.name, + new Vector3(0, 0, 0), + itemElement.Value + ) + )); + } + + // 2. Pass loaded list to InventoryDataManager + DataLoader.SaveData(convertedList, type); + + return true; + } + catch (Exception e) + { + Debug.LogError(e.Message); + } + + return false; + } + #endregion + + protected SceneBaseDataManager> GetObjectType() + { + return GameObject.FindObjectOfType(); + } + + protected SceneBaseDataManager> CreateInstance(ref GameObject managerGameObject) + { + return managerGameObject.AddComponent(); + } + + + // TODO whats with that +/* 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; + }*/ +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataManager.cs.meta new file mode 100644 index 00000000..ecc7d18c --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Inventory/SceneInventoryDataManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2abcc8484cbc4084baa69da81c59fc3d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task.meta b/Assets/Scripts/REFACTORING/Application/Panel/Task.meta new file mode 100644 index 00000000..58eef4e4 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: db2d46d6a30b4fce99f390ef0852d536 +timeCreated: 1660405127 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/SaveTaskManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Task/SaveTaskManager.cs new file mode 100644 index 00000000..ba40ab40 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/SaveTaskManager.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; +using UnityEngine; + +public class SaveTaskDataManager : SaveModelSystem +{ + public override bool SaveModelItem(Task model) + { + return base.SaveModelItem(model); + } + + public override bool SaveModelList(List list) + { + BinaryFormatter formatter = new BinaryFormatter(); + + Debug.Log("Saved Quest at " + Path); + + if (!Directory.Exists(Path)) Directory.CreateDirectory(Path); + + FileStream stream = new FileStream( + Path + GetFileName(ObjectListName), + FileMode.Create + ); + + formatter.Serialize(stream, list); + stream.Close(); + + return true; + } + + public override Task LoadModelItem() + { + return base.LoadModelItem(); + } + + public override List LoadModelList() + { + string path = Path + GetFileName(ObjectListName); + + if(File.Exists(path)) + { + BinaryFormatter formatter = new BinaryFormatter(); + FileStream stream = new FileStream(path, FileMode.Open); + + List questsList = formatter.Deserialize(stream) as List; + stream.Close(); + + return questsList; + } else { + Debug.Log("Save file not found in " + path); + } + + return new List(); + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/SaveTaskManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Task/SaveTaskManager.cs.meta new file mode 100644 index 00000000..00ec32e8 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/SaveTaskManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 619da76c6ff64ea280fc9781d3251ca0 +timeCreated: 1662819152 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataLoader.cs b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataLoader.cs new file mode 100644 index 00000000..b940d99f --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataLoader.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +public class SceneTaskDataLoader : SceneBaseDataLoader +{ + public SceneTaskDataLoader(string _objectListName, string _objectFolderName) + { + SaveModelSystem = new SaveTaskDataManager(); + SaveModelSystem.ObjectFolderName = _objectFolderName; + SaveModelSystem.ObjectListName = _objectListName; + } + + // public override List LoadData(SceneElementTypeEnum type) + // { + // string path = SaveSystem.GetSavePath(); + // + // if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load + // return new List(); + // + // FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles(); + // + // foreach(FileInfo file in fileInfo) + // { + // if(file.Name != ItemsListName + ".fun") + // continue; + // + // List taskList = SaveQuestSystem.LoadQuestsList(ItemsListName); + // + // foreach(Task task in taskList) + // Elements.Add(task); + // } + // + // return Elements; + // } + + // public override void SaveData(List _elements, SceneElementTypeEnum type) + // { + // // Case I - if we remember all list + // // 1) if after removed item form DynamicList is empty - remove all file + // // 2) if after removed item form DynamciList there are another one - save updated list again + // if(TaskManager.Instance.taskList.Count > 0) { + // SaveQuestSystem.SaveQuestsList(_elements, ItemsListName); + // } else { + // string _path = SaveSystem.GetSavePath() + "/" + ItemsListName + ".fun"; + // + // try + // { + // Debug.Log("File to remove: " + _path); + // + // if(File.Exists(_path)) + // { + // File.Delete(_path); + // } + // } + // catch (IOException ioExp) + // { + // Debug.LogError(ioExp.Message); + // } + // } + // + // // Case II - if we rememenber object per file + // // 1) remove specyfic file + // // + // // Unfortunatelly we don't use this way of saving items yet :D + // + // } + + protected override List LoadGenericData() + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + return SaveModelSystem.LoadModelList(); + } + + protected override bool SaveGenericData(List _elements) + { + SaveModelSystem.Path = PathBuilder.BuildSavePath().GetString(); + + try + { + SaveModelSystem.SaveModelList(_elements); + + return true; + } + catch (Exception e) { Debug.LogError(e.Message); } + + return false; + } + + protected override List LoadStaticData() { throw new System.NotImplementedException(); } + + protected override List LoadDynamicData() { throw new System.NotImplementedException(); } + + protected override bool SaveStaticData(List _elements) { throw new System.NotImplementedException(); } + + protected override bool SaveDynamicData(List _elements) { throw new System.NotImplementedException(); } + + +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataLoader.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataLoader.cs.meta new file mode 100644 index 00000000..2ea514c2 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataLoader.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 719120390a134f03829928aa42f144c9 +timeCreated: 1660503812 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs new file mode 100644 index 00000000..6b1532b0 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs @@ -0,0 +1,41 @@ +using System; +using UnityEngine; + +public class SceneTaskDataManager : SceneBaseDataManager +{ + protected override string OBJECT_FOLDER_NAME { get { return "Quest"; } } + protected override string OBJECT_LIST_NAME { get { return "QuestsList"; } } + + private void Start() + { + Debug.Log("Start SceneTaskdata manager"); + + //TaskUIManager.FindOrCreateInstance(); + var taskManager = TaskUIManager.Instance; + + if (taskManager == null) + throw new NullReferenceException("TaskUIManager not found!!!"); + + StaticDataList = (new TaskDataListManager()).SetUiManager(ref taskManager); + // DynamicDataList = (new TaskDataListManager()).SetUiManager(ref taskManager); + + DataLoader = new SceneTaskDataLoader(OBJECT_LIST_NAME, OBJECT_FOLDER_NAME); + + // taskManager.SetList(); + //SaveData(taskManager.GetList(), SceneElementTypeEnum.None); + + + //LoadData(SceneElementTypeEnum.None, ref StaticDataList); + //taskManager.SetList(StaticDataList.GetList()); + } + + protected SceneBaseDataManager GetObjectType() + { + return GameObject.FindObjectOfType(); + } + + protected SceneBaseDataManager CreateInstance(ref GameObject managerGameObject) + { + return managerGameObject.AddComponent(); + } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs.meta new file mode 100644 index 00000000..4b983cde --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/SceneTaskDataManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 696dabb3bc014c2181a73c86e59506cb +timeCreated: 1660406543 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/TaskDataListManager.cs b/Assets/Scripts/REFACTORING/Application/Panel/Task/TaskDataListManager.cs new file mode 100644 index 00000000..2db928ed --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/TaskDataListManager.cs @@ -0,0 +1,23 @@ +using UnityEngine; + +public class TaskDataListManager : DataListManager +{ + [SerializeField] protected new TaskUIManager uiManager; + + public new DataListManager SetUiManager(ref TaskUIManager _uiManager) + { + uiManager = _uiManager; + + return this; + } + + public override void AddElementToList(Task newElement) + { + throw new System.NotImplementedException(); + } + + public override void RemoveElementFromList(Task element) + { + throw new System.NotImplementedException(); + } +} diff --git a/Assets/Scripts/REFACTORING/Application/Panel/Task/TaskDataListManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Panel/Task/TaskDataListManager.cs.meta new file mode 100644 index 00000000..c1ba7da5 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Panel/Task/TaskDataListManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3d3827a1d6324de6addcd5e444bbee9f +timeCreated: 1660405164 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared.meta b/Assets/Scripts/REFACTORING/Application/Shared.meta new file mode 100644 index 00000000..88ea121d --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c947e46e1d604351adf547f0d75360e4 +timeCreated: 1660164696 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager.meta new file mode 100644 index 00000000..0e9157ae --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 14f9e76ffa2443ce8dcf555c7cf3d04e +timeCreated: 1660165914 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable.meta new file mode 100644 index 00000000..1dde6031 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e3aa9c4c1601f994a96a35cc82056750 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilder.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilder.cs new file mode 100644 index 00000000..9c93d625 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilder.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public abstract class SceneObjectBuilder : MonoBehaviour, SceneObjectBuilderInterface +{ + protected virtual string MODEL_SOURCE_PATH => ""; + + /// + /// List of chests deffaultly builded on scene + /// + [SerializeField] public List ElementsToBuildOnSceneList = new List(); + + public virtual void BuildList() + { + foreach(var objectToBuild in ElementsToBuildOnSceneList) + { + Build(objectToBuild); + } + } + + public abstract void Build(V objectToBuild); + + public abstract GameObject FindModel(string modelName); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilder.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilder.cs.meta new file mode 100644 index 00000000..57540c45 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 212b939253830f7418846dd9d0413307 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilderInterface.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilderInterface.cs new file mode 100644 index 00000000..d566cc3b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilderInterface.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public interface SceneObjectBuilderInterface +{ + /// + /// Function to find object's model in resources + /// + /// + public GameObject FindModel(string modelName); + + public void BuildList(); + public void Build(T objectToBuild); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilderInterface.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilderInterface.cs.meta new file mode 100644 index 00000000..96745d5c --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Buildable/SceneObjectBuilderInterface.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8679df969e936794c90b5dd15c067620 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/DataListManager.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/DataListManager.cs new file mode 100644 index 00000000..9402b663 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/DataListManager.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using UnityEngine; + +public abstract class DataListManager : SceneDataListManagerInterface +{ + [SerializeField] protected List Elements = new List(); + [SerializeField] protected UIBaseManager uiManager; + + /// + /// Pass ref to global instance of class + /// + /// + public DataListManager SetUiManager(ref UIBaseManager _uiManager) + { + uiManager = _uiManager; + + return this; + } + + public List GetList() + { + return Elements; + } + + public void SetList(List _elements) + { + Elements = _elements; + } + + public abstract void AddElementToList(T newElement); + + public abstract void RemoveElementFromList(T element); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/DataListManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/DataListManager.cs.meta new file mode 100644 index 00000000..efc3ed16 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/DataListManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8e99a0ad506941feaae39ce411792be3 +timeCreated: 1660401804 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel.meta new file mode 100644 index 00000000..43b4af3b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 77ed1a571d1643f1993ccef6284861fd +timeCreated: 1660166978 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataLoader.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataLoader.cs new file mode 100644 index 00000000..0e7ae698 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataLoader.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.SceneManagement; + +public abstract class SceneBaseDataLoader : SceneDataLoaderInterface +{ + protected SaveModelSystem SaveModelSystem; + protected PathBuilder PathBuilder; + + protected string CurrentMap; + + protected SceneBaseDataLoader() + { + PathBuilder = new PathBuilder(); + + CurrentMap = SceneManager.GetActiveScene().name; + } + + public List LoadData(SceneElementTypeEnum type) + { + switch (type) + { + case SceneElementTypeEnum.None: + { + return LoadGenericData(); + } + case SceneElementTypeEnum.Static: + { + return LoadStaticData(); + } + case SceneElementTypeEnum.Dynamic: + { + return LoadDynamicData(); + } + default: // for SceneElementTypeEnum.All + { + Debug.Log("Handle All case..."); + + return new List(); + } + } + } + + public bool SaveData(List _elements, SceneElementTypeEnum type) + { + switch (type) + { + case SceneElementTypeEnum.None: + { + return SaveGenericData(_elements); + } + case SceneElementTypeEnum.Static: + { + return SaveStaticData(_elements); + } + case SceneElementTypeEnum.Dynamic: + { + return SaveDynamicData(_elements); + } + default: // for SceneElementTypeEnum.All + { + Debug.Log("Handle All case..."); + + return true; + } + } + } + + + protected abstract List LoadStaticData(); + protected abstract List LoadDynamicData(); + protected abstract List LoadGenericData(); + + protected abstract bool SaveStaticData(List _elements); + protected abstract bool SaveDynamicData(List _elements); + protected abstract bool SaveGenericData(List _elements); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataLoader.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataLoader.cs.meta new file mode 100644 index 00000000..e6700383 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataLoader.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 034018ef5e8e4e87981ec92fb3addb17 +timeCreated: 1660677467 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataManager.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataManager.cs new file mode 100644 index 00000000..b5125176 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataManager.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +/*where T : Task*/ +public abstract class SceneBaseDataManager : MonoBehaviour +{ + protected virtual string OBJECT_FOLDER_NAME => ""; + protected virtual string OBJECT_LIST_NAME => ""; + + protected bool IsNewGame = true; // change to use global "gateway" + + protected DataListManager StaticDataList; + protected DataListManager DynamicDataList; + + protected SceneBaseDataLoader DataLoader { get; set; } + + public static SceneBaseDataManager Instance; // { get; private set; } + + public virtual void Awake() + { + if (Instance == null) + { + Debug.Log("Create: "+gameObject); + + Instance = this; + } + else + { + Debug.Log(Instance); + Debug.LogError(gameObject); + Destroy(gameObject); + } + } + + protected static SceneBaseDataManager GetObjectType() + { + return GameObject.FindObjectOfType>(); + } + + protected static SceneBaseDataManager CreateInstance() + { + var managerGameObject = HandleManagerOnScene(); + + if (!managerGameObject) + throw new Exception("Game object to srote Managers scripts not found on scene!!!"); + + return managerGameObject.AddComponent>(); + } + + /// + /// Function to handel GLOBAL manager object from scene + /// + /// + protected static GameObject HandleManagerOnScene() + { + return GameObject.FindGameObjectWithTag("Manager").transform.Find("DataManger").gameObject; + } + + protected virtual bool LoadData(SceneElementTypeEnum type, ref DataListManager dataListManager) + { + try + { + dataListManager.SetList( + DataLoader.LoadData(type) as List + ); + + return true; + } + catch (Exception e) { + Debug.LogWarning(e.Message); + } + + return false; + } + + protected virtual bool SaveData(List _elements, SceneElementTypeEnum type) + { + try + { + DataLoader.SaveData(_elements, type); + + return true; + } + catch (Exception e) { + Debug.LogError(e.Message); + } + + return false; + } + + /// + /// Part of static list CURD methods + /// + public bool LoadStaticData() + { + return LoadData(SceneElementTypeEnum.Static, ref StaticDataList); + } + + protected virtual void AddElementToStaticList(T _element) + { + StaticDataList.AddElementToList(_element); + } + + protected virtual void RemoveElementFromStaticList(T _element) + { + StaticDataList.RemoveElementFromList(_element); + } + + public bool SaveStaticData() + { + // TODO + // how to get list + // 1. List in UI manager should be synchronized with list in this manager + + // approach: + // 1. get from outside, update local list && us it + // 2. Handle list synchronized all the time & pass local list + + Debug.Log("SaveStaticData"); + return SaveData(StaticDataList.GetList(), SceneElementTypeEnum.Static); + } + + + /// + /// Part of dynamic list CURD methods + /// + public bool LoadDynamicData() + { + return LoadData(SceneElementTypeEnum.Dynamic, ref DynamicDataList); + } + + protected virtual void AddElementToDynamicList(T _element) + { + DynamicDataList.AddElementToList(_element); + } + + protected virtual void RemoveElementFromDynamicList(T _element) + { + DynamicDataList.RemoveElementFromList(_element); + } + + public virtual bool SaveDynamicData() + { + // TODO + // how to get list + // 1. List in UI manager should be synchronized with list in this manager + + + // approach: + // 1. get from outside, update local list && us it + // 2. Handle list synchronized all the time & pass local list + return SaveData(DynamicDataList.GetList(), SceneElementTypeEnum.Dynamic); + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataManager.cs.meta new file mode 100644 index 00000000..513a45ab --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneBaseDataManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: eb0f55bac42241c08bb2070017e4cb20 +timeCreated: 1660169448 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManager.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManager.cs new file mode 100644 index 00000000..bfd6cd6d --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManager.cs @@ -0,0 +1,87 @@ +using UnityEditor; +using UnityEngine; + + +// Base class for Build method fo +// - SceneChestManager +// - SceneEquippableItemManager +public abstract class SceneDataListManager : DataListManager +{ + private readonly string gameObjectLocalization; + private readonly string assetLocalization; + + protected SceneDataListManager(string gameObjectLocalization, string assetLocalization) + { + this.gameObjectLocalization = gameObjectLocalization; + this.assetLocalization = assetLocalization; + } + + // public override void Build() + // { + // foreach(var prefabAsset in Elements) + // { + // + // GameObject newObject = (GameObject)AssetDatabase.LoadAssetAtPath(gameObjectLocalization + prefabAsset.prefarbAssetName + ".prefab", typeof(GameObject)); + // + // if(!newObject) + // { + // Debug.Log("Can't find prefarb by name " + prefabAsset.prefarbAssetName); + // break; + // } + // + // + // GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0]; + // + // if(globalGUI) + // { + // // 1. Create gameObject by handled prefab + // // 2. SetUp + // // 2.1 Set position + // GameObject _object = Instantiate(newObject, prefabAsset.position, Quaternion.identity, globalGUI.transform); + // + // // 2.2 Set name + // _object.name = prefabAsset.name; + // + // //chest.transform.SetParent(globalGUI.transform); + // // 2.3 Set pransform + // _object.transform.localScale = new Vector3(0.5f, 0.5f, 1); + // + // + // doBuild(_object); + // // // 3. SetUp EqippableItems list + // // Dictionary itemsOfChestList = prefabAsset.content; + // // + // // string[] assetNames = AssetDatabase.FindAssets("t:EquippableItem", new[] { assetLocalization }); + // // + // // foreach(KeyValuePair itemsOfChestEntry in itemsOfChestList) + // // { + // // // 3.1 find object + // // foreach (string SOName in assetNames) + // // { + // // var SOpath = AssetDatabase.GUIDToAssetPath(SOName); + // // + // // if(SOpath.Contains(itemsOfChestEntry.Value.prefarbAssetName + ".asset")) + // // { + // // // 3.2 set EquippableItem object + // // chest.GetComponent().SetupItemInChest( + // // itemsOfChestEntry.Key, + // // AssetDatabase.LoadAssetAtPath(SOpath) + // // ); + // // + // // break; + // // } + // // } + // // } + // + // + // + // + // } else { + // Debug.LogError("Can't find global GUI object!!!"); + // break; + // } + // } + // } + + protected abstract void doBuild(GameObject _object); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManager.cs.meta new file mode 100644 index 00000000..b4b846b4 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 49f6e0c5adf347168186d1d7bb1159f0 +timeCreated: 1660404506 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManagerInterface.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManagerInterface.cs new file mode 100644 index 00000000..fd32afb4 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManagerInterface.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +public interface SceneDataListManagerInterface +{ + public List GetList(); + + public void SetList(List _elements); + + public void AddElementToList(T element); + + public void RemoveElementFromList(T element); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManagerInterface.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManagerInterface.cs.meta new file mode 100644 index 00000000..0432137d --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataListManagerInterface.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7d524fbe014347b8b3c2ac74c24fb09a +timeCreated: 1660169011 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataLoaderInterface.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataLoaderInterface.cs new file mode 100644 index 00000000..cdc04d14 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataLoaderInterface.cs @@ -0,0 +1,8 @@ +using System.Collections.Generic; + +public interface SceneDataLoaderInterface +{ + public List LoadData(SceneElementTypeEnum type); + + public bool SaveData(List _elements, SceneElementTypeEnum type); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataLoaderInterface.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataLoaderInterface.cs.meta new file mode 100644 index 00000000..6ea8ee66 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/Panel/SceneDataLoaderInterface.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bc92edf0fa5e4ee4ad55c5b2569c6b19 +timeCreated: 1660169422 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI.meta new file mode 100644 index 00000000..1ca4d9df --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: eccd248bafab41d4a1ad15de7767418f +timeCreated: 1660166968 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/ManagerInterface.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/ManagerInterface.cs new file mode 100644 index 00000000..e6904869 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/ManagerInterface.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using UnityEngine; + +public interface ManagerInterface +{ + public bool OpenPanel(); + + public bool ClosePanel(); + + public void SetupPanel(); + + public List GetList(); + public void SetList(List list); + + public void Add(T model); + public void UpdateList(); + public void Remove(); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/ManagerInterface.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/ManagerInterface.cs.meta new file mode 100644 index 00000000..e4a31398 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/ManagerInterface.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0e59c6ba74b84b7a80f6380afd812c08 +timeCreated: 1660464178 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel.meta new file mode 100644 index 00000000..de4e3817 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cb2f9c4cd51c9984f994a1a8d9580371 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable.meta new file mode 100644 index 00000000..ba988928 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26415552df60a48448e65ca186d33e97 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelController.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelController.cs new file mode 100644 index 00000000..a3f667ce --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelController.cs @@ -0,0 +1,99 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using UnityEngine.UI; + +public abstract class DraggablePanelController : PanelController>, DraggablePanelInterface +{ + [SerializeField] protected new List ChildBoxList = new List(); + + protected static UIWarehouseManager _uiManager; + + protected new UIWarehouseManager UiManager + { + get + { + if (_uiManager == null) { return FetchUiManager() as UIWarehouseManager; } + + return null; + } + } + + + public ISlot SetupDragAndDropToSlot(ISlot slot) + { + slot.OnBeginDragEvent += BeginDrag; + slot.OnEndDragEvent += EndDrag; + slot.OnDragEvent += Drag; + slot.OnDropEvent += Drop; + + return slot; + } + + public void BeginDrag(ItemSlot itemSlot) + { + if (itemSlot.Item != null) + { + DraggedSlotController.Instance.CreateDraggedSlot(itemSlot, _panelContent.transform.position); + } + } + + public void Drag(ItemSlot itemSlot) + { + DraggedSlotController.Instance.UpdatePosition(Input.mousePosition); + } + + public virtual void EndDrag(ItemSlot itemSlot) + { + if (!DraggedSlotController.Instance.IsDragged()) // if there was nothing dragged - ignore event + return; + + DraggedSlotController.Instance.RemoveDraggedSlot(); + + // Rebuild/apply UiManager content (list of items) base on slots values after its updating + for (int i = 0; i < ChildBoxList.Count; i++) + { + if (ChildBoxList[i].Item != null) + { + UiManager.Add(new IndexValuePair(i, ChildBoxList[i].Item)); + } + else + { + UiManager.RemoveByPosition(i); + } + } + } + + public virtual void Drop(ItemSlot dropItemSlot) + { + if (!DraggedSlotController.Instance.IsDragged()) // if there was nothing dragged - ignore event + return; + + var draggedSlot = GetDraggedSlot(); + + if (dropItemSlot.CanReceiveItem(draggedSlot.Item) && draggedSlot.CanReceiveItem(dropItemSlot.Item)) + { + EquippableItem dragItem = draggedSlot.Item as EquippableItem; + EquippableItem dropItem = dropItemSlot.Item as EquippableItem; + + // TODO insert child criterials + + //draggedSlot.Item = (EquippableItem)new Item("test", "test desc", 1, null, null); + + EquippableItem tmpDraggedItem = draggedSlot.Item == null ? null : new EquippableItem(draggedSlot.Item); // InventoryUIManager.Instance.DraggedSlot.Item; // remember temporary currently dragged item + UiManager.Add(new IndexValuePair(dropItemSlot.Number, tmpDraggedItem)); + Debug.Log(UiManager); + // !!! remember item from dropped position to future operation !!! + if (dropItem) + DraggedSlotController.Instance.UpdateItem(new EquippableItem(dropItem)); + else + DraggedSlotController.Instance.UpdateItem(null); + } + } + + public ISlot GetDraggedSlot() + { + return DraggedSlotController.Instance.DraggedSlot; + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelController.cs.meta new file mode 100644 index 00000000..da75bba0 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 68a2f165c11561a438c59d76adceff30 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelInterface.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelInterface.cs new file mode 100644 index 00000000..0331c813 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelInterface.cs @@ -0,0 +1,23 @@ +using UnityEditor; +using UnityEngine; + +public interface DraggablePanelInterface +{ + /// + /// Function to associate defined Drag&Drop behaviour to passed slot + /// + /// + public ISlot SetupDragAndDropToSlot(ISlot slot); + + + public void BeginDrag(ItemSlot itemSlot); + + public void EndDrag(ItemSlot itemSlot); + + public void Drag(ItemSlot itemSlot); + + public void Drop(ItemSlot dropItemSlot); + + // supports function to use in Drop + public ISlot GetDraggedSlot(); +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelInterface.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelInterface.cs.meta new file mode 100644 index 00000000..ec781a10 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggablePanelInterface.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0472eb5aa2400874b98ffa373b72c07e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggedSlotController.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggedSlotController.cs new file mode 100644 index 00000000..887d0b7b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggedSlotController.cs @@ -0,0 +1,101 @@ +using System; +using UnityEditor; +using UnityEngine; +using UnityEngine.UI; + +public class DraggedSlotController : MonoBehaviour +{ + public static DraggedSlotController Instance { get; private set; } + + [Header("Dragged Image")] + [SerializeField] protected Image DraggedSlotImageTemplate; + [SerializeField] protected Image DraggedSlotImage; + + [Space] + [Header("Dragged Slot")] + [SerializeField] protected ItemSlot _draggedSlot; + public ItemSlot DraggedSlot // in Drag & Drop functionality for Warehouse set of panels I will temporary delegate dragged item to outside static object instance in order to remember it during dragging object from one slot to anothe one + { + get { return _draggedSlot; } + set + { + _draggedSlot = value; + } + } + + public void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Destroy(gameObject); + } + } + + public bool IsDragged() + { + return DraggedSlot != null; + } + + public void CreateDraggedSlot(ItemSlot itemSlot, Vector3 beginingPosition) + { + DraggedSlot = itemSlot; + + MakeDraggableItem(beginingPosition); + } + private void MakeDraggableItem(Vector3 beginingPosition) + { + if (DraggedSlotImage) + { + DraggedSlotImage.enabled = true; + + return; + } + + GameObject globalGUI = GameObject.FindGameObjectWithTag("GUI"); + + if (globalGUI) + { + DraggedSlotImage = MonoBehaviour.Instantiate(DraggedSlotImageTemplate, DraggedSlotImageTemplate.transform.position, Quaternion.identity, globalGUI.transform); + DraggedSlotImage.transform.localPosition = beginingPosition; + DraggedSlotImage.sprite = DraggedSlot.Item.Image; + DraggedSlotImage.transform.position = Input.mousePosition; + DraggedSlotImage.enabled = true; + } + else + { + Debug.Log("Can't find global GUI object!!!"); + } + } + + public void UpdatePosition(Vector3 newSlotPosition) + { + if(DraggedSlotImage != null) + DraggedSlotImage.transform.position = newSlotPosition; + } + + public bool RemoveDraggedSlot() + { + try + { + DestroyImmediate(DraggedSlotImage.gameObject, true); + DraggedSlotImage = null; + + DraggedSlot = null; + }catch(Exception e) + { + Debug.LogError(e.Message); + return false; + } + + return true; + } + + public void UpdateItem(Item item) + { + DraggedSlot.Item = (EquippableItem)item; + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggedSlotController.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggedSlotController.cs.meta new file mode 100644 index 00000000..52cf034e --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/Draggable/DraggedSlotController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8081574e3f851e4d9335be93900a94e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelController.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelController.cs new file mode 100644 index 00000000..5d2bf8dc --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelController.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +public abstract class PanelController : MonoBehaviour, PanelControllerInterface +{ + [Header("Panel Information")] + [SerializeField] protected GameObject _panelContent; + //[SerializeField] private TaskBox TaskBoxTemplate; + [SerializeField] protected GameObject ChildBoxTemplate; + [SerializeField] protected List ChildBoxList; + + /// + /// Fetch reference to static instance of UiManager script + /// + private static UIBaseManager _uiManager; + + protected UIBaseManager UiManager + { + get + { + if (_uiManager == null) { return FetchUiManager(); } + + return null; + } + } + + // TODO decide whick method use and where bind object with itself + // public abstract void Bind(ManagerInterface manager); + protected abstract UIBaseManager FetchUiManager(); + + public virtual void SetUp(List elements) + { + BuildPanelSlots(); + + BuildPanelContent(elements); + } + + public virtual void BuildPanelContent(List elements) + { + if (_panelContent == null) + throw new Exception("Panel content is not attaches"); + } + + public abstract void BuildPanelSlots(); + + public abstract GameObject BuildSlot(int key, GameObject _parent); + + public abstract void ClearSlots(); +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelController.cs.meta new file mode 100644 index 00000000..6152e2b1 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a437cb891c09a1148a9748b9858dbaf6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelControllerInterface.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelControllerInterface.cs new file mode 100644 index 00000000..9b8fa7fd --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelControllerInterface.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public interface PanelControllerInterface +{ + /// + /// Function to build panel content + /// + /// + public void SetUp(List Elements); + + /// + /// Function to build panels content template + /// + public void BuildPanelSlots(); + + /// + /// Function to create single slot inside panel + /// + /// + /// + /// + public GameObject BuildSlot(int key, GameObject _parent); + + /// + /// Function to fefill slotys with items + /// + /// + public void BuildPanelContent(List Elements); + + /// + /// Function to restore slots config to default settings + /// + public void ClearSlots(); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelControllerInterface.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelControllerInterface.cs.meta new file mode 100644 index 00000000..f5672fce --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/PanelControllerInterface.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e30588d8235c90f4fa7a53b5afd92a42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel.meta new file mode 100644 index 00000000..efe76940 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e3e28c38b9237d74eb9ac2555dea625e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel/WarehousePanelController.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel/WarehousePanelController.cs new file mode 100644 index 00000000..effaf4b5 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel/WarehousePanelController.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +public abstract class WarehousePanelController : DraggablePanelController +{ + public override void EndDrag(ItemSlot itemSlot) + { + if (!DraggedSlotController.Instance.IsDragged()) // if there was nothing dragged - ignore event + return; + + DraggedSlotController.Instance.RemoveDraggedSlot(); + + // 1. Remove from slot - for case where EndDrag and Drop work on differen UiManager's + // Important: clear slot not only reset itemn!!! + if (!itemSlot.Item) + ((ItemSlot)ChildBoxList.Where(slot => slot.Number == itemSlot.Number).First()).ResetSlot(); + else + ((ItemSlot)ChildBoxList.Where(slot => slot.Number == itemSlot.Number).First()).SetItem(itemSlot.Item); + + // 2. Rebuild/apply UiManager content (list of items) base on slots values after its updating + + // 2.1 Make copy because Add -> base.Add() -> base.Add() -> UpdateList() rebuild content ad pass "new" list (in this case with only one - firtst passed - item) to ChestContentUiMangaer.Element + var ChildBoxListCopy = new List>(ChildBoxList.Where(slot => slot.Item != null).Select(slot => new IndexValuePair(slot.Number, slot.Item)).ToList()); + + UiManager.RemoveAll(); + + foreach(IndexValuePair slot in ChildBoxListCopy) + { + if (slot.Value != null) + { + Debug.Log($"Slot nr: {slot.Key} with item: {slot.Value}"); + UiManager.Add(new IndexValuePair(slot.Key, slot.Value)); + } + else + { + UiManager.RemoveByPosition(slot.Key); + } + } + } + + public override void BuildPanelContent(List> elements) + { + base.BuildPanelContent(elements); + + ClearSlots(); + } + + public override void ClearSlots() + { + foreach (ItemSlot ChestSlot in ChildBoxList) + { + ChestSlot.ResetSlot(); + } + } + + public abstract override void BuildPanelSlots(); + public abstract override GameObject BuildSlot(int key, GameObject _parent); +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel/WarehousePanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel/WarehousePanelController.cs.meta new file mode 100644 index 00000000..67ceb10c --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/Panel/WarehousePanel/WarehousePanelController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cba22a871f952fc4ea06e8cfc81628ea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIBaseManager.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIBaseManager.cs new file mode 100644 index 00000000..c9ad475f --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIBaseManager.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public abstract class UIBaseManager : MonoBehaviour, ManagerInterface +{ + public static UIBaseManager Instance { get; protected set; } + + + [SerializeField] public GameObject DynamicPanel; + + [SerializeField] public KeyCode keyToOpen; + + /// + /// Managed objects list - most important element in module + /// + [SerializeField] protected List Elements = new List(); // { get; set; } - this block inspector + + public void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Debug.Log(gameObject); + Debug.Log(Instance); + Destroy(gameObject); + } + } + + public void Update() + { + if (Input.GetKeyDown(keyToOpen)) + { + if (!DynamicPanel) + { + this.OpenPanel(); + } + else + { + this.ClosePanel(); + } + } + } + + /// + /// Function to fetch currently opened panel asociated with this UI manager + /// + /// + public void SetPanelController(GameObject panelConrtoller) + { + // ToDo change fetched types + //DynamicPanel = dynamicPanelController; + } + + public virtual bool OpenPanel() + { + Console.WriteLine("Panel opened"); + + GameObject globalGUI = GameObject.FindGameObjectWithTag("GUI"); + + if(!globalGUI) + throw new Exception("Panel could not be opened - can't find global GUI object!!"); + + GameObject uiPanelTemplate = GetTemplatePanel(); + + DynamicPanel = GameObject.Instantiate(uiPanelTemplate, uiPanelTemplate.transform.position, Quaternion.identity, globalGUI.transform); // 4'th arg allow set object as child + + DynamicPanel.transform.localPosition = uiPanelTemplate.transform.position; // prevent overwritten position by... environment??? + + SetupPanel(); + + return true; + } + + public virtual bool ClosePanel() + { + Console.WriteLine("Panel closed"); + + try + { + Destroy(DynamicPanel); + + return true; + } catch (Exception ex) { Debug.LogError(ex.Message); } + + return true; + } + + public virtual void SetupPanel() + { + if(!DynamicPanel) + throw new Exception("Panel not found - UIBaseManager don't have UI Panel instance!!"); + + // bind this class instance + //DynamicPanel.GetComponent().Bind(this); + } + + /// + /// Function which return panel status + /// True - if panel is opened and it's instance is handled + /// false - if panel is closed and it's instance is not handled + /// + /// + public bool GetPanelStatus() + { + return DynamicPanel != null; + } + + public List GetList() + { + return Elements; + } + + /// + /// Function to setting list of elements - invoked once at the beginning + /// Reset current content + /// + /// + /// + public void SetList(List list) + { + Elements = list; + + if(DynamicPanel != null) // is null = is close - when we firstly init list content before open panel in SceneTaskDataManager file + UpdateList(); + } + + /// + /// Set of functions to synchronize local list with list from SystemManager + /// + public void Add(T model) + { + // throw new System.NotImplementedException(); + + Elements.Add(model); + + UpdateList(); + + // add to local list + // and rebuild view - sync lists (this.UpdateList() ;) ) + } + + public abstract void UpdateList(); + + public void Remove() + { + UpdateList(); + + throw new System.NotImplementedException(); + + // remove from local list + // and rebuild view - sync lists (this.UpdateList() ;) ) + } + + /// + /// Function to find saved template of created panel instance + /// + /// + protected abstract GameObject GetTemplatePanel(); +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIBaseManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIBaseManager.cs.meta new file mode 100644 index 00000000..a0dc36c3 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIBaseManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d3ded2235c28485481afe6d8bf3a2220 +timeCreated: 1660410923 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UISlotPanelManager.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UISlotPanelManager.cs new file mode 100644 index 00000000..c679bc28 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UISlotPanelManager.cs @@ -0,0 +1,53 @@ + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +public abstract class UISlotPanelManager : UIBaseManager +{ + public virtual int SLOTS_NUMBER => 0; + + /// + /// Function to find item in warehouser by its id, returns list of all slots where item occured + /// + /// + /// + public abstract List FindItemInWarehouse(int itemId); + + /// + /// Function to find item in warehouser by its name, returns list of all slots where item occured + /// + /// + /// + public abstract List FindItemInWarehouseByName(string itemName); + + + public abstract void RemoveByPosition(int keyPosition); + + public abstract int RemoveByItemId(int itemId); + + public abstract int RemoveByItemName(string itemName); + + public virtual void RemoveAll() + { + Elements.Clear(); + } + + public bool IsFull() + { + return Elements.Count() == SLOTS_NUMBER; + } + + protected bool CheckIfSlotIsInRange(int slotNumber) + { + return slotNumber < SLOTS_NUMBER; + } + + protected abstract bool CheckIfSlotExists(int slotNumber); + + /// + /// Check if slot is empty in local list + /// + /// + protected abstract bool CheckIfPositionIsEmpty(int slotNumber); +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UISlotPanelManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UISlotPanelManager.cs.meta new file mode 100644 index 00000000..277cca11 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UISlotPanelManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fa3cacb98d47401d9f5e909d2d59d40e +timeCreated: 1669072060 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIWarehouseManager.cs b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIWarehouseManager.cs new file mode 100644 index 00000000..7daa8eac --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIWarehouseManager.cs @@ -0,0 +1,108 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +public abstract class UIWarehouseManager : UISlotPanelManager> +{ + public override int SLOTS_NUMBER => 48; + + public static new UIWarehouseManager Instance { get; protected set; } + /* + * not sure why but childrens of this class dont interfere on parents Awake + */ + + /// + /// Function to find item in warehouser by its id, returns list of all slots where item occured + /// + /// + /// + public override List> FindItemInWarehouse(int itemId) + { + return Elements.Where(item => item.Value.Id == itemId).ToList(); + } + + /// + /// Function to find item in warehouser by its name, returns list of all slots where item occured + /// + /// + /// + public override List> FindItemInWarehouseByName(string itemName) + { + return Elements.Where(item => item.Value.name == itemName).ToList(); + } + + + + /// + /// Function (SetItemOnPosition) to add slot with its number and item to list (which will be mapped with panel content) + /// + /// + public virtual void Add(IndexValuePair itemOnSlot) + { + if (!CheckIfSlotIsInRange(itemOnSlot.Key)) + throw new System.Exception($"Slot number: {itemOnSlot.Key} is out of range, avaiable: {SLOTS_NUMBER} slots"); + + if (CheckIfSlotExists(itemOnSlot.Key) && !CheckIfPositionIsEmpty(itemOnSlot.Key)) + RemoveByPosition(itemOnSlot.Key); + + if(itemOnSlot.Value != null) + { + base.Add(itemOnSlot); + } + } + + /// + /// Function to add item on first empty slot to list (which will be mapped with panel content) + /// + /// + public virtual void Add(EquippableItem item) + { + if(IsFull()) + throw new System.Exception($"Warehouse is full!!!"); + + // find first empty position / slot + var max = Elements.Max(itemSlot => itemSlot.Key); + + base.Add(new IndexValuePair(max, item)); + } + + + public override void RemoveByPosition(int keyPosition) + { + if (!CheckIfSlotExists(keyPosition)) + return; // throw new System.Exception($"Slot with number: {keyPosition} don't exist"); + + Debug.Log($"Remove from position: {keyPosition}"); + + Elements.RemoveAll(itemSlot => itemSlot.Key == keyPosition); + } + + public override int RemoveByItemId(int itemId) + { + return Elements.RemoveAll(itemSlot => itemSlot.Value.Id == itemId); + } + + public override int RemoveByItemName(string itemName) + { + return Elements.RemoveAll(itemSlot => itemSlot.Value.Name == itemName); + } + + protected override bool CheckIfSlotExists(int slotNumber) + { + return Elements.Any(itemSlot => itemSlot.Key == slotNumber); + } + + /// + /// Check if slot is empty in local list + /// + /// + protected override bool CheckIfPositionIsEmpty(int slotNumber) + { + if(CheckIfSlotExists(slotNumber)) { + return Elements.Where(itemSlot => itemSlot.Key == slotNumber).First().Value == null; + } + + return true; + } +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIWarehouseManager.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIWarehouseManager.cs.meta new file mode 100644 index 00000000..3d0168ac --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/Manager/UI/UIWarehouseManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 64ff67a5470895e4d9f186fe4e4ad353 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs b/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs new file mode 100644 index 00000000..04ef3cc8 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs @@ -0,0 +1,54 @@ +using System.IO; +using UnityEngine; + +public class PathBuilder +{ + private static string Path; + + private string STATIC_ELEMENT_LOCATION { get { return "/StaticElements/"; } } + private string DYNAMIC_ELEMENT_LOCATION { get { return "/DynamicElements/"; } } + + public PathBuilder BuildSavePath() + { + Path = Application.persistentDataPath + "/"; + + return this; + } + + public PathBuilder WithMap(string map = "") + { + Path += map; + + return this; + } + + public PathBuilder WithDataType(SceneElementTypeEnum elementTypeEnum) + { + switch (elementTypeEnum) + { + case SceneElementTypeEnum.None: + { + Path += "/"; + break; + } + case SceneElementTypeEnum.Dynamic: + { + Path += "/DynamicElements/"; + break; + } + case SceneElementTypeEnum.Static: + { + Path += "/StaticElements/"; + break; + } + } + + return this; + } + + public string GetString() + { + return Path; + } + +} diff --git a/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs.meta new file mode 100644 index 00000000..ed8068a1 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/PathBuilder.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 16beabd146d6459faaf17008bf5bb1b1 +timeCreated: 1663425229 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem.meta b/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem.meta new file mode 100644 index 00000000..cabd3d59 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bfb65fa1b680494fbb3c5ce6f6fd5516 +timeCreated: 1662817592 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs b/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs new file mode 100644 index 00000000..98443307 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +public abstract class SaveModelSystem +{ + public string Path { get; set; } + public string ObjectListName { get; set; } + public string ObjectFolderName { get; set; } + + protected string GetFileName(string _fileName) + { + return _fileName + ".fun"; + } + + public virtual bool SaveModelItem(T model) { return true; } + + public virtual bool SaveModelList(List list) { return true; } + + public virtual T LoadModelItem() { return (T)Activator.CreateInstance(typeof(T), new object[] { }); } + + public virtual List LoadModelList() { return new List(); } + +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs.meta b/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs.meta new file mode 100644 index 00000000..4c1a9693 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/Shared/SaveSystem/SaveModelSystem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5d320552ecb945f4922f82637129f15e +timeCreated: 1662817611 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI.meta b/Assets/Scripts/REFACTORING/Application/UI.meta new file mode 100644 index 00000000..900817c0 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e72a7403874a4dd3b9987b033d009bb8 +timeCreated: 1660171754 \ No newline at end of file diff --git a/Assets/Prefarbs/Chest.meta b/Assets/Scripts/REFACTORING/Application/UI/Chest.meta similarity index 77% rename from Assets/Prefarbs/Chest.meta rename to Assets/Scripts/REFACTORING/Application/UI/Chest.meta index 707b6c8b..aa15e259 100644 --- a/Assets/Prefarbs/Chest.meta +++ b/Assets/Scripts/REFACTORING/Application/UI/Chest.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 09dff9a30bb15e24492815f4b548638f +guid: c2dc097533c72c34aada9077f5b81301 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestContentUIManager.cs b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestContentUIManager.cs new file mode 100644 index 00000000..1399fb53 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestContentUIManager.cs @@ -0,0 +1,112 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ChestContentUIManager : UIWarehouseManager +{ + public static new ChestContentUIManager Instance { get; protected set; } + + public override int SLOTS_NUMBER { get { return 48; } } + + public const string ITEM_LOCALIZATION = "UiPanels/"; + public const string PANEL_NAME = null; + + public void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Debug.Log(Instance); + Debug.Log("destroiy inventory UI"); + Destroy(gameObject); + } + } + /* + public override void UpdateList() + { + // TODO something like rebuild associated panel content + // depending on which class we use it mayu be Inventory / Chest / Shop Panel Controller + DynamicPanel.GetComponent(); //.Refresh() -- rebuild content + }*/ + + public void Update() + { + // use empty function to override parent Update + // to prevent using Open Panel and Close Panel!!! + // this UI manager mustn't open panel - only manage passed chest content and return updated data + } + + public bool OpenPanel() { return true; } + public bool ClosePanel() { return true; } + protected override GameObject GetTemplatePanel() { throw new System.NotImplementedException(); } + + + public override void SetupPanel() + { + base.SetupPanel(); + + // setup models list + DynamicPanel.GetComponent().SetUp(Elements); + } + + public override void UpdateList() + { + DynamicPanel.GetComponent().BuildPanelContent(Elements); + } + + #region adust parent function + public override void Add(IndexValuePair itemOnSlot) + { + base.Add(itemOnSlot); + + UpdateChestContent(); + } + + public override void Add(EquippableItem item) + { + base.Add(item); + + UpdateChestContent(); + } + + public override void RemoveByPosition(int keyPosition) + { + base.RemoveByPosition(keyPosition); + + UpdateChestContent(); + } + + public override int RemoveByItemId(int itemId) + { + var result = base.RemoveByItemId(itemId); + + UpdateChestContent(); + + return result; + } + + public override int RemoveByItemName(string itemName) + { + var result = base.RemoveByItemName(itemName); + + UpdateChestContent(); + + return result; + } + + public override void RemoveAll() + { + Elements.Clear(); + + UpdateChestContent(); + } + #endregion + + private void UpdateChestContent() + { + ChestUIManager.Instance.UpdateChestContent(ChestUIManager.Instance.CurrentChestName, Elements); + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestContentUIManager.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestContentUIManager.cs.meta new file mode 100644 index 00000000..ed10ed09 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestContentUIManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cccb30d385eff4c468ee907498459813 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestUIManager.cs b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestUIManager.cs new file mode 100644 index 00000000..54d39fc4 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestUIManager.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +[Serializable] +public class ChestUIManager : UIBaseManager +{ + public new static ChestUIManager Instance { get; private set; } + + public const string ITEM_LOCALIZATION = "UiPanels/"; + public const string PANEL_NAME = "ChestPanel"; + public int SLOTS_NUMBER => 48; + + public string CurrentChestName = null; + + public void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Destroy(gameObject); + } + } + + public override bool OpenPanel() + { + if (CurrentChestName == null || CurrentChestName == "") + { + Debug.Log($"You re not in collision with any chest"); + + return false; + } + + return base.OpenPanel(); + } + + public override bool ClosePanel() + { + base.ClosePanel(); + + ChestContentUIManager.Instance.DynamicPanel = null; + + return true; + } + + public override void SetupPanel() + { + base.SetupPanel(); + + var chest = FindChestInCollection(CurrentChestName); + if (chest == null) + throw new Exception($"Chest {CurrentChestName} not found"); + + ChestContentUIManager.Instance.SetList(chest.GetContent()); + ChestContentUIManager.Instance.DynamicPanel = DynamicPanel; + ChestContentUIManager.Instance.SetupPanel(); + + // setup models list + //DynamicPanel.GetComponent().SetUp(chest.GetContent()); + } + + public override void UpdateList() + { + if (CurrentChestName == null || CurrentChestName == "") + throw new Exception($"You re not in collision with any chest"); + + + var chest = FindChestInCollection(CurrentChestName); + if (chest == null) + throw new Exception($"Chest {CurrentChestName} not found"); + + ChestContentUIManager.Instance.SetList(chest.GetContent()); + ChestContentUIManager.Instance.DynamicPanel = DynamicPanel; + ChestContentUIManager.Instance.UpdateList(); + + //DynamicPanel.GetComponent().BuildPanelContent(chest.GetContent()); + } + + public void UpdateChestContent(string chestName, List> chestContent) + { + Elements.Where(chest => chest.name == chestName).ToList().ForEach(chest => chest.SetContent(chestContent)); + } + + protected override GameObject GetTemplatePanel() + { + // Resources = default path - Asset/Resources ... .obj + return Resources.Load(ITEM_LOCALIZATION + PANEL_NAME) as GameObject; + } + + private Chest FindChestInCollection(string _chestName) + { + return Elements.Find(chest => chest.Name == _chestName); + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestUIManager.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestUIManager.cs.meta new file mode 100644 index 00000000..1690cc5f --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Chest/ChestUIManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2c41ad0a68f8aff469d175f905bbf89e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/UI/Equipment.meta b/Assets/Scripts/REFACTORING/Application/UI/Equipment.meta new file mode 100644 index 00000000..940cd380 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Equipment.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 153d18ca7804a58499afd259c70a2108 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/UI/Equipment/EquipmentUIManager.cs b/Assets/Scripts/REFACTORING/Application/UI/Equipment/EquipmentUIManager.cs new file mode 100644 index 00000000..5bb75508 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Equipment/EquipmentUIManager.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +public class EquipmentUIManager : UIWarehouseManager +{ + public override int SLOTS_NUMBER => 9; + + public static new EquipmentUIManager Instance { get; protected set; } + + public const string ITEM_LOCALIZATION = "UiPanels/"; + public const string PANEL_NAME = "EquipmentPanel"; + + public void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Destroy(gameObject); + } + } + + public override void SetupPanel() + { + base.SetupPanel(); + + // setup models list + DynamicPanel.GetComponent().SetUp(Elements); + } + + public override void UpdateList() + { + DynamicPanel.GetComponent().BuildPanelContent(Elements); + } + + protected override GameObject GetTemplatePanel() + { + // Resources = default path - Asset/Resources ... .obj + return Resources.Load(ITEM_LOCALIZATION + PANEL_NAME) as GameObject; + } + + #region Override list functions + + /// + /// Function (SetItemOnPosition) to add slot with its number and item to list (which will be mapped with panel content) + /// + /// + public override void Add(IndexValuePair itemOnSlot) + { + Debug.Log(itemOnSlot.Value); + if (!CheckIfSlotIsInRange(itemOnSlot.Key)) + throw new System.Exception($"Slot number: {itemOnSlot.Key} is out of range, avaiable: {SLOTS_NUMBER} slots"); + + if (CheckIfSlotExists(itemOnSlot.Key) && !CheckIfPositionIsEmpty(itemOnSlot.Key)) + RemoveByPosition(itemOnSlot.Key); + + if (itemOnSlot.Value != null) + { + Elements.RemoveAll(equipment => equipment.Key == itemOnSlot.Key); + Elements.Add(new IndexValuePair(itemOnSlot.Key, itemOnSlot.Value)); + + UpdateList(); + } + } + + public override void RemoveByPosition(int keyPosition) + { + if (!CheckIfSlotExists(keyPosition)) + return; // throw new System.Exception($"Slot with number: {keyPosition} don't exist"); + + Debug.Log($"Remove from position: {keyPosition}"); + + + Elements.RemoveAll(equipment => equipment.Key == keyPosition); + Elements.Add(new IndexValuePair(keyPosition, null)); + } + + #endregion +} diff --git a/Assets/Scripts/REFACTORING/Application/UI/Equipment/EquipmentUIManager.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Equipment/EquipmentUIManager.cs.meta new file mode 100644 index 00000000..b3174780 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Equipment/EquipmentUIManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e09bf4772fa4f3042a7b2d2e04051247 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Inventory.meta b/Assets/Scripts/REFACTORING/Application/UI/Inventory.meta similarity index 77% rename from Assets/Scripts/Inventory.meta rename to Assets/Scripts/REFACTORING/Application/UI/Inventory.meta index c1ef616f..2cb14bb6 100644 --- a/Assets/Scripts/Inventory.meta +++ b/Assets/Scripts/REFACTORING/Application/UI/Inventory.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6ce31190a4475124d929da9d4612aaef +guid: 1042da730845c974598aec17c507491d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/REFACTORING/Application/UI/Inventory/InventoryUIManager.cs b/Assets/Scripts/REFACTORING/Application/UI/Inventory/InventoryUIManager.cs new file mode 100644 index 00000000..a197d337 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Inventory/InventoryUIManager.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class InventoryUIManager : UIWarehouseManager +{ + public static new InventoryUIManager Instance { get; protected set; } + + public override int SLOTS_NUMBER { get { return 48; } } + + public const string ITEM_LOCALIZATION = "UiPanels/"; + public const string PANEL_NAME = "InventoryPanel"; + + public void Awake() + { + if (Instance == null) + { + Instance = this; + } + else + { + Debug.Log(Instance); + Debug.Log("destroiy inventory UI"); + Destroy(gameObject); + } + } + + /* public override void UpdateList() + { + // TODO something like rebuild associated panel content + // depending on which class we use it mayu be Inventory / Chest / Shop Panel Controller + DynamicPanel.GetComponent(); //.Refresh() -- rebuild content + }*/ + + public override void SetupPanel() + { + base.SetupPanel(); + + // setup models list + DynamicPanel.GetComponent().SetUp(Elements); + } + + public override void UpdateList() + { + DynamicPanel.GetComponent().BuildPanelContent(Elements); + } + + protected override GameObject GetTemplatePanel() + { + // Resources = default path - Asset/Resources ... .obj + return Resources.Load(ITEM_LOCALIZATION + PANEL_NAME) as GameObject; + } +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI/Inventory/InventoryUIManager.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Inventory/InventoryUIManager.cs.meta new file mode 100644 index 00000000..50bb1d0f --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Inventory/InventoryUIManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 79e7954722c69764e9be36961af94d1e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Application/UI/Panel.meta b/Assets/Scripts/REFACTORING/Application/UI/Panel.meta new file mode 100644 index 00000000..9e110515 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a6f64b428a1f40dc9a2dcd29ef9b97b6 +timeCreated: 1663537361 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI/Panel/ChestPanelController.cs b/Assets/Scripts/REFACTORING/Application/UI/Panel/ChestPanelController.cs new file mode 100644 index 00000000..319296ba --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/ChestPanelController.cs @@ -0,0 +1,91 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using System; + + +public class ChestPanelController : WarehousePanelController +{ + protected override UIBaseManager> FetchUiManager() + { + return GameObject.FindObjectOfType(); + } + + // build panel sunction + // - setup - main function to build panel on screen + // - setPanelISlots - build slots on panel dependiong on declared amount + // - setPanelItems - invoking building items on slots + + // api for drag and drop + // - set item on position + // - remove item from position + // - find item in warehouse + + + // 1. Prepare empty panel + public override void BuildPanelSlots() + { + if (_panelContent == null) + throw new Exception("Panel content is not attaches"); + + + for (int _position = 0; _position < UiManager.SLOTS_NUMBER; _position++) + { + //ISlot newSlot = SetupSlot(_position, _panel); + GameObject newSlot = BuildSlot(_position, _panelContent); + + // Set new Slot instance + ChildBoxList.Add(newSlot.GetComponent()); + + // Assign events + ChildBoxList[_position] = SetupDragAndDropToSlot(ChildBoxList[_position]); + } + } + + public override GameObject BuildSlot(int key, GameObject _parent) + { + if (ChildBoxTemplate == null) + throw new Exception("chestslotbox_template is empty"); + + GameObject _newItemSlot = MonoBehaviour.Instantiate(ChildBoxTemplate, _parent.transform.position, Quaternion.identity); //.GetComponent(); + + _newItemSlot.transform.SetParent(_parent.transform); + _newItemSlot.transform.localScale = new Vector3(1.15f, 1.15f, 1.15f); + + _newItemSlot.GetComponent().SetupSlot(key, null, this); + + return _newItemSlot; + } + + + // 2. Set up panel additn items to it + public override void SetUp(List> elements) + { + // Build panel content template + BuildPanelSlots(); + + // Fill with items + BuildPanelContent(elements); + } + + + public override void BuildPanelContent(List> elements) + { + + base.BuildPanelContent(elements); + + Debug.Log("Build content"); + foreach (IndexValuePair element in elements) + { + Debug.Log($"key: {element.Key} - value: {element.Value} - type: {element.Value.EquipmentType}"); + ChildBoxList[element.Key].SetItem(new EquippableItem(element.Value)); + } + } +} + + +//Chest content manager +// gest new elements list after open chest +// remove: -> remove from list, (binding) update list in chest \ No newline at end of file diff --git a/Assets/Scripts/Chest/ChestPanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Panel/ChestPanelController.cs.meta similarity index 83% rename from Assets/Scripts/Chest/ChestPanelController.cs.meta rename to Assets/Scripts/REFACTORING/Application/UI/Panel/ChestPanelController.cs.meta index 2ac7bac0..cba97df8 100644 --- a/Assets/Scripts/Chest/ChestPanelController.cs.meta +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/ChestPanelController.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8d9e1061a8038f54a87269aa0bd2db04 +guid: 84da00f00bb500c46b1e5629ca4a61b8 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Application/UI/Panel/EquipmentPanelController.cs b/Assets/Scripts/REFACTORING/Application/UI/Panel/EquipmentPanelController.cs new file mode 100644 index 00000000..4a0d8a30 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/EquipmentPanelController.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + + +public class EquipmentPanelController : DraggablePanelController +{ + [SerializeField] protected GameObject _panelAdditionalSlotsContent; + + protected override UIBaseManager> FetchUiManager() + { + return GameObject.FindObjectOfType(); + } + + public override void BuildPanelSlots() + { + InitSlotsList(); + } + + public void InitSlotsList() + { + ChildBoxList.Add(SetupDragAndDropToSlot(_panelContent.transform.Find("equipment_slot_helmet").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelContent.transform.Find("equipment_slot_armor").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelContent.transform.Find("equipment_slot_weapon").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelContent.transform.Find("equipment_slot_boots").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelAdditionalSlotsContent.transform.Find("equipment_slot_ring").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelAdditionalSlotsContent.transform.Find("equipment_slot_bracelet").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelAdditionalSlotsContent.transform.Find("equipment_slot_necklet").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelAdditionalSlotsContent.transform.Find("equipment_slot_potion_i").GetComponent())); + ChildBoxList.Add(SetupDragAndDropToSlot(_panelAdditionalSlotsContent.transform.Find("equipment_slot_potion_ii").GetComponent())); + } + + + public override GameObject BuildSlot(int key, GameObject _parent) { throw new NotImplementedException(); } + + + // 2. Set up panel additn items to it + + //public void SetUp - in parent + + public override void BuildPanelContent(List> elements) + { + + base.BuildPanelContent(elements); + + Debug.Log("Build content"); + foreach (IndexValuePair element in elements) + { + Debug.Log($"key: {element.Key} - value: {element.Value}"); + + if(element.Value != null) + ChildBoxList.Where(slot => ((EquipmentSlot)slot).type == (EquipmentPanelSlotsTypeEnum)element.Key).ToList().ForEach(slot => slot.SetItem((EquippableItem)element.Value)); + } + } + + + + + public override void ClearSlots() + { + foreach (ItemSlot ChestSlot in ChildBoxList) + { + ChestSlot.ResetSlot(); + } + } + + + + public virtual void EndDrag(ItemSlot itemSlot) + { + if (!DraggedSlotController.Instance.IsDragged()) // if there was nothing dragged - ignore event + return; + + DraggedSlotController.Instance.RemoveDraggedSlot(); + + Debug.Log(this); + + // Rebuild/apply UiManager content (list of items) base on slots values after its updating + for (int i = 0; i < ChildBoxList.Count; i++) + { + if (ChildBoxList[i].Item != null) + { + UiManager.Add(new IndexValuePair(i, ChildBoxList[i].Item)); + } + else + { + UiManager.RemoveByPosition(i); + } + } + } + +} diff --git a/Assets/Scripts/Equipment/EquipmentPanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Panel/EquipmentPanelController.cs.meta similarity index 83% rename from Assets/Scripts/Equipment/EquipmentPanelController.cs.meta rename to Assets/Scripts/REFACTORING/Application/UI/Panel/EquipmentPanelController.cs.meta index d924803f..d43286b0 100644 --- a/Assets/Scripts/Equipment/EquipmentPanelController.cs.meta +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/EquipmentPanelController.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 42863f9f48506b944b90213e49c99763 +guid: e143aeb4404531f4aadd27d560e12565 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Application/UI/Panel/InventoryPanelController.cs b/Assets/Scripts/REFACTORING/Application/UI/Panel/InventoryPanelController.cs new file mode 100644 index 00000000..ab0d1f16 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/InventoryPanelController.cs @@ -0,0 +1,91 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using System; + + +public class InventoryPanelController : WarehousePanelController +{ + protected override UIBaseManager> FetchUiManager() + { + var uiManager = GameObject.FindObjectOfType(); + + // uiManager.SetPanelController(gameObject); - unnecessary + + return uiManager; + } + + + // build panel sunction + // - setup - main function to build panel on screen + // - setPanelISlots - build slots on panel dependiong on declared amount + // - setPanelItems - invoking building items on slots + + // api for drag and drop + // - set item on position + // - remove item from position + // - find item in warehouse + + + // 1. Prepare empty panel + public override void BuildPanelSlots() + { + if (_panelContent == null) + throw new Exception("Panel content is not attaches"); + + + for (int _position = 0; _position < UiManager.SLOTS_NUMBER; _position++) + { + //ISlot newSlot = SetupSlot(_position, _panel); + GameObject newSlot = BuildSlot(_position, _panelContent); + + // Set new Slot instance + ChildBoxList.Add(newSlot.GetComponent()); + + // Assign events + ChildBoxList[_position] = SetupDragAndDropToSlot(ChildBoxList[_position]); + } + } + + public override GameObject BuildSlot(int key, GameObject _parent) + { + if (ChildBoxTemplate == null) + throw new Exception("itemslotbox_template is empty"); + + GameObject _newItemSlot = MonoBehaviour.Instantiate(ChildBoxTemplate, _parent.transform.position, Quaternion.identity); //.GetComponent(); + + _newItemSlot.transform.SetParent(_parent.transform); + _newItemSlot.transform.localScale = new Vector3(1.15f, 1.15f, 1.15f); + + _newItemSlot.GetComponent().SetupSlot(key, null, this); + + return _newItemSlot; + } + + + // 2. Set up panel additn items to it + public override void SetUp(List> elements) + { + // Build panel content template + BuildPanelSlots(); + + // Fill with items + BuildPanelContent(elements); + } + + + public override void BuildPanelContent(List> elements) + { + + base.BuildPanelContent(elements); + + Debug.Log("Build content"); + foreach (IndexValuePair element in elements) + { + Debug.Log($"key: {element.Key} - value: {element.Value}"); + ChildBoxList[element.Key].SetItem(element.Value); + } + } +} diff --git a/Assets/Scripts/Inventory/InventoryPanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Panel/InventoryPanelController.cs.meta similarity index 83% rename from Assets/Scripts/Inventory/InventoryPanelController.cs.meta rename to Assets/Scripts/REFACTORING/Application/UI/Panel/InventoryPanelController.cs.meta index 11ac648c..18463b50 100644 --- a/Assets/Scripts/Inventory/InventoryPanelController.cs.meta +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/InventoryPanelController.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d0bff20d6fb721a449df16891030739a +guid: b3ae9277a19e5dc49aa607d1d2ec2dc9 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Application/UI/Panel/TaskPanelController.cs b/Assets/Scripts/REFACTORING/Application/UI/Panel/TaskPanelController.cs new file mode 100644 index 00000000..5fafd044 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/TaskPanelController.cs @@ -0,0 +1,75 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.EventSystems; +using System; + +public class TaskPanelController : PanelController +{ + protected override UIBaseManager FetchUiManager() // check if need return by ref + { + var uiManager = GameObject.FindObjectOfType(); + + // uiManager.SetPanelController(gameObject); - unnecessary + + return uiManager; + } + + + public override void BuildPanelContent(List elements) + { + base.BuildPanelContent(elements); + + for (int i = 0; i < elements.Count; i++) + { + this.AddTask(elements[i]); + } + } + + public void AddTask(Task _task) + { + // update TaskManager main list of task + //TaskManager.Instance.AddTask(_task); + + // add task to local panel contant + GameObject newTaskBox = SetupTaskBox(_task); + + // Set new Slot instance + ChildBoxList.Add(newTaskBox); + } + + protected GameObject SetupTaskBox(Task _task) + { + if (ChildBoxTemplate == null) + throw new Exception("taskbox_template is empty"); + + GameObject _newTaskBox = MonoBehaviour.Instantiate(ChildBoxTemplate, _panelContent.transform.position, Quaternion.identity); //.GetComponent(); + + _newTaskBox.transform.SetParent(_panelContent.transform); + + _newTaskBox.transform.localScale = new Vector3(2.5f, 2.5f, 1.0f); + + _newTaskBox.GetComponent().SetTask(_task); + + return _newTaskBox; + } + + + + // Ignored methods + public override void BuildPanelSlots() + { + return; + } + + public override GameObject BuildSlot(int key, GameObject _parent) + { + throw new NotImplementedException(); + } + + public override void ClearSlots() + { + throw new NotImplementedException(); + } +} diff --git a/Assets/Scripts/REFACTORING/Application/UI/Panel/TaskPanelController.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Panel/TaskPanelController.cs.meta new file mode 100644 index 00000000..b0c1168f --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Panel/TaskPanelController.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b8a6f254fe36462ca3d3e3d705026c56 +timeCreated: 1664309406 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI/Task.meta b/Assets/Scripts/REFACTORING/Application/UI/Task.meta new file mode 100644 index 00000000..a40675d7 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Task.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 65bb481e6538451cad604d5c3644043a +timeCreated: 1662328781 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Application/UI/Task/TaskUIManager.cs b/Assets/Scripts/REFACTORING/Application/UI/Task/TaskUIManager.cs new file mode 100644 index 00000000..a5e333fd --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Task/TaskUIManager.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class TaskUIManager : UIBaseManager +{ + public const string ITEM_LOCALIZATION = "UiPanels/"; + public const string PANEL_NAME = "TaskPanel"; + + public override void SetupPanel() + { + base.SetupPanel(); + + // setup models list + DynamicPanel.GetComponent().SetUp(Elements); + } + + public override void UpdateList() + { + DynamicPanel.GetComponent().BuildPanelContent(Elements); + } + + protected override GameObject GetTemplatePanel() + { + // Resources = default path - Asset/Resources ... .obj + return Resources.Load(ITEM_LOCALIZATION + PANEL_NAME) as GameObject; + } +} diff --git a/Assets/Scripts/REFACTORING/Application/UI/Task/TaskUIManager.cs.meta b/Assets/Scripts/REFACTORING/Application/UI/Task/TaskUIManager.cs.meta new file mode 100644 index 00000000..5a6780f9 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Application/UI/Task/TaskUIManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a6684146805f4d85a427005443c221a6 +timeCreated: 1662328793 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain.meta b/Assets/Scripts/REFACTORING/Domain.meta new file mode 100644 index 00000000..d1cde923 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cb4d460084b74e059c3d762bc6e13050 +timeCreated: 1660483299 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain/Enum.meta b/Assets/Scripts/REFACTORING/Domain/Enum.meta new file mode 100644 index 00000000..08718044 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 88559027d691496b829a0591baa13dd3 +timeCreated: 1662414082 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/ChestTypeEnum.cs b/Assets/Scripts/REFACTORING/Domain/Enum/ChestTypeEnum.cs new file mode 100644 index 00000000..8974fba6 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/ChestTypeEnum.cs @@ -0,0 +1,10 @@ + +[System.Serializable] +public enum ChestTypeEnum +{ + Wodden, + Silver, + Golden, + Prize, + Extra +} diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/ChestTypeEnum.cs.meta b/Assets/Scripts/REFACTORING/Domain/Enum/ChestTypeEnum.cs.meta new file mode 100644 index 00000000..db0630e7 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/ChestTypeEnum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cd359d664589b8c49ad7de7691e39268 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentPanelSlotsTypeEnum.cs b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentPanelSlotsTypeEnum.cs new file mode 100644 index 00000000..2281e958 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentPanelSlotsTypeEnum.cs @@ -0,0 +1,13 @@ +[System.Serializable] +public enum EquipmentPanelSlotsTypeEnum +{ + HelmetSlot, + ArmorSlot, + WeaponSlot, + BootsSlot, + RingSlot, + BraceletSlot, + NeckletSlot, + PotionSlotSt, + PotionSlotNd +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentPanelSlotsTypeEnum.cs.meta b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentPanelSlotsTypeEnum.cs.meta new file mode 100644 index 00000000..a07def88 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentPanelSlotsTypeEnum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 30d5a385ac41da54986a749a11874525 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentTypeEnum.cs b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentTypeEnum.cs new file mode 100644 index 00000000..5e6b12e9 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentTypeEnum.cs @@ -0,0 +1,15 @@ +[System.Serializable] +public enum EquipmentTypeEnum +{ + None, // IMPORTANT after cast from Item to DefaultItem it gets defaulty first type so... + Helmet, + Chest, + Gloves, + Boots, + Weapon, + Potion, + Bracelet, + Necklet, + Ring, + Other +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentTypeEnum.cs.meta b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentTypeEnum.cs.meta new file mode 100644 index 00000000..329d8e5b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/EquipmentTypeEnum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 583901b64ccc6d3499f1e4f57390255d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/SceneElementTypeEnum.cs b/Assets/Scripts/REFACTORING/Domain/Enum/SceneElementTypeEnum.cs new file mode 100644 index 00000000..cc59c084 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/SceneElementTypeEnum.cs @@ -0,0 +1,7 @@ +public enum SceneElementTypeEnum +{ + None, + Static, + Dynamic, + All +} diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/SceneElementTypeEnum.cs.meta b/Assets/Scripts/REFACTORING/Domain/Enum/SceneElementTypeEnum.cs.meta new file mode 100644 index 00000000..e9681b70 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/SceneElementTypeEnum.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 70d473eabf5147fe8163acb0dde82488 +timeCreated: 1662414155 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/TaskDifficultyEnum.cs b/Assets/Scripts/REFACTORING/Domain/Enum/TaskDifficultyEnum.cs new file mode 100644 index 00000000..d72b0997 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/TaskDifficultyEnum.cs @@ -0,0 +1,8 @@ +public enum TaskDifficultyEnum +{ + Easy, + Normal, + Medium, + Hard, + Impossible +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Domain/Enum/TaskDifficultyEnum.cs.meta b/Assets/Scripts/REFACTORING/Domain/Enum/TaskDifficultyEnum.cs.meta new file mode 100644 index 00000000..95ef1f37 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Domain/Enum/TaskDifficultyEnum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d8816338338357349be1c84352410dde +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models.meta b/Assets/Scripts/REFACTORING/Models.meta new file mode 100644 index 00000000..74c6914e --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8f774df0851945f084c9d38c173b3a19 +timeCreated: 1660483048 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Models/Chest.meta b/Assets/Scripts/REFACTORING/Models/Chest.meta new file mode 100644 index 00000000..0ec29649 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53cee1e0962a03b47bec40a58b3323c7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Chest/Chest.cs b/Assets/Scripts/REFACTORING/Models/Chest/Chest.cs new file mode 100644 index 00000000..e0118af1 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/Chest.cs @@ -0,0 +1,119 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + + +[System.Serializable] +public struct IndexValuePair +{ + [SerializeField] public int Key; + [SerializeField] public T Value; + + public IndexValuePair(int key, T value) + { + Key = key; + Value = value; + } +} + +[System.Serializable] +public struct IndexValuePair +{ + [SerializeField] public V Key; + [SerializeField] public T Value; + + public IndexValuePair(V key, T value) + { + Key = key; + Value = value; + } +} + +[System.Serializable] +[CreateAssetMenu(fileName = "New Chest", menuName = "Inventory/Chest")] +public class Chest +{ + public int id; + public int Id + { + get { return id; } + set { id = value; } + } + + public string name; + public string Name + { + get { return name; } + set { name = value; } + } + + public string description; + public string Description + { + get { return description; } + set { description = value; } + } + + public GameObject chestModel; + public GameObject ChestModel + { + get { return chestModel; } + set { chestModel = value; } + } + + public ChestTypeEnum ChestType; + + public List> Content = new List>(); + + + public Chest() { } + + public Chest(Chest _chest) + { + this.Name = _chest.Name; + this.Description = _chest.Description; + this.ChestModel = _chest.ChestModel; + this.ChestType = _chest.ChestType; + this.Content = _chest.Content; + } + + public Chest(string _name, string _description, GameObject _chestModel, ChestTypeEnum _type) + { + this.Name = _name; + this.Description = _description; + this.ChestModel = _chestModel; + this.ChestType = _type; + } + + public Chest(string _name, string _description, GameObject _chestModel, ChestTypeEnum _type, List> _content) + { + this.Name = _name; + this.Description = _description; + this.ChestModel = _chestModel; + this.ChestType = _type; + + SetContent(_content); + } + + public void SetContent(List> _content) + { + Content.Clear(); + + foreach (IndexValuePair element in _content) + { + Content.Add(new IndexValuePair(element.Key, element.Value)); + } + } + + public List> GetContent() + { + List> castedContent = new List>(); + + foreach (IndexValuePair element in Content) + { + castedContent.Add(new IndexValuePair(element.Key, element.Value)); + } + + return castedContent; + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Chest/Chest.cs.meta b/Assets/Scripts/REFACTORING/Models/Chest/Chest.cs.meta new file mode 100644 index 00000000..cd865790 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/Chest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1beed527863993a49ad7bc2695363b77 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Chest/ChestData.cs b/Assets/Scripts/REFACTORING/Models/Chest/ChestData.cs new file mode 100644 index 00000000..ba12d8eb --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/ChestData.cs @@ -0,0 +1,71 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +[System.Serializable] +public class ChestData : ModelData +{ + [SerializeField] + public string description; + + [SerializeField] + public ChestTypeEnum type; + + [SerializeField] + public List> content = new List>(); + + + protected override string SPRITE_LOCALIZATION => "Sprites/Object Sprites/"; + protected override string MODEL_LOCALIZATION => "Chests/"; + + public ChestData(Chest chest) : base(chest.id, chest.name, chest.chestModel.name) + { + description = chest.description; + + foreach(IndexValuePair item in chest.Content) + { + content.Add( + new IndexValuePair(item.Key, new EquippableItemData(item.Value)) + ); + } + } + + // dont use parameter - chest is not scriptable object, dont have its model in Assets + public override Chest MapDataToObject() + { + // 1. Find object + GameObject chestGameObject = TryFindResource(modelName); + + var chest = new Chest(name, description, chestGameObject, type); + + // 2. Set chest content from passed data + chest.Content.Clear(); + foreach (IndexValuePair item in content) + { + var castedObject = item.Value.MapDataToObject() as EquippableItem; + + if(castedObject == null) + chest.Content.Add( + new IndexValuePair(item.Key, new EquippableItem(item.Value.MapDataToObject())) + ); + else + chest.Content.Add( + new IndexValuePair(item.Key, castedObject) + ); + } + + return chest; + } + + public override Chest MapDataToObject(string prefarbAssetName) { throw new System.NotImplementedException(); } + + protected override GameObject TryFindResource(string modelName) + { + var resource = Resources.Load(MODEL_LOCALIZATION + modelName); + + if (!resource) + throw new System.Exception($"Resource {modelName} not found!!"); + + return resource; + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Chest/ChestData.cs.meta b/Assets/Scripts/REFACTORING/Models/Chest/ChestData.cs.meta new file mode 100644 index 00000000..00516f35 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/ChestData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1e77c35948bf74045bc9f3b32c51e600 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAsset.cs b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAsset.cs new file mode 100644 index 00000000..492d0b47 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAsset.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +[System.Serializable] +public class ChestPrefabAsset : PrefabAssetModel +{ + + [SerializeField] + public Chest Chest = null; + + //public List> Content { get; set; } + + public ChestPrefabAsset(Chest _chest) + : base(_chest.name, _chest.ChestModel.name, new Vector3(0,0,0)) + { + Chest = _chest; + } + public ChestPrefabAsset(string _name, string _prefabAssetName, Vector3 _position, Chest _chest = null) + : base(_name, _prefabAssetName, _position) + { + Chest = _chest; + } + + public ChestPrefabAssetData MapPrefabAssetModelToData() + { + return new ChestPrefabAssetData(this); + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAsset.cs.meta b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAsset.cs.meta new file mode 100644 index 00000000..e28db445 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8516b788b4bb41941946e38c14fec84b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAssetData.cs b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAssetData.cs new file mode 100644 index 00000000..279ba2b8 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAssetData.cs @@ -0,0 +1,60 @@ +using System.Collections.Generic; +using UnityEngine; + +[System.Serializable] +public class ChestPrefabAssetData : PrefabAssetModelData +{ + [SerializeField] ChestData ChestData; + //public List> Content { get; set; } + + public ChestPrefabAssetData(ChestPrefabAsset assetModel) : base(assetModel) + { + ChestData = MapModelToData(assetModel.Chest); + + /* Content = new List>(); + + Debug.Log("ChestPrefarbAsset to ChestPrefarbAssetData - " + assetModel.Name); + + foreach(IndexValuePair itemEntry in assetModel.Content) + { + Debug.Log("Slot nr " + itemEntry.Key); + Content[itemEntry.Key] = itemEntry.Value.MapPrefabAssetModelToData(); + }*/ + } + + public ChestData MapModelToData(Chest chest) + { + return new ChestData(chest); + } + + + public override PrefabAssetModelData PrefabAssetModelToData(PrefabAssetModel assetModel) + { + return new ChestPrefabAssetData((ChestPrefabAsset)assetModel); + } + + public override PrefabAssetModel MapDataToPrefabAssetModel() + { + ChestPrefabAsset chestPrefabAsset = new ChestPrefabAsset( + Name, + PrefabAssetName, + new Vector3(Position[0], Position[1], Position[2]) + ); + + // todo convert each item to data + chestPrefabAsset.Chest = ChestData.MapDataToObject(); + + // clear content and set items from data - this will modify Scri-0ptableObject data also in source + //chestPrefabAsset.Chest.Content.Clear(); +/* foreach (IndexValuePair modelData in ChestData.content) + { + var objectFromData = (modelData.Value).MapDataToObject(); + Debug.Log(objectFromData); + chestPrefabAsset.Chest.Content.Add( + new IndexValuePair(modelData.Key, objectFromData) + ); + }*/ + + return chestPrefabAsset; + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAssetData.cs.meta b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAssetData.cs.meta new file mode 100644 index 00000000..4244b065 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Chest/ChestPrefabAssetData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 412950173e7207545a9041550b13b713 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Item.meta b/Assets/Scripts/REFACTORING/Models/Item.meta new file mode 100644 index 00000000..249b4597 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f614b6829bdb4b289e4e097b4fd17a12 +timeCreated: 1662915893 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem.meta b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem.meta new file mode 100644 index 00000000..4046aaf9 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1d9b2ee8ca4dff44e879cfe9ea14c175 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItem.cs b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItem.cs new file mode 100644 index 00000000..bab69af5 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItem.cs @@ -0,0 +1,36 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +[System.Serializable] +[CreateAssetMenu(fileName = "New Item", menuName = "Inventory/EquippableItem")] +public class EquippableItem : Item +{ + public int StrengthBonus = 0; + public int AgilityBonus = 0; + public int InteligenceBonus = 0; + public int VitalityBonus = 0; + + [Space] + public bool isStackable = false; + + [Space] + public EquipmentTypeEnum EquipmentType = EquipmentTypeEnum.None; + + public EquippableItem(){} + + public EquippableItem(Item _item) : base(_item) {} + + public EquippableItem(EquippableItem _item) : base(_item.name, _item.description, _item.level, _item.itemModel, _item.image) + { + StrengthBonus = _item.StrengthBonus; + AgilityBonus = _item.AgilityBonus; + InteligenceBonus = _item.InteligenceBonus; + VitalityBonus = _item.VitalityBonus; + + EquipmentType = _item.EquipmentType; + } + + public EquippableItem(string _name, string _description, int _level, GameObject _itemModel, Sprite _image) : base(_name, _description, _level, _itemModel, _image) { } + +} diff --git a/Assets/Scripts/Item/EquippableItem.cs.meta b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItem.cs.meta similarity index 83% rename from Assets/Scripts/Item/EquippableItem.cs.meta rename to Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItem.cs.meta index 96c44311..7be841a6 100644 --- a/Assets/Scripts/Item/EquippableItem.cs.meta +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItem.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 943bb4b7c1123c44fb1cbc048a56a954 +guid: a0c176e87b3c91641897c23dc27e92a0 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemData.cs b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemData.cs new file mode 100644 index 00000000..b4f30c5e --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemData.cs @@ -0,0 +1,46 @@ +using System; +using UnityEngine; + +[System.Serializable] +public class EquippableItemData : ItemData +{ + [SerializeField] + public int strengthBonus; + + [SerializeField] + public int agilityBonus; + + [SerializeField] + public int inteligenceBonus; + + [SerializeField] + public int vitalityBonus; + + [SerializeField] + public bool isStackable; + + [SerializeField] + public EquipmentTypeEnum equipmentType; + + public EquippableItemData(EquippableItem equippableItem) : base(equippableItem) + { + strengthBonus = equippableItem.StrengthBonus; + agilityBonus = equippableItem.AgilityBonus; + inteligenceBonus = equippableItem.InteligenceBonus; + vitalityBonus = equippableItem.VitalityBonus; + + isStackable = equippableItem.isStackable; + equipmentType = equippableItem.EquipmentType; + } + + public EquippableItemData(Item item) : base(item) + { + strengthBonus = 0; + agilityBonus = 0; + inteligenceBonus = 0; + vitalityBonus = 0; + + isStackable = true; + equipmentType = EquipmentTypeEnum.Other; + } +} diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemData/EquippableItemData.cs.meta b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemData.cs.meta similarity index 100% rename from Assets/Scripts/SceneManager/SaveItem/EquippableItemData/EquippableItemData.cs.meta rename to Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemData.cs.meta diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAsset.cs b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAsset.cs new file mode 100644 index 00000000..56c9aab7 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAsset.cs @@ -0,0 +1,55 @@ +using UnityEditor; +using UnityEngine; + +[System.Serializable] +public class EquippableItemPrefabAsset : PrefabAssetModel +{ + + [SerializeField] + public EquippableItem EquippableItem = null; + + public EquippableItemPrefabAsset() { } + + public EquippableItemPrefabAsset(string _name, string _prefabAssetName, Vector3 _position, EquippableItem _equippableItem = null) + : base(_name, _prefabAssetName, _position) + { + EquippableItem = _equippableItem; + } + + /// + /// + /// + /// + /// + /// + /// the name by which the system will search for the item + public EquippableItemPrefabAsset(string _name, string _prefabAssetName, Vector3 _position, string _equippableItemName) + : base(_name, _prefabAssetName, _position) + { + + // TODO during build product process, objects are not found - refactor this + string[] assetNames = AssetDatabase.FindAssets("t:EquippableItem", new[] { "Assets/Items/" }); + foreach (string SOName in assetNames) + { + var SoPath = AssetDatabase.GUIDToAssetPath(SOName); + + if(SoPath.Contains(_equippableItemName + ".asset")) + { + // 3.2 set EquippableItem object + EquippableItem = AssetDatabase.LoadAssetAtPath(SoPath); + break; + } + } + } + + /// + /// Function to convert Prefab Asset model to data object + /// + /// + public EquippableItemPrefabAssetData MapPrefabAssetModelToData() + { + return new EquippableItemPrefabAssetData(this); + } +} + + diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAsset.cs.meta b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAsset.cs.meta new file mode 100644 index 00000000..6c07acd1 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b7802014e11d9745a1fb90b31553624 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAssetData.cs b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAssetData.cs new file mode 100644 index 00000000..d27a6165 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAssetData.cs @@ -0,0 +1,45 @@ +using UnityEngine; + +[System.Serializable] +public class EquippableItemPrefabAssetData : PrefabAssetModelData +{ + public EquippableItemData EquippableItemData; + + public EquippableItemPrefabAssetData(EquippableItemPrefabAsset assetModel) : base(assetModel) + { + EquippableItemData = MapModelToData(assetModel.EquippableItem); + } + + /// + /// Function to convert equitable item (current object partial variable) object to data format + /// + /// + /// + public EquippableItemData MapModelToData(EquippableItem equippableItem) + { + return new EquippableItemData(equippableItem); + } + + /// + /// Function to convert EquippableItem Asset format to data format + /// + /// + /// + public override PrefabAssetModelData PrefabAssetModelToData(PrefabAssetModel assetModel) + { + return new EquippableItemPrefabAssetData((EquippableItemPrefabAsset)assetModel); + } + + public override PrefabAssetModel MapDataToPrefabAssetModel() + { + EquippableItemPrefabAsset equippableItemPrefabAsset = new EquippableItemPrefabAsset( + Name, + PrefabAssetName, + new Vector3(Position[0], Position[1], Position[2]) + ); + + equippableItemPrefabAsset.EquippableItem = (EquippableItem)EquippableItemData.MapDataToObject(equippableItemPrefabAsset.PrefabAssetName); + + return equippableItemPrefabAsset; + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAssetData.cs.meta b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAssetData.cs.meta new file mode 100644 index 00000000..ba81b967 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/EquippableItem/EquippableItemPrefabAssetData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 637522de5e9c1604b9edb7a21f660d60 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Item/Item.cs b/Assets/Scripts/REFACTORING/Models/Item/Item.cs similarity index 100% rename from Assets/Scripts/Item/Item.cs rename to Assets/Scripts/REFACTORING/Models/Item/Item.cs diff --git a/Assets/Scripts/Item/Item.cs.meta b/Assets/Scripts/REFACTORING/Models/Item/Item.cs.meta similarity index 83% rename from Assets/Scripts/Item/Item.cs.meta rename to Assets/Scripts/REFACTORING/Models/Item/Item.cs.meta index 48866ab6..4930f3eb 100644 --- a/Assets/Scripts/Item/Item.cs.meta +++ b/Assets/Scripts/REFACTORING/Models/Item/Item.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3d5bd84ad69269f4e8a3c4ec655119d5 +guid: 1c6df47a2440e8a49bef89083164fdc1 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/REFACTORING/Models/Item/ItemData.cs b/Assets/Scripts/REFACTORING/Models/Item/ItemData.cs new file mode 100644 index 00000000..8e3856cb --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Item/ItemData.cs @@ -0,0 +1,67 @@ +using System; +using UnityEngine; + + +[System.Serializable] +public abstract class ItemData : ModelData +{ + [SerializeField] + public string description; + + [SerializeField] + public int level; + + [SerializeField] + public string imageName; + + protected override string SPRITE_LOCALIZATION => "Sprites/Object Sprites/"; + protected override string MODEL_LOCALIZATION => "Items/"; + + public ItemData(Item item) : base(item.id, item.name, item.itemModel.name) + { + description = item.description; + level = item.level; + imageName = item.image.name; + } + + public override Item MapDataToObject(string prefarbAssetName) + { + Debug.Log("item prefab from asset name - data to object"); + Debug.Log(MODEL_LOCALIZATION + prefarbAssetName + ".asset"); + + return TryFindResource(prefarbAssetName); + + /// + // DONT OVERWRITE PROPERTIES BECOUSE ITS EDIT MAIN OBJECT IN ASSET/ + /// + + // equippableItem.StrengthBonus = strengthBonus; + // equippableItem.AgilityBonus = agilityBonus; + // equippableItem.InteligenceBonus = inteligenceBonus; + // equippableItem.VitalityBonus = vitalityBonus; + // equippableItem.isStackable = isStackable; + // equippableItem.EquipmentTypeEnum = equipmentType; + + // Item item = base.MapDataToItem(prefarbAssetName); + // equippableItem.Name = item.Name; + // equippableItem.Description = item.Description; + // equippableItem.Level = item.Level; + // equippableItem.ItemModel = item.ItemModel; + // equippableItem.Image = item.Image; + } + + public override Item MapDataToObject() + { + return TryFindResource(modelName); + } + + protected override Item TryFindResource(string modelName) + { + var resource = Resources.Load(MODEL_LOCALIZATION + modelName); + + if (!resource) + throw new System.Exception($"Resource {modelName} not found!!"); + + return resource; + } +} diff --git a/Assets/Scripts/SceneManager/SaveItem/ItemData/ItemData.cs.meta b/Assets/Scripts/REFACTORING/Models/Item/ItemData.cs.meta similarity index 100% rename from Assets/Scripts/SceneManager/SaveItem/ItemData/ItemData.cs.meta rename to Assets/Scripts/REFACTORING/Models/Item/ItemData.cs.meta diff --git a/Assets/Scripts/REFACTORING/Models/Panel.meta b/Assets/Scripts/REFACTORING/Models/Panel.meta new file mode 100644 index 00000000..09861462 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Panel.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7f794d5910b056443822eaf53a798555 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Panel/Slot.meta b/Assets/Scripts/REFACTORING/Models/Panel/Slot.meta new file mode 100644 index 00000000..288c02d6 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Panel/Slot.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 47f80f9e6ba3c524084bb8d8ad9f30be +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Chest/ChestSlot.cs b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ChestSlot.cs similarity index 83% rename from Assets/Scripts/Chest/ChestSlot.cs rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/ChestSlot.cs index b3fab047..1b9a1304 100644 --- a/Assets/Scripts/Chest/ChestSlot.cs +++ b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ChestSlot.cs @@ -1,9 +1,15 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.EventSystems; public class ChestSlot : ItemSlot { +/* public ChestSlot(int number, Item item): base(number, item) + { + + }*/ + public override bool CanReceiveItem(Item item) { return true; diff --git a/Assets/Scripts/Chest/ChestSlot.cs.meta b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ChestSlot.cs.meta similarity index 100% rename from Assets/Scripts/Chest/ChestSlot.cs.meta rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/ChestSlot.cs.meta diff --git a/Assets/Scripts/Equipment/EquipmentSlot.cs b/Assets/Scripts/REFACTORING/Models/Panel/Slot/EquipmentSlot.cs similarity index 63% rename from Assets/Scripts/Equipment/EquipmentSlot.cs rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/EquipmentSlot.cs index 978697f5..f37d2115 100644 --- a/Assets/Scripts/Equipment/EquipmentSlot.cs +++ b/Assets/Scripts/REFACTORING/Models/Panel/Slot/EquipmentSlot.cs @@ -2,9 +2,13 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +[System.Serializable] public class EquipmentSlot : ItemSlot { - public EquipmentType EquipmentType; + + [SerializeField] public EquipmentPanelSlotsTypeEnum type; + + public EquipmentTypeEnum EquipmentType; public override bool CanReceiveItem(Item item) { @@ -12,6 +16,7 @@ public class EquipmentSlot : ItemSlot return true; EquippableItem equippableItem = item as EquippableItem; // jeśli item pierwotnie nie był typu EquippableItem to casting zwróci NULL - return equippableItem != null && equippableItem.EquipmentType == EquipmentType; // the second condition is to put items on fields with matched type + + return equippableItem != null && equippableItem.EquipmentType != EquipmentTypeEnum.None && equippableItem.EquipmentType == EquipmentType; // the second condition is to put items on fields with matched type } } diff --git a/Assets/Scripts/Equipment/EquipmentSlot.cs.meta b/Assets/Scripts/REFACTORING/Models/Panel/Slot/EquipmentSlot.cs.meta similarity index 100% rename from Assets/Scripts/Equipment/EquipmentSlot.cs.meta rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/EquipmentSlot.cs.meta diff --git a/Assets/Scripts/UI/ISlot.cs b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ISlot.cs similarity index 72% rename from Assets/Scripts/UI/ISlot.cs rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/ISlot.cs index c04275a3..21181fa8 100644 --- a/Assets/Scripts/UI/ISlot.cs +++ b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ISlot.cs @@ -8,7 +8,7 @@ using System; public interface ISlot { int Number { get; set; } - Item Item { get; set; } + EquippableItem Item { get; set; } // enum typ dziecka // A : enum A @@ -19,7 +19,7 @@ public interface ISlot event Action OnDropEvent; //(B)Islot // as B - public void SetupSlot(int _number, Item _item, BasePanelController _PanelController); - public void SetItem(Item _item); + public void SetupSlot(int _number, EquippableItem _item, WarehousePanelController _PanelController); + public void SetItem(EquippableItem _item); bool CanReceiveItem(Item item); } \ No newline at end of file diff --git a/Assets/Scripts/UI/ISlot.cs.meta b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ISlot.cs.meta similarity index 100% rename from Assets/Scripts/UI/ISlot.cs.meta rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/ISlot.cs.meta diff --git a/Assets/Scripts/Inventory/InventorySlot.cs b/Assets/Scripts/REFACTORING/Models/Panel/Slot/InventorySlot.cs similarity index 70% rename from Assets/Scripts/Inventory/InventorySlot.cs rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/InventorySlot.cs index 7ff24883..82e5438c 100644 --- a/Assets/Scripts/Inventory/InventorySlot.cs +++ b/Assets/Scripts/REFACTORING/Models/Panel/Slot/InventorySlot.cs @@ -4,6 +4,11 @@ using UnityEngine; public class InventorySlot : ItemSlot { +/* public InventorySlot(int number, Item item) : base(number, item) + { + + }*/ + public override bool CanReceiveItem(Item item) { return true; diff --git a/Assets/Scripts/Inventory/InventorySlot.cs.meta b/Assets/Scripts/REFACTORING/Models/Panel/Slot/InventorySlot.cs.meta similarity index 100% rename from Assets/Scripts/Inventory/InventorySlot.cs.meta rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/InventorySlot.cs.meta diff --git a/Assets/Scripts/Item/ItemSlot.cs b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ItemSlot.cs similarity index 75% rename from Assets/Scripts/Item/ItemSlot.cs rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/ItemSlot.cs index c864cfb0..50508c05 100644 --- a/Assets/Scripts/Item/ItemSlot.cs +++ b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ItemSlot.cs @@ -12,7 +12,7 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler [SerializeField] private TextMeshProUGUI slotItemNumberText; [SerializeField] private Image itemImage; - public BasePanelController _PanelController; + public WarehousePanelController _PanelController; private Color normalColor = Color.white; private Color disabledColor = new Color(1, 1, 1, 0); // transparency = 0 @@ -27,8 +27,8 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler } } [SerializeField] - protected Item _item; - public Item Item { + protected EquippableItem _item; + public EquippableItem Item { get { return _item; } set { _item = value; @@ -48,7 +48,23 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler public event Action OnDragEvent; public event Action OnDropEvent; - public void SetupSlot(int _number, Item _item, BasePanelController _PanelController) +/* public ItemSlot() { } + public ItemSlot(int number, EquippableItem item = null) + { + Number = number; + Item = item; + }*/ +/* + public ItemSlot(ItemSlot slot) + { + Number = slot.Number; + Item = slot.Item; + + slotItemNumberText = slot.slotItemNumberText; + itemImage = slot.itemImage; + }*/ + + public void SetupSlot(int _number, EquippableItem _item, WarehousePanelController _PanelController) { this._PanelController = _PanelController; @@ -60,7 +76,7 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler } } - public void SetItem(Item _item) // dont change slot numer after assign new item, numbers are bind during object init + public void SetItem(EquippableItem _item) // dont change slot numer after assign new item, numbers are bind during object init { Item = _item; @@ -71,6 +87,16 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler UpdateItemNumberHolder(); } + public void ResetSlot() + { + Item = null; + + ChangeEnableImageView(false); + + countStackableItems = 0; + + UpdateItemNumberHolder(); + } private void ChangeEnableImageView(bool _flag) { @@ -102,7 +128,9 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler return true; } - // Events methods + + + #region Events methods public void OnBeginDrag(PointerEventData eventData) { if(OnBeginDragEvent != null) @@ -126,4 +154,5 @@ public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler if(OnDropEvent != null) OnDropEvent(this); } + #endregion } diff --git a/Assets/Scripts/Item/ItemSlot.cs.meta b/Assets/Scripts/REFACTORING/Models/Panel/Slot/ItemSlot.cs.meta similarity index 100% rename from Assets/Scripts/Item/ItemSlot.cs.meta rename to Assets/Scripts/REFACTORING/Models/Panel/Slot/ItemSlot.cs.meta diff --git a/Assets/Scripts/REFACTORING/Models/Shared.meta b/Assets/Scripts/REFACTORING/Models/Shared.meta new file mode 100644 index 00000000..72f7c47a --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4471be66d11d486f85e0cdc004f49bf9 +timeCreated: 1662914940 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Models/Shared/ModelData.cs b/Assets/Scripts/REFACTORING/Models/Shared/ModelData.cs new file mode 100644 index 00000000..05967ee0 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared/ModelData.cs @@ -0,0 +1,39 @@ +using System.Collections; +using UnityEngine; + +[System.Serializable] +public abstract class ModelData +{ + [SerializeField] + public int id; + + [SerializeField] + public string name; + + // to handle object created on scene for example after removing from inventory + [SerializeField] + public string modelName; + + protected virtual string SPRITE_LOCALIZATION => ""; + + protected virtual string MODEL_LOCALIZATION => ""; + + public ModelData(int _id, string _name) + { + id = _id; + name = _name; + } + + public ModelData(int _id, string _name, string _modelName) + { + id = _id; + name = _name; + modelName = _modelName; // name of the prefab + } + + public abstract T MapDataToObject(string prefarbAssetName); + + public abstract T MapDataToObject(); + + protected abstract V TryFindResource(string modelName); +} \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Models/Shared/ModelData.cs.meta b/Assets/Scripts/REFACTORING/Models/Shared/ModelData.cs.meta new file mode 100644 index 00000000..cafa5b99 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared/ModelData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5898041170649a94fa3172f2291ec24a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModel.cs b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModel.cs new file mode 100644 index 00000000..51335d4f --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModel.cs @@ -0,0 +1,22 @@ +using System; +using UnityEngine; + +[Serializable] +public class PrefabAssetModel +{ + [SerializeField] + public string Name { get; set; } + [SerializeField] + public string PrefabAssetName { get; set; } + [SerializeField] + public Vector3 Position { get; set; } + + public PrefabAssetModel() {} + + public PrefabAssetModel(string _name, string _prefabAssetName, Vector3 _position) + { + Name = _name; // builded object local name (setuped e.g. by admin) + PrefabAssetName = _prefabAssetName; // builded object name in Assets/ + Position = _position; + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModel.cs.meta b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModel.cs.meta new file mode 100644 index 00000000..c4bdd6fb --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModel.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ca127a3fffe446ff972f5cdedfd7e33f +timeCreated: 1662914958 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModelData.cs b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModelData.cs new file mode 100644 index 00000000..3a3cd7e9 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModelData.cs @@ -0,0 +1,38 @@ +using System; +using UnityEngine; + +[Serializable] +public class PrefabAssetModelData +{ + [SerializeField] public string Name; + + [SerializeField] public string PrefabAssetName; + + [SerializeField] public float[] Position; + + + public PrefabAssetModelData(PrefabAssetModel assetModel) + { + Name = assetModel.Name; + PrefabAssetName = assetModel.PrefabAssetName; + + Position = new float[3]; + Position[0] = assetModel.Position.x; + Position[1] = assetModel.Position.y; + Position[2] = assetModel.Position.z; + } + + public virtual PrefabAssetModelData PrefabAssetModelToData(PrefabAssetModel assetModel) + { + return new PrefabAssetModelData(assetModel); + } + + public virtual PrefabAssetModel MapDataToPrefabAssetModel() + { + return new PrefabAssetModel( + Name, + PrefabAssetName, + new Vector3(Position[0], Position[1], Position[2]) + ); + } +} diff --git a/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModelData.cs.meta b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModelData.cs.meta new file mode 100644 index 00000000..2aaab2c4 --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Shared/PrefabAssetModelData.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 708416e69f724b48bbdf85684475e295 +timeCreated: 1662914978 \ No newline at end of file diff --git a/Assets/Scripts/REFACTORING/Models/Task.meta b/Assets/Scripts/REFACTORING/Models/Task.meta new file mode 100644 index 00000000..d55caf3b --- /dev/null +++ b/Assets/Scripts/REFACTORING/Models/Task.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 65f7529d7a9a4ff2ad3aa7214a1eeab0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Task/Task.cs b/Assets/Scripts/REFACTORING/Models/Task/Task.cs similarity index 77% rename from Assets/Scripts/Task/Task.cs rename to Assets/Scripts/REFACTORING/Models/Task/Task.cs index a500592e..9527c9c0 100644 --- a/Assets/Scripts/Task/Task.cs +++ b/Assets/Scripts/REFACTORING/Models/Task/Task.cs @@ -2,19 +2,11 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public enum TaskHardship { - Easy, - Normal, - Classic, - Medium, - Hard, - Impossible -} - [System.Serializable] public class Task { [SerializeField] public int id; + public int Id { get { return id; } @@ -22,6 +14,7 @@ public class Task } [SerializeField] public string title; + public string Title { get { return title; } @@ -29,24 +22,25 @@ public class Task } [SerializeField] public string description; + public string Description { get { return description; } set { description = value; } } - [SerializeField] public TaskHardship hardnessLevel; + [SerializeField] public TaskDifficultyEnum difficulty; public Task(int _id) { id = _id; } - public Task(int _id, string _title, string _description, TaskHardship _hardnessLevel) + public Task(int _id, string _title, string _description, TaskDifficultyEnum difficulty) { this.id = _id; this.title = _title; this.description = _description; - this.hardnessLevel = _hardnessLevel; + this.difficulty = difficulty; } } diff --git a/Assets/Scripts/Task/Task.cs.meta b/Assets/Scripts/REFACTORING/Models/Task/Task.cs.meta similarity index 100% rename from Assets/Scripts/Task/Task.cs.meta rename to Assets/Scripts/REFACTORING/Models/Task/Task.cs.meta diff --git a/Assets/Scripts/Task/TaskBox.cs b/Assets/Scripts/REFACTORING/Models/Task/TaskBox.cs similarity index 97% rename from Assets/Scripts/Task/TaskBox.cs rename to Assets/Scripts/REFACTORING/Models/Task/TaskBox.cs index 97e16fa4..9801fbfe 100644 --- a/Assets/Scripts/Task/TaskBox.cs +++ b/Assets/Scripts/REFACTORING/Models/Task/TaskBox.cs @@ -14,13 +14,6 @@ public class TaskBox : MonoBehaviour [SerializeField] public Task task; - - - public void Start() - { - - } - public void Update() { RectTransform rt = gameObject.GetComponent(); diff --git a/Assets/Scripts/Task/TaskBox.cs.meta b/Assets/Scripts/REFACTORING/Models/Task/TaskBox.cs.meta similarity index 100% rename from Assets/Scripts/Task/TaskBox.cs.meta rename to Assets/Scripts/REFACTORING/Models/Task/TaskBox.cs.meta diff --git a/Assets/Scripts/SaveController.cs b/Assets/Scripts/SaveController.cs index 007c2621..5b0ca4ed 100644 --- a/Assets/Scripts/SaveController.cs +++ b/Assets/Scripts/SaveController.cs @@ -25,23 +25,26 @@ public class SaveController : MonoBehaviour player.GetComponent().SaveCheckpoint(); } - public void SaveItems() + public void SaveItems() // toDO change name to save Equipment - save items will save items on map eg after drops { - SceneEquippableItemManager.Instance.SaveEquippableItems(); + //SceneEquippableItemManager.Instance.SaveEquippableItems(); + EquipmentDataManager.Instance.SaveDynamicData(); } public void SaveQuests() { - SceneTaskManager.Instance.SaveQuests(); + SceneTaskDataManager.Instance.SaveStaticData(); + + // right now, we dont need to save dynamic list :D } public void SaveInventory() { - SceneInventoryManager.Instance.SaveInventoryItems(); + SceneInventoryDataManager.Instance.SaveStaticData(); } public void SaveChests() { - SceneChestManager.Instance.SaveChests(); + SceneChestDataManager.Instance.SaveDynamicData(); } } diff --git a/Assets/Scripts/SceneManager/SaveChest.meta b/Assets/Scripts/SceneManager/SaveChest.meta deleted file mode 100644 index 49702783..00000000 --- a/Assets/Scripts/SceneManager/SaveChest.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5edd9215206d6134ca9e51265abeb679 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveChest/ChestData.meta b/Assets/Scripts/SceneManager/SaveChest/ChestData.meta deleted file mode 100644 index 437bd713..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/ChestData.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a10cc331a77b9af4aad20839724f2370 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAsset.cs b/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAsset.cs deleted file mode 100644 index cb9167a1..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAsset.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -[System.Serializable] -public class ChestPrefarbAsset -{ - [SerializeField] - public string name; - [SerializeField] - public string prefarbAssetName; - [SerializeField] - public Vector3 position; - [SerializeField] - public Dictionary content = new Dictionary(); - - public ChestPrefarbAsset() {} - - public ChestPrefarbAsset(string _name, string _prefarbAssetName, Vector3 _position, Dictionary _content) - { - name = _name; - prefarbAssetName = _prefarbAssetName; - position = _position; - content = _content; - } -} diff --git a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAsset.cs.meta b/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAsset.cs.meta deleted file mode 100644 index 86ee0041..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAsset.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b770806e2f537ac4ab266a6629ae2fd2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAssetData.cs b/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAssetData.cs deleted file mode 100644 index 18b65431..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAssetData.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System.Linq; - -[System.Serializable] -public class ChestPrefarbAssetData -{ - public string name; - - public string prefarbAssetName; - - public float[] position; - - public Dictionary content = new Dictionary(); - - public ChestPrefarbAssetData(ChestPrefarbAsset chestPrefarbAsset) - { - name = chestPrefarbAsset.name; - prefarbAssetName = chestPrefarbAsset.prefarbAssetName; - - position = new float[3]; - position[0] = chestPrefarbAsset.position.x; - position[1] = chestPrefarbAsset.position.y; - position[2] = chestPrefarbAsset.position.z; - - Debug.Log("ChestPrefarbAsset to ChestPrefarbAssetData - " + chestPrefarbAsset.name); - foreach(KeyValuePair itemEntry in chestPrefarbAsset.content) - { - Debug.Log("Slot nr " + itemEntry.Key); - this.content[itemEntry.Key] = this.EquippableItemPrefarbAssetToData(itemEntry.Value); - } - } - - public EquippableItemPrefarbAssetData EquippableItemPrefarbAssetToData(EquippableItemPrefarbAsset equippableItemPrefarbAsset) - { - return new EquippableItemPrefarbAssetData(equippableItemPrefarbAsset); - } - - public ChestPrefarbAsset MapDataToChestPrefarbAsset() - { - ChestPrefarbAsset chestPrefarbAsset = new ChestPrefarbAsset(); - chestPrefarbAsset.name = this.name; - chestPrefarbAsset.prefarbAssetName = this.prefarbAssetName; - chestPrefarbAsset.position = new Vector3(this.position[0], this.position[1], this.position[2]); - - foreach(KeyValuePair equippableItemPrefarbAssetDataEntry in this.content) - { - chestPrefarbAsset.content[equippableItemPrefarbAssetDataEntry.Key] = equippableItemPrefarbAssetDataEntry.Value.MapDataToEquippableItemPrefarbAsset(); - } - - return chestPrefarbAsset; - } -} diff --git a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAssetData.cs.meta b/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAssetData.cs.meta deleted file mode 100644 index d687df20..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/ChestPrefarbAssetData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9a58ed5e0b9d76143be15d0f7a9d67ce -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveChest/SaveChestSystem.cs b/Assets/Scripts/SceneManager/SaveChest/SaveChestSystem.cs deleted file mode 100644 index f09159b9..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/SaveChestSystem.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; - -public static class SaveChestSystem -{ - private static string map; - -public static void SaveChest(ChestPrefarbAsset chestPrefarbAsset, string ElementFolderName) - { - BinaryFormatter formatter = new BinaryFormatter(); - // todo: add in scene name folder - string path = SaveSystem.GetSavePath(ElementFolderName); -Debug.Log(path); - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - - path += "/" + chestPrefarbAsset.name + ".fun"; - - FileStream stream = new FileStream(path, FileMode.Create); - - ChestPrefarbAssetData chestData = new ChestPrefarbAssetData(chestPrefarbAsset); - - formatter.Serialize(stream, chestData); - stream.Close(); - } - - public static void SaveChestsList(List chestPrefarbAssetList, string _path, string ElementName) - { - BinaryFormatter formatter = new BinaryFormatter(); - // todo: add in scene name folder - string path = SaveSystem.GetSavePath(_path); -Debug.Log("Saved Chest at " + path); - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - - path += "/" + ElementName + ".fun"; - - FileStream stream = new FileStream(path, FileMode.Create); - - List chestsListData = new List(); - - Debug.Log("---- Save Chest"); - - foreach(ChestPrefarbAsset chest in chestPrefarbAssetList) - { - Debug.Log(chest.name); - Debug.Log(chest.content.Count); - foreach(KeyValuePair equippableItemPrefarbAsset in chest.content) - { - Debug.Log("item on position " + equippableItemPrefarbAsset.Key + " " + equippableItemPrefarbAsset.Value.equippableItem.name); - } - chestsListData.Add(new ChestPrefarbAssetData(chest)); - } - - formatter.Serialize(stream, chestsListData); - stream.Close(); - } - - private static void Save() - { - - } - - public static ChestPrefarbAssetData LoadChest(string chestName, string ElementFolderName) - { - string path = SaveSystem.GetSavePath(ElementFolderName) + "/" + chestName;// + ".fun"; - - if(File.Exists(path)) - { - BinaryFormatter formatter = new BinaryFormatter(); - FileStream stream = new FileStream(path, FileMode.Open); - - ChestPrefarbAssetData chestData = formatter.Deserialize(stream) as ChestPrefarbAssetData; - stream.Close(); - - return chestData; - } else { - Debug.Log("Save file not found in " + path); - return null; - } - } - - public static List LoadChestsList(string _path, string ElementName) - { - string path = SaveSystem.GetSavePath(_path) + "/" + ElementName + ".fun"; - - if(File.Exists(path)) - { - - BinaryFormatter formatter = new BinaryFormatter(); - FileStream stream = new FileStream(path, FileMode.Open); - - List chestsListData = formatter.Deserialize(stream) as List; - stream.Close(); - - return chestsListData; - } else { - Debug.Log("Save file not found in " + path); - return null; - } - } -} diff --git a/Assets/Scripts/SceneManager/SaveChest/SaveChestSystem.cs.meta b/Assets/Scripts/SceneManager/SaveChest/SaveChestSystem.cs.meta deleted file mode 100644 index 14213cb9..00000000 --- a/Assets/Scripts/SceneManager/SaveChest/SaveChestSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b3dae3c259ff42a4d8ee3f1d82fb02c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveInventory.meta b/Assets/Scripts/SceneManager/SaveInventory.meta deleted file mode 100644 index cf5b1f17..00000000 --- a/Assets/Scripts/SceneManager/SaveInventory.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1fdd6687dd658574da87271e9677e290 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveInventory/SaveInventorySystem.cs b/Assets/Scripts/SceneManager/SaveInventory/SaveInventorySystem.cs deleted file mode 100644 index 5c9a3077..00000000 --- a/Assets/Scripts/SceneManager/SaveInventory/SaveInventorySystem.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; - -public class SaveInventorySystem : MonoBehaviour -{ - public static void SaveInventoryItemsList(Dictionary equitabbleItemList, string ElementName) - { - BinaryFormatter formatter = new BinaryFormatter(); - // todo: add in scene name folder - string path = SaveSystem.GetSavePath(); -Debug.Log("Saved Inventory at " + path); - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - - path += "/" + ElementName + ".fun"; - - FileStream stream = new FileStream(path, FileMode.Create); - - Dictionary data = new Dictionary(); - - foreach(KeyValuePair equitabbleItemEntry in equitabbleItemList) - { - data[equitabbleItemEntry.Key] = new EquippableItemPrefarbAssetData(equitabbleItemEntry.Value); - } - - formatter.Serialize(stream, data); - stream.Close(); - } - - private static void Save() - { - - } - - public static Dictionary LoadInventoryItemsList(string ElementName) - { - string path = SaveSystem.GetSavePath() + "/" + ElementName + ".fun"; - - if(File.Exists(path)) - { - - BinaryFormatter formatter = new BinaryFormatter(); - FileStream stream = new FileStream(path, FileMode.Open); - - Dictionary equitabbleItemList = formatter.Deserialize(stream) as Dictionary; - stream.Close(); - - return equitabbleItemList; - } else { - Debug.Log("Save file not found in " + path); - return null; - } - } - -} diff --git a/Assets/Scripts/SceneManager/SaveInventory/SaveInventorySystem.cs.meta b/Assets/Scripts/SceneManager/SaveInventory/SaveInventorySystem.cs.meta deleted file mode 100644 index 8465e6b2..00000000 --- a/Assets/Scripts/SceneManager/SaveInventory/SaveInventorySystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0a7279a76f3009541b3e4b3f71cdddf0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemData.meta b/Assets/Scripts/SceneManager/SaveItem/EquippableItemData.meta deleted file mode 100644 index d19875cb..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/EquippableItemData.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e39995ada1a75cf4bb0857afc6d14d67 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemData/EquippableItemData.cs b/Assets/Scripts/SceneManager/SaveItem/EquippableItemData/EquippableItemData.cs deleted file mode 100644 index c1608e96..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/EquippableItemData/EquippableItemData.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; - -[System.Serializable] -public class EquippableItemData : ItemData -{ - public int strengthBonus; - - public int agilityBonus; - - public int inteligenceBonus; - - public int vitalityBonus; - - public bool isStackable; - - public EquipmentType equipmentType; - - private const string ITEM_LOCALIZATION = "Assets/Items/"; - - public EquippableItemData(EquippableItem equippableItem) : base(equippableItem) - { - strengthBonus = equippableItem.StrengthBonus; - agilityBonus = equippableItem.AgilityBonus; - inteligenceBonus = equippableItem.InteligenceBonus; - vitalityBonus = equippableItem.VitalityBonus; - - isStackable = equippableItem.isStackable; - equipmentType = equippableItem.EquipmentType; - } - - - public EquippableItem MapDataToEquippableItem(string prefarbAssetName) - { - // Find prefarb in Assets/ - //Debug.Log("MapDataToEquippableItem: " + ITEM_LOCALIZATION + prefarbAssetName + ".asset"); - EquippableItem equippableItem = (EquippableItem)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + prefarbAssetName + ".asset", typeof(EquippableItem)); - - /// - // DONT OVERWRITE PROPERTIES BECOUSE ITS EDIT MAIN OBJECT IN ASSET/ - /// - - // equippableItem.StrengthBonus = strengthBonus; - // equippableItem.AgilityBonus = agilityBonus; - // equippableItem.InteligenceBonus = inteligenceBonus; - // equippableItem.VitalityBonus = vitalityBonus; - // equippableItem.isStackable = isStackable; - // equippableItem.EquipmentType = equipmentType; - - // Item item = base.MapDataToItem(prefarbAssetName); - // equippableItem.Name = item.Name; - // equippableItem.Description = item.Description; - // equippableItem.Level = item.Level; - // equippableItem.ItemModel = item.ItemModel; - // equippableItem.Image = item.Image; - - return equippableItem; - } -} diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAsset.cs b/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAsset.cs deleted file mode 100644 index ef56ed36..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAsset.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; - -[System.Serializable] -public class EquippableItemPrefarbAsset -{ - [SerializeField] - public string name; - [SerializeField] - public string prefarbAssetName; - [SerializeField] - public Vector3 position; - [SerializeField] - public EquippableItem equippableItem = null; - - public EquippableItemPrefarbAsset() { } - - public EquippableItemPrefarbAsset(string _name, string _prefarbAssetName, Vector3 _position, EquippableItem _equippableItem) - { - name = _name; - prefarbAssetName = _prefarbAssetName; - position = _position; - equippableItem = _equippableItem; - } - - public EquippableItemPrefarbAsset(string _name, string _prefarbAssetName, Vector3 _position, string _equippableItemName) - { - name = _name; // builded object local name (setuped e.g. by admin) - prefarbAssetName = _prefarbAssetName; // builded object name in Assets/ - position = _position; - - string[] assetNames = AssetDatabase.FindAssets("t:EquippableItem", new[] { "Assets/Items/" }); - foreach (string SOName in assetNames) - { - var SOpath = AssetDatabase.GUIDToAssetPath(SOName); - - if(SOpath.Contains(_equippableItemName + ".asset")) - { - // 3.2 set EquippableItem object - equippableItem = AssetDatabase.LoadAssetAtPath(SOpath); - break; - } - } - } -} - diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAsset.cs.meta b/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAsset.cs.meta deleted file mode 100644 index d034a1eb..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAsset.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3954b63bce496d04a9fa9f9f1eac3e76 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAssetData.cs b/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAssetData.cs deleted file mode 100644 index dfb76b92..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAssetData.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -[System.Serializable] -public class EquippableItemPrefarbAssetData -{ - public string name; - - public string prefarbAssetName; - - public float[] position; - - EquippableItemData equippableItemData; - - public EquippableItemPrefarbAssetData(EquippableItemPrefarbAsset equippableItemPrefarbAsset) - { - name = equippableItemPrefarbAsset.name; - prefarbAssetName = equippableItemPrefarbAsset.prefarbAssetName; - - position = new float[3]; - position[0] = equippableItemPrefarbAsset.position.x; - position[1] = equippableItemPrefarbAsset.position.y; - position[2] = equippableItemPrefarbAsset.position.z; - - equippableItemData = this.MapEquippableItemToData(equippableItemPrefarbAsset.equippableItem); - } - - public EquippableItemData MapEquippableItemToData(EquippableItem equippableItem) - { - return new EquippableItemData(equippableItem); - } - - public EquippableItemPrefarbAsset MapDataToEquippableItemPrefarbAsset() - { - EquippableItemPrefarbAsset equippableItemPrefarbAsset = new EquippableItemPrefarbAsset(); - equippableItemPrefarbAsset.name = this.name; - equippableItemPrefarbAsset.prefarbAssetName = this.prefarbAssetName; - equippableItemPrefarbAsset.position = new Vector3(this.position[0], this.position[1], this.position[2]); - - equippableItemPrefarbAsset.equippableItem = this.equippableItemData.MapDataToEquippableItem(equippableItemPrefarbAsset.prefarbAssetName); - - return equippableItemPrefarbAsset; - } -} diff --git a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAssetData.cs.meta b/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAssetData.cs.meta deleted file mode 100644 index 35e74b20..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/EquippableItemPrefarbAssetData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 835b159a6f9f2b64883442142387b34c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveItem/ItemData.meta b/Assets/Scripts/SceneManager/SaveItem/ItemData.meta deleted file mode 100644 index 4796fe35..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/ItemData.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f8f73a42f83f7964fa1578e1dd5b4d61 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveItem/ItemData/ItemData.cs b/Assets/Scripts/SceneManager/SaveItem/ItemData/ItemData.cs deleted file mode 100644 index 62fe57a9..00000000 --- a/Assets/Scripts/SceneManager/SaveItem/ItemData/ItemData.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; - -[System.Serializable] -public class ItemData -{ - public int id; - - public string name; - - public string description; - - public int level; - - public string imageName; - - // to handle object created on scene for example after removing from inventory - public string itemModelName; - - private const string SPRITE_LOCALIZATION = "Sprites/Object Sprites/"; - private const string ITEM_LOCALIZATION = "Assets/Items/"; - - public ItemData(Item item) - { - id = item.id; - name = item.name; - description = item.description; - level = item.level; - imageName = item.image.name; - itemModelName = item.itemModel.name; - } - - public Item MapDataToItem(string prefarbAssetName) - { - // Find prefarb in Assets/ - Item item = (Item)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + prefarbAssetName + ".asset", typeof(Item)); - - /// - // DONT OVERWRITE PROPERTIES BECOUSE ITS EDIT MAIN OBJECT IN ASSET/ - /// - - // item.Id = this.id; - // item.Name = this.name; - // item.Description = this.description; - // item.Level = this.level; - - // Debug.Log(ITEM_LOCALIZATION + this.imageName); - // item.Image = (Sprite)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + this.imageName, typeof(Sprite)); - // Debug.Log(item.Image); - - // item.ItemModel = (GameObject)AssetDatabase.LoadAssetAtPath(ITEM_LOCALIZATION + "Gold Ore" + ".prefab", typeof(GameObject)); - - return item; - } -} \ No newline at end of file diff --git a/Assets/Scripts/SceneManager/SaveItem/SaveEquitableItemSystem.cs b/Assets/Scripts/SceneManager/SaveItem/SaveEquitableItemSystem.cs index 05dfd66c..a95e2f65 100644 --- a/Assets/Scripts/SceneManager/SaveItem/SaveEquitableItemSystem.cs +++ b/Assets/Scripts/SceneManager/SaveItem/SaveEquitableItemSystem.cs @@ -9,7 +9,7 @@ public static class SaveEquippableItemSystem private static string map; - public static void SaveEquitableItem(EquippableItemPrefarbAsset equitabbleItem, string ElementFolderName) + public static void SaveEquitableItem(EquippableItemPrefabAsset equitabbleItem, string ElementFolderName) { BinaryFormatter formatter = new BinaryFormatter(); // todo: add in scene name folder @@ -18,17 +18,17 @@ Debug.Log(path); if (!Directory.Exists(path)) Directory.CreateDirectory(path); - path += "/" + equitabbleItem.name + ".fun"; + path += "/" + equitabbleItem.Name + ".fun"; FileStream stream = new FileStream(path, FileMode.Create); - EquippableItemPrefarbAssetData data = new EquippableItemPrefarbAssetData(equitabbleItem); + EquippableItemPrefabAssetData data = new EquippableItemPrefabAssetData(equitabbleItem); formatter.Serialize(stream, data); stream.Close(); } - public static void SaveEquitableItemList(List equitabbleItemList, string _path, string ElementName) + public static void SaveEquitableItemList(List equitabbleItemList, string _path, string ElementName) { BinaryFormatter formatter = new BinaryFormatter(); // todo: add in scene name folder @@ -41,11 +41,11 @@ Debug.Log("Saved EquitableItemList at " + path); FileStream stream = new FileStream(path, FileMode.Create); - List data = new List(); + List data = new List(); - foreach(EquippableItemPrefarbAsset equitabbleItem in equitabbleItemList) + foreach(EquippableItemPrefabAsset equitabbleItem in equitabbleItemList) { - data.Add(new EquippableItemPrefarbAssetData(equitabbleItem)); + data.Add(new EquippableItemPrefabAssetData(equitabbleItem)); } formatter.Serialize(stream, data); @@ -57,7 +57,7 @@ Debug.Log("Saved EquitableItemList at " + path); } - public static EquippableItemPrefarbAssetData LoadEquitableItem(string equitabbleItemName, string ElementFolderName) + public static EquippableItemPrefabAssetData LoadEquitableItem(string equitabbleItemName, string ElementFolderName) { string path = SaveSystem.GetSavePath(ElementFolderName) + "/" + equitabbleItemName;// + ".fun"; @@ -66,7 +66,7 @@ Debug.Log("Saved EquitableItemList at " + path); BinaryFormatter formatter = new BinaryFormatter(); FileStream stream = new FileStream(path, FileMode.Open); - EquippableItemPrefarbAssetData equitabbleItem = formatter.Deserialize(stream) as EquippableItemPrefarbAssetData; + EquippableItemPrefabAssetData equitabbleItem = formatter.Deserialize(stream) as EquippableItemPrefabAssetData; stream.Close(); return equitabbleItem; @@ -76,7 +76,7 @@ Debug.Log("Saved EquitableItemList at " + path); } } - public static List LoadEquitableItemList(string _path, string ElementName) + public static List LoadEquitableItemList(string _path, string ElementName) { string path = SaveSystem.GetSavePath(_path) + "/" + ElementName + ".fun"; @@ -86,7 +86,7 @@ Debug.Log("Saved EquitableItemList at " + path); BinaryFormatter formatter = new BinaryFormatter(); FileStream stream = new FileStream(path, FileMode.Open); - List equitabbleItemList = formatter.Deserialize(stream) as List; + List equitabbleItemList = formatter.Deserialize(stream) as List; stream.Close(); return equitabbleItemList; diff --git a/Assets/Scripts/SceneManager/SaveTask.meta b/Assets/Scripts/SceneManager/SaveTask.meta deleted file mode 100644 index e93d35dc..00000000 --- a/Assets/Scripts/SceneManager/SaveTask.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 58865c060b4d23f41af849da7f95c807 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SaveTask/SaveQuestSystem.cs b/Assets/Scripts/SceneManager/SaveTask/SaveQuestSystem.cs deleted file mode 100644 index bbb6f1d7..00000000 --- a/Assets/Scripts/SceneManager/SaveTask/SaveQuestSystem.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; - -public static class SaveQuestSystem -{ - public static void SaveQuestItem(Task quest, string ElementFolderName) - { - BinaryFormatter formatter = new BinaryFormatter(); - // todo: add in scene name folder - string path = SaveSystem.GetSavePath(ElementFolderName); -Debug.Log(path); - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - - path += "/" + quest.title + ".fun"; - - FileStream stream = new FileStream(path, FileMode.Create); - - - formatter.Serialize(stream, quest); - stream.Close(); - } - - public static void SaveQuestsList(List questsList, string ElementName) - { - BinaryFormatter formatter = new BinaryFormatter(); - // todo: add in scene name folder - string path = SaveSystem.GetSavePath(); -Debug.Log("Saved Quest at " + path); - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - - path += "/" + ElementName + ".fun"; - - FileStream stream = new FileStream(path, FileMode.Create); - - formatter.Serialize(stream, questsList); - stream.Close(); - } - - private static void Save() - { - - } - - public static Task LoadQuestItem(string questTitle, string ElementFolderName) - { - string path = SaveSystem.GetSavePath(ElementFolderName) + "/" + questTitle;// + ".fun"; - - if(File.Exists(path)) - { - BinaryFormatter formatter = new BinaryFormatter(); - FileStream stream = new FileStream(path, FileMode.Open); - - Task quest = formatter.Deserialize(stream) as Task; - stream.Close(); - - return quest; - } else { - Debug.Log("Save file not found in " + path); - return null; - } - } - - public static List LoadQuestsList(string ElementName) - { - string path = SaveSystem.GetSavePath() + "/" + ElementName + ".fun"; - - if(File.Exists(path)) - { - - BinaryFormatter formatter = new BinaryFormatter(); - FileStream stream = new FileStream(path, FileMode.Open); - - List questsList = formatter.Deserialize(stream) as List; - stream.Close(); - - return questsList; - } else { - Debug.Log("Save file not found in " + path); - return null; - } - } - - private static void Load() - { - - } -} diff --git a/Assets/Scripts/SceneManager/SaveTask/SaveQuestSystem.cs.meta b/Assets/Scripts/SceneManager/SaveTask/SaveQuestSystem.cs.meta deleted file mode 100644 index aa3930bf..00000000 --- a/Assets/Scripts/SceneManager/SaveTask/SaveQuestSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 24fcf11bf60d7c14685586981559ae5f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SceneChestManager.cs b/Assets/Scripts/SceneManager/SceneChestManager.cs deleted file mode 100644 index 332170cd..00000000 --- a/Assets/Scripts/SceneManager/SceneChestManager.cs +++ /dev/null @@ -1,273 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using UnityEngine.SceneManagement; -using System.IO; -using System.Linq; - -// only for eqipptable items -public class SceneChestManager : MonoBehaviour -{ - private const string GameObjectLocalization = "Assets/Items/Chest/"; // for prefarb - - private const string AssetLocalization = "Assets/Items/"; // for Equitabble asset - - //private const string DYNAMIC_ELEMENT = "/DynamicElements/"; - private const string STATIC_ELEMENT = "/StaticElements/"; - - // content skrzyni (docelowo skrzynia + jej content) - - /// - /// Handle manually setuped object properties - /// eg. npc, minions, chest content - /// - [SerializeField] - public List StaticElements; - - /// - /// Handle dynamic object properties - /// eg. dropped items - /// - // PrefarbAsset - [SerializeField] - public List DynamicElements; - - public bool isNewGame = true; - public bool isContinued = false; - public string MapName; - public string ElementFolderName = "Chest"; - public string ItemsListName = "ChestList"; - - public static SceneChestManager Instance; - - public void Awake() - { - if(Instance == null) - { - this.MapName = SceneManager.GetActiveScene().name; - - if(isNewGame) // in new game dynamicItemsList is defaulty empty - { - //BuildChests(StaticElements); - - }else if(isContinued) - { - //LoadChests(); - - //BuildChests(DynamicElements); - } - - Instance = this; - - - }else if (Instance != this) - { - Destroy(gameObject); - } - - - } - - public void Start() - { - // EXAMPLE HOW TO ADD ELEMENTS TO CHEST - // - // this.StaticElements.Add( - // new ChestPrefarbAsset("test chest", "Wooden Chest", new Vector3(0, 0, 0), - // new Dictionary{ - // {1, new EquippableItemPrefarbAsset("Pickaxe test", "Pickaxe", new Vector3(0,0,0), "Pickaxe")}, - // {4, new EquippableItemPrefarbAsset("Gold ore test", "Gold Ore", new Vector3(0,0,0), "Gold Ore")}, - // }) - // ); - - LoadChests(); - BuildChests(StaticElements); - - } - - public int AddItemToChest(string chestName, int keyPosition, EquippableItem addedItem){ - - // 1. Find Chest in List and update value - this.StaticElements.Where(chestPrefarbAsset => chestPrefarbAsset.name == chestName).ToList().ForEach(chest => { - chest.content[keyPosition] = new EquippableItemPrefarbAsset(addedItem.name, addedItem.name, new Vector3(0,0,0), addedItem); - Debug.Log("Added element " + addedItem.name + " to chest (" + chestName + ")"); - }); - - return keyPosition; - } - - public void RemoveItemFromChest(string chestName, int keyPosition) - { - // 1. Find Chest in List - baically ther should be one chest with this name but who know :D - this.StaticElements.Where(chestPrefarbAsset => chestPrefarbAsset.name == chestName).ToList().ForEach(chest => { - chest.content.Remove(keyPosition); - Debug.Log("Removed element on position -" + keyPosition + " - from chest (" + chestName + ")"); - }); - } - - // public void RemoveDynamicEquippableItem(EquippableItemPrefarbAsset equippableItemPrefarbAsset) - // { - // } - - public void BuildChests(List chestPrefarbAssetList) - { - foreach(ChestPrefarbAsset chestPrefarbAsset in chestPrefarbAssetList) - { - - GameObject newChestObject = (GameObject)AssetDatabase.LoadAssetAtPath(GameObjectLocalization + chestPrefarbAsset.prefarbAssetName + ".prefab", typeof(GameObject)); - - if(!newChestObject) - { - Debug.Log("Can't find prefarb by name " + chestPrefarbAsset.prefarbAssetName); - break; - } - - - GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0]; - - if(globalGUI) - { - // 1. Create gameObject by handled prefarb - // 2. SetUp - // 2.1 Set position - GameObject chest = Instantiate(newChestObject, chestPrefarbAsset.position, Quaternion.identity, globalGUI.transform); - - // 2.2 Set name - chest.name = chestPrefarbAsset.name; - - //chest.transform.SetParent(globalGUI.transform); - // 2.3 Set pransform - chest.transform.localScale = new Vector3(0.5f, 0.5f, 1); - - // 3. SetUp EqippableItems list - Dictionary itemsOfChestList = chestPrefarbAsset.content; - - string[] assetNames = AssetDatabase.FindAssets("t:EquippableItem", new[] { AssetLocalization }); - - foreach(KeyValuePair itemsOfChestEntry in itemsOfChestList) - { - // 3.1 find object - foreach (string SOName in assetNames) - { - var SOpath = AssetDatabase.GUIDToAssetPath(SOName); - - if(SOpath.Contains(itemsOfChestEntry.Value.prefarbAssetName + ".asset")) - { - // 3.2 set EquippableItem object - chest.GetComponent().SetupItemInChest( - itemsOfChestEntry.Key, - AssetDatabase.LoadAssetAtPath(SOpath) - ); - - break; - } - } - } - - - - - } else { - Debug.Log("Can't find global GUI object!!!"); - break; - } - } - } - - // public void BuildChestItems(Dictionary itemsList) - // { - // // pass to InventoryManager singleton - // foreach(KeyValuePair itemEntry in itemsList) - // InventoryManager.Instance.SetupItemInInventory(itemEntry.Key, itemEntry.Value.equippableItem); - // } - - /// Save both list of EquippableItems - public void SaveChests() - { - // 1. staticElements - this.SaveStaticChestsList(); - } - - #region Static list of EquippableItem Save - private void SaveStaticChestsList() - { - // 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(this.StaticElements.Count > 0) { - SaveChestSystem.SaveChestsList(this.StaticElements, this.MapName + STATIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset - } else { - string _path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT) + "/" + 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 - } - #endregion - - public void LoadChests() - { - // if continue -> search files with content in save path - - // if new game -> build objects from default configuration - Debug.Log("Load chest"); - this.LoadStaticChestsList(); - } - - - - #region Static list of Chest Loader - public void LoadStaticChestsList() - { - string path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT); - - 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) - { - Debug.Log(file.FullName); - - List chestPrefarbAssetList = new List(); - - List chestPrefarbAssetDataList = SaveChestSystem.LoadChestsList(this.MapName + STATIC_ELEMENT, this.ItemsListName); - - foreach(ChestPrefarbAssetData chestPrefarbAssetData in chestPrefarbAssetDataList) - chestPrefarbAssetList.Add(chestPrefarbAssetData.MapDataToChestPrefarbAsset()); - - Debug.Log("---- Load Chest"); - - foreach(ChestPrefarbAsset chest in chestPrefarbAssetList) - { - Debug.Log(chest.name); - foreach(KeyValuePair equippableItemPrefarbAsset in chest.content) - { - // Debug.Log("item on position " + equippableItemPrefarbAsset.Key + - // " " + equippableItemPrefarbAsset.Value.equippableItem.name); - } - } - - this.StaticElements = chestPrefarbAssetList; - } - } - #endregion -} diff --git a/Assets/Scripts/SceneManager/SceneChestManager.cs.meta b/Assets/Scripts/SceneManager/SceneChestManager.cs.meta deleted file mode 100644 index 6b74446e..00000000 --- a/Assets/Scripts/SceneManager/SceneChestManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1b522b9a99467e740adc3e2ce6036ebe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SceneEquippableItemManager.cs b/Assets/Scripts/SceneManager/SceneEquippableItemManager.cs index a367f279..9a23f8a1 100644 --- a/Assets/Scripts/SceneManager/SceneEquippableItemManager.cs +++ b/Assets/Scripts/SceneManager/SceneEquippableItemManager.cs @@ -23,7 +23,7 @@ public class SceneEquippableItemManager : MonoBehaviour /// eg. npc, minions, chest content /// [SerializeField] - public List StaticElements; + public List StaticElements; /// /// Handle dynamic object properties @@ -31,7 +31,7 @@ public class SceneEquippableItemManager : MonoBehaviour /// // PrefarbAsset [SerializeField] - public List DynamicElements; + public List DynamicElements; public bool isNewGame = true; public bool isContinued = false; @@ -81,14 +81,14 @@ public class SceneEquippableItemManager : MonoBehaviour // public void AddDynamicItem(GameObject object) { // //EquippableItem item = object.GetComponent().Item; - // //EquippableItemPrefarbAsset equippableItemPrefarbAsset = new EquippableItemPrefarbAsset(item.name, object.name, object.transform.position, item); + // //EquippableItemPrefabAsset equippableItemPrefarbAsset = new EquippableItemPrefabAsset(item.name, object.name, object.transform.position, item); // //this.dynamicItems.Add(equippableItemPrefarbAsset); // } public int AddDynamicItem(GameObject dynamicObject) { EquippableItem item = dynamicObject.GetComponent().item; - EquippableItemPrefarbAsset equippableItemPrefarbAsset = new EquippableItemPrefarbAsset(item.name, dynamicObject.name, dynamicObject.transform.position, item); + EquippableItemPrefabAsset equippableItemPrefarbAsset = new EquippableItemPrefabAsset(item.name, dynamicObject.name, dynamicObject.transform.position, item); this.DynamicElements.Add(equippableItemPrefarbAsset); @@ -98,26 +98,26 @@ public class SceneEquippableItemManager : MonoBehaviour public void RemoveDynamicItem(string name) { // 1. Fetch all matched items - List equippableItemPrefarbAssetList = this.DynamicElements.Where(eqItemAss => eqItemAss.name == name).ToList(); + List equippableItemPrefarbAssetList = this.DynamicElements.Where(eqItemAss => eqItemAss.Name == name).ToList(); // 2. Remove them - this.DynamicElements.RemoveAll(eqItemAss => eqItemAss.name == name); + this.DynamicElements.RemoveAll(eqItemAss => eqItemAss.Name == name); } - public void RemoveDynamicEquippableItem(EquippableItemPrefarbAsset equippableItemPrefarbAsset) + public void RemoveDynamicEquippableItem(EquippableItemPrefabAsset equippableItemPrefarbAsset) { } - public void BuildItems(List equippableItemPrefarbAssetList) + public void BuildItems(List equippableItemPrefarbAssetList) { - foreach(EquippableItemPrefarbAsset equippableItemPrefarbAsset in equippableItemPrefarbAssetList) + foreach(EquippableItemPrefabAsset equippableItemPrefarbAsset in equippableItemPrefarbAssetList) { - GameObject newEquippableItemObject = (GameObject)AssetDatabase.LoadAssetAtPath(GameObjectLocalization + equippableItemPrefarbAsset.prefarbAssetName + ".prefab", typeof(GameObject)); + GameObject newEquippableItemObject = (GameObject)AssetDatabase.LoadAssetAtPath(GameObjectLocalization + equippableItemPrefarbAsset.PrefabAssetName + ".prefab", typeof(GameObject)); if(!newEquippableItemObject) { - Debug.Log("Can't find prefarb by name " + equippableItemPrefarbAsset.prefarbAssetName); + Debug.Log("Can't find prefarb by name " + equippableItemPrefarbAsset.PrefabAssetName); break; } @@ -129,10 +129,10 @@ public class SceneEquippableItemManager : MonoBehaviour // 1. Create gameObject by handled prefarb // 2. SetUp // 2.1 Set position - GameObject equippableItem = Instantiate(newEquippableItemObject, equippableItemPrefarbAsset.position, Quaternion.identity, globalGUI.transform); + GameObject equippableItem = Instantiate(newEquippableItemObject, equippableItemPrefarbAsset.Position, Quaternion.identity, globalGUI.transform); // 2.2 Set name - equippableItem.name = equippableItemPrefarbAsset.name; + equippableItem.name = equippableItemPrefarbAsset.Name; equippableItem.transform.SetParent(globalGUI.transform); // 2.3 Set pransform @@ -147,7 +147,7 @@ public class SceneEquippableItemManager : MonoBehaviour { var SOpath = AssetDatabase.GUIDToAssetPath(SOName); - if(SOpath.Contains(equippableItemPrefarbAsset.prefarbAssetName + ".asset")) + if(SOpath.Contains(equippableItemPrefarbAsset.PrefabAssetName + ".asset")) { // 3.2 set EquippableItem object equippableItem.GetComponent().item = AssetDatabase.LoadAssetAtPath(SOpath); @@ -173,9 +173,9 @@ public class SceneEquippableItemManager : MonoBehaviour this.SaveDynamicEquippableItemsList(); /// Load One element example - // foreach(EquippableItemPrefarbAsset equippableItemPrefarbAsset in equippableItemPrefarbAssetList) + // foreach(EquippableItemPrefabAsset equippableItemPrefarbAsset in equippableItemPrefarbAssetList) // { - // SaveEquippableItemSystem.SaveEquitableItem(equippableItemPrefarbAsset, this.MapName + "/" + this.ElementFolderName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset + // SaveEquippableItemSystem.SaveEquitableItem(equippableItemPrefarbAsset, this.MapName + "/" + this.ElementFolderName); // change to SaveEquippableItemSystem for EquippableItemPrefabAsset // } } @@ -187,7 +187,7 @@ public class SceneEquippableItemManager : MonoBehaviour // 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(this.StaticElements.Count > 0) { - SaveEquippableItemSystem.SaveEquitableItemList(this.StaticElements, this.MapName + STATIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset + SaveEquippableItemSystem.SaveEquitableItemList(this.StaticElements, this.MapName + STATIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefabAsset } else { string _path = SaveSystem.GetSavePath(this.MapName + STATIC_ELEMENT) + "/" + this.ItemsListName + ".fun"; @@ -220,7 +220,7 @@ public class SceneEquippableItemManager : MonoBehaviour // 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(this.DynamicElements.Count > 0) { - SaveEquippableItemSystem.SaveEquitableItemList(this.DynamicElements, this.MapName + DYNAMIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefarbAsset + SaveEquippableItemSystem.SaveEquitableItemList(this.DynamicElements, this.MapName + DYNAMIC_ELEMENT, this.ItemsListName); // change to SaveEquippableItemSystem for EquippableItemPrefabAsset } else { string _path = SaveSystem.GetSavePath(this.MapName + DYNAMIC_ELEMENT) + "/" + this.ItemsListName + ".fun"; @@ -276,9 +276,9 @@ public class SceneEquippableItemManager : MonoBehaviour { Debug.Log(file.FullName); - EquippableItemPrefarbAssetData equippableItemPrefarbAssetData = SaveEquippableItemSystem.LoadEquitableItem(file.Name, this.MapName + DYNAMIC_ELEMENT + this.ElementFolderName); + EquippableItemPrefabAssetData equippableItemPrefarbAssetData = SaveEquippableItemSystem.LoadEquitableItem(file.Name, this.MapName + DYNAMIC_ELEMENT + this.ElementFolderName); - DynamicElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset()); + DynamicElements.Add((EquippableItemPrefabAsset)((EquippableItemPrefabAssetData)equippableItemPrefarbAssetData).MapDataToPrefabAssetModel()); } } @@ -296,10 +296,10 @@ public class SceneEquippableItemManager : MonoBehaviour if(file.Name != this.ItemsListName + ".fun") continue; - List equippableItemPrefarbAssetDataList = SaveEquippableItemSystem.LoadEquitableItemList(this.MapName + DYNAMIC_ELEMENT, this.ItemsListName); + List equippableItemPrefarbAssetDataList = SaveEquippableItemSystem.LoadEquitableItemList(this.MapName + DYNAMIC_ELEMENT, this.ItemsListName); - foreach(EquippableItemPrefarbAssetData equippableItemPrefarbAssetData in equippableItemPrefarbAssetDataList) - DynamicElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset()); + foreach(EquippableItemPrefabAssetData equippableItemPrefarbAssetData in equippableItemPrefarbAssetDataList) + DynamicElements.Add((EquippableItemPrefabAsset)((EquippableItemPrefabAssetData)equippableItemPrefarbAssetData).MapDataToPrefabAssetModel()); } } #endregion @@ -318,9 +318,9 @@ public class SceneEquippableItemManager : MonoBehaviour { Debug.Log(file.FullName); - EquippableItemPrefarbAssetData equippableItemPrefarbAssetData = SaveEquippableItemSystem.LoadEquitableItem(file.Name, this.MapName + STATIC_ELEMENT + this.ElementFolderName); + EquippableItemPrefabAssetData equippableItemPrefarbAssetData = SaveEquippableItemSystem.LoadEquitableItem(file.Name, this.MapName + STATIC_ELEMENT + this.ElementFolderName); - StaticElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset()); + StaticElements.Add((EquippableItemPrefabAsset)((EquippableItemPrefabAssetData)equippableItemPrefarbAssetData).MapDataToPrefabAssetModel()); } } @@ -337,10 +337,10 @@ public class SceneEquippableItemManager : MonoBehaviour { Debug.Log(file.FullName); - List equippableItemPrefarbAssetDataList = SaveEquippableItemSystem.LoadEquitableItemList(this.MapName + STATIC_ELEMENT, this.ItemsListName); + List equippableItemPrefarbAssetDataList = SaveEquippableItemSystem.LoadEquitableItemList(this.MapName + STATIC_ELEMENT, this.ItemsListName); - foreach(EquippableItemPrefarbAssetData equippableItemPrefarbAssetData in equippableItemPrefarbAssetDataList) - StaticElements.Add(equippableItemPrefarbAssetData.MapDataToEquippableItemPrefarbAsset()); + foreach(EquippableItemPrefabAssetData equippableItemPrefarbAssetData in equippableItemPrefarbAssetDataList) + StaticElements.Add((EquippableItemPrefabAsset)((EquippableItemPrefabAssetData)equippableItemPrefarbAssetData).MapDataToPrefabAssetModel()); } } #endregion diff --git a/Assets/Scripts/SceneManager/SceneInventoryManager.cs b/Assets/Scripts/SceneManager/SceneInventoryManager.cs deleted file mode 100644 index 93ead190..00000000 --- a/Assets/Scripts/SceneManager/SceneInventoryManager.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using UnityEngine.SceneManagement; -using System.IO; -using System.Linq; - -public class SceneInventoryManager : MonoBehaviour -{ - private const string DYNAMIC_ELEMENT = "/DynamicElements/"; - private const string STATIC_ELEMENT = "/StaticElements/"; - - [SerializeField] - public Dictionary ItemsElements = new Dictionary(); - - public bool isNewGame = true; - public bool isContinued = false; - public string MapName; - public string ElementFolderName = "InventoryItem"; - public string ItemsListName = "InventoryItemList"; - - public static SceneInventoryManager Instance; - - public void Awake() - { - if(Instance == null) - { - this.MapName = SceneManager.GetActiveScene().name; - - Instance = this; - - - }else if (Instance != this) - { - Destroy(gameObject); - } - } - - public void Start() - { - LoadInventoryItems(); // load user items - - BuildInventoryItems(ItemsElements); // pass them to InventoryManager - } - - /// - /// Pass quest to taskManager after load data - /// - public void BuildInventoryItems(Dictionary itemsList) - { - // pass to InventoryManager singleton - foreach(KeyValuePair itemEntry in itemsList) - InventoryManager.Instance.SetupItemInInventory(itemEntry.Key, itemEntry.Value.equippableItem); - } - - public void RemoveInventoryItems(string _name) - { - // 1. Fetch all matched quests - we search by title which shoudl be unique but who know :D - List itemsList = this.ItemsElements.Where(item => item.Value.name == _name).Select(item => item.Key).ToList(); - - // 2. Remove them - foreach(var item in this.ItemsElements.Where(item => item.Value.name == _name).ToList()) - { - this.ItemsElements.Remove(item.Key); - } - } - - /// - /// Use TaskManaager list to save user quests - TaskManager.Instance.taskList - /// - 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' to 'Dictionary' - Dictionary mappedList = new Dictionary(); - - foreach(KeyValuePair itemElement in InventoryManager.Instance._items) - { - mappedList[itemElement.Key] = new EquippableItemPrefarbAsset( - 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 - } - - /// - /// Load quests to local list - /// Pass this to taskManager in outside method - /// - public void LoadInventoryItems() - { - this.LoadInventoryItemsList(); - } - - 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 equippableItemsList = SaveInventorySystem.LoadInventoryItemsList(this.ItemsListName); - - // itemEntry.Value.MapDataToEquippableItem() - map data format to object - - // save object - foreach(KeyValuePair itemEntry in equippableItemsList) - { - InventoryManager.Instance.SetupItemInInventory(itemEntry.Key, itemEntry.Value.MapDataToEquippableItemPrefarbAsset().equippableItem); - } - - } - } -} diff --git a/Assets/Scripts/SceneManager/SceneInventoryManager.cs.meta b/Assets/Scripts/SceneManager/SceneInventoryManager.cs.meta deleted file mode 100644 index c8c42e43..00000000 --- a/Assets/Scripts/SceneManager/SceneInventoryManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef71482e4d2df8440a1117e181018706 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SceneManager/SceneTaskManager.cs b/Assets/Scripts/SceneManager/SceneTaskManager.cs deleted file mode 100644 index fb237213..00000000 --- a/Assets/Scripts/SceneManager/SceneTaskManager.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using UnityEngine.SceneManagement; -using System.IO; -using System.Linq; - -public class SceneTaskManager : MonoBehaviour -{ - private const string DYNAMIC_ELEMENT = "/DynamicElements/"; - private const string STATIC_ELEMENT = "/StaticElements/"; - - [SerializeField] - public List TaskElements; - - public bool isNewGame = true; - public bool isContinued = false; - public string MapName; - public string ElementFolderName = "Quest"; - public string ItemsListName = "QuestsList"; - - public static SceneTaskManager Instance; - - public void Awake() - { - if(Instance == null) - { - this.MapName = SceneManager.GetActiveScene().name; - - Instance = this; - - - }else if (Instance != this) - { - Destroy(gameObject); - } - } - - public void Start() - { - LoadQuests(); // load user quests - BuildQuests(TaskElements); // pass them to TaskManager - } - - /// - /// Pass quest to taskManager after load data - /// - public void BuildQuests(List questList) - { - // pass to taskManager singleton - foreach(Task quest in questList) - TaskManager.Instance.AddTask(quest); - } - - public int AddQuest(GameObject dynamicObject) - { - Task quest = dynamicObject.GetComponent().task; - - this.TaskElements.Add(quest); - - return this.TaskElements.Count - 1; - } - - // NIE UŻYWANA !!! - // TODO - usuwane mają być elementy z listy tasków z Taskmanagera - pozbyć sie tej listy najepiej tu - // TA LISTA SŁUŻY TYLKO DO ODCZYTU Z PLIKÓW I PRZEKAZANIU WARTOŚCI DO MANAGERA - NIR DO KASOWANIA - public void RemoveQuest(string _title) - { - // 1. Fetch all matched quests - we search by title which shoudl be unique but who know :D - List questList = this.TaskElements.Where(quest => quest.title == _title).ToList(); - - // 2. Remove them - this.TaskElements.RemoveAll(quest => quest.title == _title); - } - - /// - /// Use TaskManaager list to save user quests - TaskManager.Instance.taskList - /// - public void SaveQuests() - { - // Case I - if we remember all list - // 1) if after removed item form DynamicList is empty - remove all file - // 2) if after removed item form DynamciList there are another one - save updated list again - if(TaskManager.Instance.taskList.Count > 0) { - SaveQuestSystem.SaveQuestsList(TaskManager.Instance.taskList, this.ItemsListName); - } else { - string _path = SaveSystem.GetSavePath() + "/" + this.ItemsListName + ".fun"; - - try - { - Debug.Log("File to remove: " + _path); - - if(File.Exists(_path)) - { - File.Delete(_path); - } - } - catch (IOException ioExp) - { - Debug.LogError(ioExp.Message); - } - } - - // Case II - if we rememenber object per file - // 1) remove specyfic file - // - // Unfortunatelly we don't use this way of saving items yet :D - } - - /// - /// Load quests to local list - /// Pass this to taskManager in outside method - /// - public void LoadQuests() - { - string path = SaveSystem.GetSavePath(); - - if (!Directory.Exists(path)) // if not exists thats mean there was nothing saved yet - nothing to load - return; - - FileInfo[] fileInfo = new DirectoryInfo(path).GetFiles(); - - foreach(FileInfo file in fileInfo) - { - if(file.Name != this.ItemsListName + ".fun") - continue; - - List taskList = SaveQuestSystem.LoadQuestsList(this.ItemsListName); - - foreach(Task task in taskList) - TaskElements.Add(task); - } - } -} diff --git a/Assets/Scripts/SceneManager/SceneTaskManager.cs.meta b/Assets/Scripts/SceneManager/SceneTaskManager.cs.meta deleted file mode 100644 index 920b49a7..00000000 --- a/Assets/Scripts/SceneManager/SceneTaskManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8a65f0b147a2e44e8f244301ff0de57 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SettingsButton.cs b/Assets/Scripts/SettingsButton.cs index 73c1ac54..81673068 100644 --- a/Assets/Scripts/SettingsButton.cs +++ b/Assets/Scripts/SettingsButton.cs @@ -9,7 +9,7 @@ namespace GUI_Scripts public void manageWindow() { - if(!InventoryManager.Instance.isOpen && !EquipmentManager.Instance.isOpen) + if(!InventoryUIManager.Instance.GetPanelStatus() && !EquipmentUIManager.Instance.GetPanelStatus()) this.OpenPlayerPanel(); else this.ClosePlayerPanel(); @@ -17,19 +17,19 @@ namespace GUI_Scripts } public void OpenPlayerPanel() { - if(!InventoryManager.Instance.isOpen || !EquipmentManager.Instance.isOpen) + if(!InventoryUIManager.Instance.GetPanelStatus() || !EquipmentUIManager.Instance.GetPanelStatus()) { - InventoryManager.Instance.OpenPanel(); - EquipmentManager.Instance.OpenPanel(); + InventoryUIManager.Instance.OpenPanel(); + EquipmentUIManager.Instance.OpenPanel(); } } public void ClosePlayerPanel() { - if(InventoryManager.Instance.isOpen || EquipmentManager.Instance.isOpen) + if(InventoryUIManager.Instance.GetPanelStatus() || EquipmentUIManager.Instance.GetPanelStatus()) { - InventoryManager.Instance.ClosePanel(); - EquipmentManager.Instance.ClosePanel(); + InventoryUIManager.Instance.ClosePanel(); + EquipmentUIManager.Instance.ClosePanel(); } } diff --git a/Assets/Scripts/Task/TaskManager.cs b/Assets/Scripts/Task/TaskManager.cs deleted file mode 100644 index 092528cd..00000000 --- a/Assets/Scripts/Task/TaskManager.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - - -[System.Serializable] -public class TaskManager : MonoBehaviour -{ - public static TaskManager Instance; - - [SerializeField] public GameObject _panel_template; - - protected GameObject dynamicPanel; - public bool isOpen = false; - - [Header("Tasks list")] - [SerializeField] public List taskList; - - private void Awake() - { - if(Instance == null) - { - Instance = this; - - }else if (Instance != this) - { - Destroy(gameObject); - } - } - - public void Update() - { - if (Input.GetKeyDown(KeyCode.Q)) - { - if (this._panel_template && !this.isOpen) - { - this.OpenPanel(); - } else - { - this.ClosePanel(); - } - } - } - - /// - // Function which opne Task Panel if its close - // - // Create new Task Panel object instance on scene - /// - public void OpenPanel() - { - GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0]; - - if(globalGUI) - { - this.dynamicPanel = Instantiate(_panel_template, _panel_template.transform.position, Quaternion.identity, globalGUI.transform); // 4'th arg allow set object as child - - this.dynamicPanel.transform.localPosition = _panel_template.transform.position; // prevent overwritten position by... environment??? - - this.SetupPanel(); // bind pandel to current chest - - isOpen = true; - } else { - Debug.Log("Can't find global GUI object!!!"); - } - - } - - /// - // Function which close Task Panel if its open - /// - public virtual void ClosePanel() - { - Destroy(dynamicPanel); - isOpen = false; - } - - /// - // Function which allow to add new task to manager list of tasks - // - // Task Panel use this list during setup process - /// - public void AddTask(Task _task) - { - taskList.Add(_task); - } - - - private void SetupPanel() - { - if(this.dynamicPanel) - { - this.dynamicPanel.GetComponent().Setup(taskList); - } - } -} diff --git a/Assets/Scripts/Task/TaskManager.cs.meta b/Assets/Scripts/Task/TaskManager.cs.meta deleted file mode 100644 index aa9230fe..00000000 --- a/Assets/Scripts/Task/TaskManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cfdba4ab39859774dab558d713b06989 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Task/TaskPanelController.cs b/Assets/Scripts/Task/TaskPanelController.cs deleted file mode 100644 index d563b830..00000000 --- a/Assets/Scripts/Task/TaskPanelController.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -using UnityEngine.EventSystems; -using System; - -public class TaskPanelController : MonoBehaviour -{ - [Header("Panel Information")] - [SerializeField] protected GameObject _panelContent; - [SerializeField] private TaskBox taskbox_template; - [SerializeField] private List taskBox_list; - - protected void InitPanelBoxes(List _tasks) - { - if(_panelContent) - { - for(int i = 0; i < _tasks.Count; i++) - { - this.AddTask(_tasks[i]); - } - } - } - - protected TaskBox SetupTaskBox(Task _task) - { - TaskBox _newTaskBox = Instantiate(taskbox_template, _panelContent.transform.position, Quaternion.identity).GetComponent(); - - _newTaskBox.transform.SetParent(_panelContent.transform); - - _newTaskBox.transform.localScale = new Vector3(2.5f, 2.5f, 1.0f); - - _newTaskBox.SetTask(_task); - - return _newTaskBox; - } - - public void Setup(List _tasks) - { - this.InitPanelBoxes(_tasks); - } - - public void AddTask(Task _task) - { - // update TaskManager main list of task - //TaskManager.Instance.AddTask(_task); - - // add task to local panel contant - TaskBox newTaskBox = SetupTaskBox(_task); - - // Set new Slot instance - taskBox_list.Add(newTaskBox); - } -} diff --git a/Assets/Scripts/Task/TaskPanelController.cs.meta b/Assets/Scripts/Task/TaskPanelController.cs.meta deleted file mode 100644 index b0135629..00000000 --- a/Assets/Scripts/Task/TaskPanelController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9f07b313ccbd175489a00fcaf7521761 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/UI.meta b/Assets/Scripts/UI.meta deleted file mode 100644 index 26c5fc19..00000000 --- a/Assets/Scripts/UI.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9477ac7958629984098c425d3a3a64fe -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/UI/BasePanelController.cs b/Assets/Scripts/UI/BasePanelController.cs deleted file mode 100644 index 012e41f2..00000000 --- a/Assets/Scripts/UI/BasePanelController.cs +++ /dev/null @@ -1,222 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; -using UnityEngine.EventSystems; -using System; - -abstract public class BasePanelController : MonoBehaviour -{ - [Header("Panel Information")] - [SerializeField] protected GameObject _panel; - [SerializeField] protected GameObject _blankSlot; - [SerializeField] protected Button _panelCloseButton; - - [Header("Object Informations")] - [SerializeField] protected GameObject _instance; - - // SYF - [Header("Dragged Informations")] - [SerializeField] protected Image _itemTemplate; - [SerializeField] protected Image _tmp; - - - [Header("Slots List")] - [SerializeField] public int MAX_SLOT_CUNT = 6 * 8; - [SerializeField] public List _itemSlots = new List(); - - public void Awake() - { - _instance = gameObject; - - this.InitPanelSlots(); - } - - void Start() - { - if(_panelCloseButton) - { - _panelCloseButton.onClick.AddListener(CloseOnClick); - } - } - - public abstract void CloseOnClick(); - - - #region Main logic - protected abstract ISlot SetupSlot(int key, GameObject _parent); - - public void SetupDragAndDropToSlot(ISlot slot) - { - slot.OnBeginDragEvent += BeginDrag; - slot.OnEndDragEvent += EndDrag; - slot.OnDragEvent += Drag; - slot.OnDropEvent += Drop; - } - - protected void InitPanelSlots() - { - if(_panel) - { - for(int i = 0; i < MAX_SLOT_CUNT; i++) - { - ISlot newSlot = SetupSlot(i, _panel); - - // Set new Slot instance - _itemSlots.Add(newSlot); - - // Assign events - this.SetupDragAndDropToSlot(_itemSlots[i]); - } - } - } - - protected void MakeDraggableItem(ItemSlot itemSlot) - { - if(_tmp) - { - _tmp.enabled = true; - - return; - } - - GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0]; - - if(globalGUI) - { - _tmp = Instantiate(_itemTemplate, _itemTemplate.transform.position, Quaternion.identity, globalGUI.transform); - _tmp.transform.localPosition = _panel.transform.position; - _tmp.sprite = itemSlot.Item.Image; - _tmp.transform.position = Input.mousePosition; - _tmp.enabled = true; - } else { - Debug.Log("Can't find global GUI object!!!"); - } - } - #endregion - - #region setup panel with content - public void Setup(Dictionary _items) - { - SetPanelItems(_items); - } - - private void SetPanelItems(Dictionary _items) - { - foreach(int key in _items.Keys) - { - _itemSlots[key].SetItem(_items[key]); - } - } - #endregion - - #region base panel operations - public bool AddItem(Item _item) - { - for(int i = 0; i < _itemSlots.Count; i++) - { - if(_itemSlots[i].Item == null) - { - _itemSlots[i].Item = _item; - return true; - } - } - return false; - } - - public bool RemoveItem(Item _item) - { - for(int i = 0; i < _itemSlots.Count; i++) - { - if(_itemSlots[i].Item == _item) - { - _itemSlots[i].Item = null; - return true; - } - } - return false; - } - - public bool IsFull() - { - for(int i = 0; i < _itemSlots.Count; i++) - { - if(_itemSlots[i].Item == null) - { - return false; - } - } - return true; - } - #endregion - - #region Drag & Drop - public void BeginDrag(ItemSlot itemSlot) - { - if (itemSlot.Item != null) - { - InventoryManager.Instance.DraggedSlot = itemSlot; - - MakeDraggableItem(itemSlot); - } - } - - public void EndDrag(ItemSlot itemSlot) - { - InventoryManager.Instance.DraggedSlot = null; - - DestroyImmediate(_tmp.gameObject, true); - - // Apply list of items - // Update Object surce items list based on slots state and configuration - for (int i = 0; i < _itemSlots.Count; i++) - { - if (_itemSlots[i].Item != null) - { - _instance.GetComponent().SetItemOnPosition(i, _itemSlots[i].Item); - } - else - { - _instance.GetComponent().RemoveItemFromPosition(i); - } - } - } - - public void Drag(ItemSlot itemSlot) - { - _tmp.transform.position = Input.mousePosition; - } - - public void Drop(ItemSlot dropItemSlot) - { - if (dropItemSlot.CanReceiveItem(InventoryManager.Instance.DraggedSlot.Item) && InventoryManager.Instance.DraggedSlot.CanReceiveItem(dropItemSlot.Item)) - { - EquippableItem dragItem = InventoryManager.Instance.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 = InventoryManager.Instance.DraggedSlot.Item; // remember temporary currently dragged item - - - InventoryManager.Instance.DraggedSlot.Item = dropItemSlot.Item; - dropItemSlot.Item = draggedItem; - - _instance.GetComponent().SetItemOnPosition(InventoryManager.Instance.DraggedSlot.Number, InventoryManager.Instance.DraggedSlot.Item); - _instance.GetComponent().SetItemOnPosition(dropItemSlot.Number, dropItemSlot.Item); - } - } - #endregion -} diff --git a/Assets/Scripts/UI/BasePanelController.cs.meta b/Assets/Scripts/UI/BasePanelController.cs.meta deleted file mode 100644 index eb4a01e2..00000000 --- a/Assets/Scripts/UI/BasePanelController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 15919bbecc01e444bbe2a22c7840a518 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/UI/BaseWarehouseController.cs b/Assets/Scripts/UI/BaseWarehouseController.cs deleted file mode 100644 index 10ee3fe9..00000000 --- a/Assets/Scripts/UI/BaseWarehouseController.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using System.Linq; - -// T will be type panel: inventory, equipment, chest -abstract public class BaseWarehouseController : MonoBehaviour -{ - [SerializeField] public GameObject _panel; - [SerializeField] public Dictionary _items = new Dictionary(); - - - protected GameObject dynamicPanel; - - public bool isOpen = false; - - - // Create panel instance on scene on special position and passed content (item list) - public void OpenPanel() - { - GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0]; - - if(globalGUI) - { - this.dynamicPanel = Instantiate(_panel, _panel.transform.position, Quaternion.identity, globalGUI.transform); // 4'th arg allow set object as child - - this.dynamicPanel.transform.localPosition = _panel.transform.position; // prevent overwritten position by... environment??? - - this.SetupPanel(); // bind pandel to current chest - - isOpen = true; - } else { - Debug.Log("Can't find global GUI object!!!"); - } - - } - - public virtual void ClosePanel() - { - Destroy(dynamicPanel); - isOpen = false; - } - - public KeyValuePair FindItemInWarehouse(string itemName) - { - return this._items.Where(item => item.Value.name == itemName).FirstOrDefault(); - } - - protected abstract void SetupPanel(); - - public virtual 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; - // if we assign null its removed later in EndDrag method - } - - public virtual void RemoveItemFromPosition(int _keyPosition) - { - this._items.Remove(_keyPosition); - } -} - diff --git a/Assets/Scripts/UI/BaseWarehouseController.cs.meta b/Assets/Scripts/UI/BaseWarehouseController.cs.meta deleted file mode 100644 index 3338ba15..00000000 --- a/Assets/Scripts/UI/BaseWarehouseController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 967250d8d9011314e8c6d1e58b524211 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: