Add inventory Drag & Drop

Simple code refaactor
This commit is contained in:
kabix09 2022-06-05 01:57:57 +02:00
parent 00d02ca2ac
commit 9fa400f9a7
31 changed files with 2727 additions and 1178 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@
[Bb]uilds/ [Bb]uilds/
[Ll]ogs/ [Ll]ogs/
[Mm]emoryCaptures/ [Mm]emoryCaptures/
.vs

File diff suppressed because it is too large Load Diff

View File

@ -101,7 +101,7 @@ GameObject:
- component: {fileID: 5331092055018478732} - component: {fileID: 5331092055018478732}
- component: {fileID: 5331092055018478730} - component: {fileID: 5331092055018478730}
- component: {fileID: 5331092055018478731} - component: {fileID: 5331092055018478731}
- component: {fileID: 5331092055018478729} - component: {fileID: 4617582679355695156}
m_Layer: 5 m_Layer: 5
m_Name: chest_panel m_Name: chest_panel
m_TagString: Untagged m_TagString: Untagged
@ -118,7 +118,7 @@ RectTransform:
m_GameObject: {fileID: 5331092055018478733} m_GameObject: {fileID: 5331092055018478733}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.4, y: 0.4, z: 1} m_LocalScale: {x: 0.4, y: 0.4, z: 0.4}
m_Children: m_Children:
- {fileID: 5331092055896533710} - {fileID: 5331092055896533710}
- {fileID: 5331092055037629063} - {fileID: 5331092055037629063}
@ -128,7 +128,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -175, y: 0} m_AnchoredPosition: {x: -225, y: 0}
m_SizeDelta: {x: 550, y: 715} m_SizeDelta: {x: 550, y: 715}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5331092055018478730 --- !u!222 &5331092055018478730
@ -169,7 +169,7 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!114 &5331092055018478729 --- !u!114 &4617582679355695156
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -181,12 +181,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d9e1061a8038f54a87269aa0bd2db04, type: 3} m_Script: {fileID: 11500000, guid: 8d9e1061a8038f54a87269aa0bd2db04, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
chest: {fileID: 0} _panel: {fileID: 5331092056807707114}
chestPanel: {fileID: 5331092056807707114} _blankSlot: {fileID: 3818338910890019850, guid: e2f95cfb3084e6e4f9f16c14170adfb5, type: 3}
chestPanelCloseButton: {fileID: 5331092055143140112} _panelCloseButton: {fileID: 5331092055143140112}
blankChestSlot: {fileID: 7205046634468616427, guid: 5239ba2d7bc1aa64e90b3f8b87342137, type: 3}
draggableItem: {fileID: 6570396142606985298, guid: 1304511dd1dfefc449e87c3d904ab15f, type: 3}
_tmp: {fileID: 0} _tmp: {fileID: 0}
_itemTemplate: {fileID: 6570396142606985298, guid: 1304511dd1dfefc449e87c3d904ab15f, type: 3}
chest: {fileID: 0}
--- !u!1 &5331092055037629064 --- !u!1 &5331092055037629064
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,146 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &9044382224672951646
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_SizeDelta.x
value: 60
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_SizeDelta.y
value: 60
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_AnchoredPosition.x
value: 55
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_AnchoredPosition.y
value: -55
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811252, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2195907289659811253, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
propertyPath: m_Name
value: chest_slot Variant
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 528788604, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
--- !u!1 &7205046634468616427 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2195907289659811253, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
m_PrefabInstance: {fileID: 9044382224672951646}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7205046633677332703 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2195907289327283585, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
m_PrefabInstance: {fileID: 9044382224672951646}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &7205046633485490645 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2195907290760729739, guid: 39c7a9aabb5a44f48a2e23af5fbf5e1f, type: 3}
m_PrefabInstance: {fileID: 9044382224672951646}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8978507043308548768
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7205046634468616427}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2be16a7ceddcd2141ba1db1636539117, type: 3}
m_Name:
m_EditorClassIdentifier:
slotItemNumberText: {fileID: 7205046633485490645}
itemImage: {fileID: 7205046633677332703}
chestPanelController: {fileID: 5331092055018478729, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
_number: 0
_item: {fileID: 0}
countStackableItems: 0
EquipmentType: 5

View File

@ -0,0 +1,354 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3818338909570481462
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3818338909570481463}
- component: {fileID: 3818338909570481461}
- component: {fileID: 3818338909570481460}
m_Layer: 5
m_Name: number_held
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3818338909570481463
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338909570481462}
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: 3818338910890019851}
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: 16.7, y: -20.2}
m_SizeDelta: {x: 30, y: 15.3012}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3818338909570481461
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338909570481462}
m_CullTransparentMesh: 1
--- !u!114 &3818338909570481460
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338909570481462}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '0
'
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: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3818338910890019850
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3818338910890019851}
- component: {fileID: 3818338910890019849}
- component: {fileID: 3818338910890019848}
- component: {fileID: 7379342322136183382}
- component: {fileID: 8625463808668959803}
m_Layer: 5
m_Name: chest_slot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3818338910890019851
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338910890019850}
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: 3818338911641453617}
- {fileID: 3818338909570481463}
m_Father: {fileID: 0}
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: 55, y: -55}
m_SizeDelta: {x: 60, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3818338910890019849
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338910890019850}
m_CullTransparentMesh: 1
--- !u!114 &3818338910890019848
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338910890019850}
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: a45fb5c08be526a4dabe2e91e53f4d15, 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 &7379342322136183382
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338910890019850}
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: 3818338910890019848}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &8625463808668959803
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338910890019850}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2be16a7ceddcd2141ba1db1636539117, type: 3}
m_Name:
m_EditorClassIdentifier:
slotItemNumberText: {fileID: 3818338909570481460}
itemImage: {fileID: 3818338911641453630}
_PanelController: {fileID: 0}
_number: 0
_item: {fileID: 0}
countStackableItems: 0
--- !u!1 &3818338911641453616
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3818338911641453617}
- component: {fileID: 3818338911641453631}
- component: {fileID: 3818338911641453630}
m_Layer: 5
m_Name: inventory_image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3818338911641453617
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338911641453616}
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: 3818338910890019851}
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: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3818338911641453631
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338911641453616}
m_CullTransparentMesh: 1
--- !u!114 &3818338911641453630
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3818338911641453616}
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

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 5239ba2d7bc1aa64e90b3f8b87342137 guid: e2f95cfb3084e6e4f9f16c14170adfb5
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -0,0 +1,701 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &9124304227092242852
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304227092242855}
- component: {fileID: 9124304227092242777}
- component: {fileID: 9124304227092242854}
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 &9124304227092242855
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227092242852}
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: 9124304228607424520}
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 &9124304227092242777
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227092242852}
m_CullTransparentMesh: 1
--- !u!114 &9124304227092242854
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227092242852}
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: Inventory
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 &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
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304227602340160}
- component: {fileID: 9124304227602340165}
- component: {fileID: 9124304227602340162}
- component: {fileID: 9124304227602340163}
m_Layer: 5
m_Name: Viewport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9124304227602340160
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227602340161}
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: 9124304227903849263}
m_Father: {fileID: 9124304227744546881}
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 &9124304227602340165
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227602340161}
m_CullTransparentMesh: 1
--- !u!114 &9124304227602340162
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227602340161}
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 &9124304227602340163
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227602340161}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 1
--- !u!1 &9124304227729624651
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304227729624650}
- component: {fileID: 9124304227729624652}
- component: {fileID: 9124304227729624653}
- component: {fileID: 4753590907807807515}
m_Layer: 5
m_Name: inventory_panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9124304227729624650
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227729624651}
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: 9124304228607424520}
- {fileID: 9124304227744546881}
- {fileID: 9124304227312933335}
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 &9124304227729624652
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227729624651}
m_CullTransparentMesh: 0
--- !u!114 &9124304227729624653
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227729624651}
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 &4753590907807807515
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227729624651}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0bff20d6fb721a449df16891030739a, type: 3}
m_Name:
m_EditorClassIdentifier:
_panel: {fileID: 9124304227903849260}
_blankSlot: {fileID: 4202482119828722599, guid: 843626bb28e804c4384ea070e0fead67, type: 3}
_panelCloseButton: {fileID: 9124304227312933334}
_tmp: {fileID: 0}
_itemTemplate: {fileID: 6570396142606985298, guid: 1304511dd1dfefc449e87c3d904ab15f, type: 3}
inventoryPanel: {fileID: 0}
--- !u!1 &9124304227744546894
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304227744546881}
- component: {fileID: 9124304227744546882}
- component: {fileID: 9124304227744546883}
- component: {fileID: 9124304227744546880}
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 &9124304227744546881
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227744546894}
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: 9124304227602340160}
m_Father: {fileID: 9124304227729624650}
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 &9124304227744546882
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227744546894}
m_CullTransparentMesh: 1
--- !u!114 &9124304227744546883
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227744546894}
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 &9124304227744546880
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227744546894}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 9124304227903849263}
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: 9124304227602340160}
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 &9124304227903849260
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304227903849263}
- component: {fileID: 9124304227903849249}
- component: {fileID: 9124304227903849262}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9124304227903849263
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227903849260}
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: 9124304227602340160}
m_RootOrder: 0
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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &9124304227903849249
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227903849260}
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 &9124304227903849262
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304227903849260}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8a8695521f0d02e499659fee002a26c2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 30
m_Right: 30
m_Top: 30
m_Bottom: 30
m_ChildAlignment: 0
m_StartCorner: 0
m_StartAxis: 0
m_CellSize: {x: 70, y: 70}
m_Spacing: {x: 15, y: 15}
m_Constraint: 1
m_ConstraintCount: 6
--- !u!1 &9124304228607424521
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9124304228607424520}
- component: {fileID: 9124304228607424522}
- component: {fileID: 9124304228607424523}
m_Layer: 5
m_Name: Header
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9124304228607424520
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304228607424521}
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: 9124304227092242855}
m_Father: {fileID: 9124304227729624650}
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 &9124304228607424522
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304228607424521}
m_CullTransparentMesh: 1
--- !u!114 &9124304228607424523
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9124304228607424521}
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

View File

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

View File

@ -0,0 +1,354 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4202482118799172251
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4202482118799172250}
- component: {fileID: 4202482118799172248}
- component: {fileID: 4202482118799172249}
m_Layer: 5
m_Name: number_held
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4202482118799172250
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482118799172251}
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: 4202482119828722598}
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: 16.7, y: -20.2}
m_SizeDelta: {x: 30, y: 15.3012}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4202482118799172248
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482118799172251}
m_CullTransparentMesh: 1
--- !u!114 &4202482118799172249
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482118799172251}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '0
'
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: 16
m_fontSizeBase: 16
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &4202482119513234333
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4202482119513234332}
- component: {fileID: 4202482119513234322}
- component: {fileID: 4202482119513234323}
m_Layer: 5
m_Name: inventory_image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4202482119513234332
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119513234333}
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: 4202482119828722598}
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: 50, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4202482119513234322
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119513234333}
m_CullTransparentMesh: 1
--- !u!114 &4202482119513234323
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119513234333}
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!1 &4202482119828722599
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4202482119828722598}
- component: {fileID: 4202482119828722596}
- component: {fileID: 4202482119828722597}
- component: {fileID: 7550267750876868091}
- component: {fileID: 6531490600091353741}
m_Layer: 5
m_Name: inventory_slot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4202482119828722598
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119828722599}
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: 4202482119513234332}
- {fileID: 4202482118799172250}
m_Father: {fileID: 0}
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: 55, y: -55}
m_SizeDelta: {x: 60, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4202482119828722596
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119828722599}
m_CullTransparentMesh: 1
--- !u!114 &4202482119828722597
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119828722599}
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: a45fb5c08be526a4dabe2e91e53f4d15, 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 &7550267750876868091
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119828722599}
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: 4202482119828722597}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &6531490600091353741
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4202482119828722599}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd9cfc2a55740fd4ba1bb807d02b82cb, type: 3}
m_Name:
m_EditorClassIdentifier:
slotItemNumberText: {fileID: 4202482118799172249}
itemImage: {fileID: 4202482119513234323}
_PanelController: {fileID: 0}
_number: 0
_item: {fileID: 0}
countStackableItems: 0

View File

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

View File

@ -791,8 +791,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3} m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0} chest: {fileID: 0}
chestPanel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
developerList: [] developerList: []
--- !u!1 &163167163 --- !u!1 &163167163
GameObject: GameObject:
@ -1054,7 +1055,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 167690937} m_GameObject: {fileID: 167690937}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -22.1, y: 17.8, z: 0} m_LocalPosition: {x: -20.36, y: 18.54, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -2452,7 +2453,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7610fa3cdda79614e94110dd314fbfed, type: 3} m_Script: {fileID: 11500000, guid: 7610fa3cdda79614e94110dd314fbfed, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
items: [] _panel: {fileID: 9124304227729624651, guid: e9cbfeb9e69af1245bc3180e86ff23f6, type: 3}
isOpen: 0
--- !u!4 &563016212 --- !u!4 &563016212
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -12822,12 +12824,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3} m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0} chest: {fileID: 0}
chestPanel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
developerList: developerList:
- {fileID: 11400000, guid: 5935777f7ac390a4187e03f34e7cafdd, type: 2} - {fileID: 11400000, guid: 5935777f7ac390a4187e03f34e7cafdd, type: 2}
- {fileID: 11400000, guid: 5935777f7ac390a4187e03f34e7cafdd, type: 2}
- {fileID: 11400000, guid: 5935777f7ac390a4187e03f34e7cafdd, type: 2}
--- !u!61 &926459326 --- !u!61 &926459326
BoxCollider2D: BoxCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -13072,8 +13073,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3} m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0} chest: {fileID: 0}
chestPanel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
developerList: [] developerList: []
--- !u!1 &1058265261 --- !u!1 &1058265261
GameObject: GameObject:
@ -13496,8 +13498,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3} m_Script: {fileID: 11500000, guid: 26a44ba4cba1985408fca11ba424361c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_panel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
isOpen: 0
chest: {fileID: 0} chest: {fileID: 0}
chestPanel: {fileID: 5331092055018478733, guid: 2b46aee216d4b304f8aebcb303ebf4f4, type: 3}
developerList: [] developerList: []
--- !u!1 &1315339608 --- !u!1 &1315339608
GameObject: GameObject:

View File

@ -0,0 +1,72 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ChestController : BaseWarehouseController
{
[SerializeField] public GameObject chest;
[SerializeField] public List<Item> developerList = new List<Item>(); // FOR DEVELOPER TESTE - remove later !!!
bool isTrigerred = false;
// Start is called before the first frame update
void Start()
{
chest = gameObject; // set object on current GameObject
// FOR DEVELOPER TESTE - remove later !!!
for(int i = 0; i < developerList.Count; i++)
{
SetItemOnPosition(i, developerList[i]);
}
}
// 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))
{
this.OpenPanel();
InventoryManager.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();
}
protected override void SetupPanel()
{
if(this.dynamicPanel)
{
this.dynamicPanel.GetComponent<ChestPanelController>().Setup(gameObject, _items);
}
}
// WARNING
// DANGER - functon override position which may be not free
}

View File

@ -5,210 +5,43 @@ using UnityEngine.UI;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using System; using System;
public class ChestPanelController : MonoBehaviour public class ChestPanelController : BasePanelController
{ {
[Header("Chest Information")] public override void CloseOnClick()
[SerializeField] private GameObject chest; // chest to which the panel belongs
[SerializeField] private GameObject chestPanel;
[SerializeField] private Button chestPanelCloseButton;
[Space]
[SerializeField] private GameObject blankChestSlot;
[SerializeField] public Image draggableItem;
[SerializeField] private Image _tmp;
private ItemSlot draggedSlot;
[SerializeField] public const int MAX_SLOT_CUNT = 6*8;
[Space]
public List<ChestSlot> itemSlots = new List<ChestSlot>();
public event Action<ItemSlot> OnBeginDragEvent;
public event Action<ItemSlot> OnEndDragEvent;
public event Action<ItemSlot> OnDragEvent;
public event Action<ItemSlot> OnDropEvent;
void Awake()
{
InitInventorySlots();
}
void Start()
{
if(chestPanelCloseButton)
{
chestPanelCloseButton.onClick.AddListener(CloseOnClick);
}
}
void Update()
{
}
void CloseOnClick()
{ {
Destroy(gameObject); // destroy panel Destroy(gameObject); // destroy panel
if(chest) if(_instance)
{ {
chest.GetComponent<Chest>().CloseChest(); _instance.GetComponent<ChestController>().ClosePanel();
} }
} }
void InitInventorySlots() public void Setup(GameObject _chest, Dictionary<int, Item> _chestItems)
{ {
if(chestPanel) _instance = _chest;
{
for(int i = 0; i < MAX_SLOT_CUNT; i++)
{
ChestSlot newSlot = Instantiate(blankChestSlot, chestPanel.transform.position, Quaternion.identity).GetComponent<ChestSlot>();
newSlot.transform.SetParent(chestPanel.transform);
base.Setup(_chestItems);
newSlot.SetupInventorySlot(i, null, this);
// Set new Slot instance
itemSlots.Add(newSlot);
// Assign events
itemSlots[i].OnBeginDragEvent += BeginDrag;
itemSlots[i].OnEndDragEvent +=EndDrag;
itemSlots[i].OnDragEvent += Drag;
itemSlots[i].OnDropEvent += Drop;
}
}
} }
public void SetupChest(GameObject _chest, Dictionary<int, Item> _chestItems) protected override ISlot SetupSlot(int key, GameObject _parent)
{ {
chest = _chest; ChestSlot _tmpSlot = Instantiate(_blankSlot, _parent.transform.position, Quaternion.identity).GetComponent<ChestSlot>();
SetPanelItems(_chestItems); _tmpSlot.transform.SetParent(_parent.transform);
_tmpSlot.SetupSlot(key, null, this);
return _tmpSlot;
} }
private void SetPanelItems(Dictionary<int, Item> _itemsList)
{
foreach(int key in _itemsList.Keys)
{
itemSlots[key].SetItem(_itemsList[key]);
}
}
public bool AddItem(Item _item) // Islot - > Aslot
{ // - > B slots
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) // Ipanel -> Apanel
{ // -> B panel
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;
}
private void MakeDraggableItem(ItemSlot itemSlot)
{
if(_tmp)
{
_tmp.enabled = true;
return;
}
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
if(globalGUI)
{
_tmp = Instantiate(draggableItem, draggableItem.transform.position, Quaternion.identity, globalGUI.transform);
_tmp.transform.localPosition = chestPanel.transform.position;
_tmp.sprite = itemSlot.Item.Image;
_tmp.transform.position = Input.mousePosition;
_tmp.enabled = true;
} else {
Debug.Log("Can't find global GUI object!!!");
}
}
public void BeginDrag(ItemSlot itemSlot)
{
if(itemSlot.Item != null)
{
draggedSlot = itemSlot;
MakeDraggableItem(itemSlot);
}
}
public void EndDrag(ItemSlot itemSlot)
{
draggedSlot = null;
DestroyImmediate(_tmp.gameObject, true);
}
public void Drag(ItemSlot itemSlot)
{
_tmp.transform.position = Input.mousePosition;
}
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
chest.GetComponent<Chest>().SetItemOnPosition(draggedSlot.Number, draggedSlot.Item);
chest.GetComponent<Chest>().SetItemOnPosition(dropItemSlot.Number, dropItemSlot.Item);
}
}
// --------------------------- // ---------------------------
// will work differently depending if its chest, inventory or equipment panel // will work differently depending if its chest, inventory or equipment panel

View File

@ -3,12 +3,24 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
[System.Serializable] [System.Serializable]
public class InventoryManager : MonoBehaviour public class InventoryManager : BaseWarehouseController
{ {
public static int MAX_ITEMS = 5; public static int MAX_ITEMS = 5;
public static InventoryManager Instance; public static InventoryManager Instance;
public List<EquippableItem> items = new List<EquippableItem>();
// 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() private void Awake()
{ {
@ -23,14 +35,24 @@ public class InventoryManager : MonoBehaviour
public void AddToInventory(EquippableItem pickable) public void AddToInventory(EquippableItem pickable)
{ {
if(this.items.Count <= MAX_ITEMS) if(this._items.Count <= MAX_ITEMS)
{ {
this.items.Add(pickable); this._items[this._items.Count] = pickable;
}else { }else {
// show popup - inventory is full Debug.Log("Cent add - Inventory is full");
} }
} }
protected override void SetupPanel()
{
if(this.dynamicPanel)
{
this.dynamicPanel.GetComponent<InventoryPanelController>().Setup(gameObject, _items);
}
}
// public void DropItem() // public void DropItem()
// { // {

View File

@ -0,0 +1,68 @@
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
InventoryManager.Instance.GetComponent<InventoryManager>().ClosePanel();
}
public void Setup(GameObject _inventory, Dictionary<int, Item> _items)
{
_instance = _inventory;
base.Setup(_items);
}
protected override ISlot SetupSlot(int key, GameObject _parent)
{
InventorySlot _tmpSlot = Instantiate(_blankSlot, _parent.transform.position, Quaternion.identity).GetComponent<InventorySlot>();
_tmpSlot.transform.SetParent(_parent.transform);
_tmpSlot.SetupSlot(key, null, this);
return _tmpSlot;
}
// public void Drop(ItemSlot<InventoryPanelController> dropItemSlot)
// {
// if(dropItemSlot.CanReceiveItem(draggedSlot.Item) && draggedSlot.CanReceiveItem(dropItemSlot.Item))
// {
// EquippableItem dragItem = draggedSlot.Item as EquippableItem;
// EquippableItem dropItem = dropItemSlot.Item as EquippableItem;
// // for changing chest to evuuipment or onventory panel !!!!
// if(draggedSlot is EquipmentSlot)
// {
// if(dragItem != null) dragItem.Unequip(this);
// if(dropItem != null) dropItem.Equip(this);
// }
// if(dropItemSlot is EquipmentSlot)
// {
// if(dragItem != null) dragItem.Equip(this);
// if(dropItem != null) dropItem.Unequip(this);
// }
// Item draggedItem = draggedSlot.Item; // remember temporary currently dragged item
// draggedSlot.Item = dropItemSlot.Item;
// dropItemSlot.Item = draggedItem;
// // update items position in chest slots
// // - after close paned - items dont reset its positions
// _inventory.GetComponent<InventoryManager>().SetItemOnPosition(draggedSlot.Number, draggedSlot.Item);
// _inventory.GetComponent<InventoryManager>().SetItemOnPosition(dropItemSlot.Number, dropItemSlot.Item);
// }
// }
}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 8a6334ce379c25c458826dcd25b5e1ec guid: d0bff20d6fb721a449df16891030739a
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View File

@ -6,11 +6,7 @@ public class InventorySlot : ItemSlot
{ {
public override bool CanReceiveItem(Item item) public override bool CanReceiveItem(Item item)
{ {
if(Item == null) return true;
return true;
EquippableItem equippableItem = item as EquippableItem;
return equippableItem != null;
} }
} }

View File

@ -6,18 +6,13 @@ using UnityEngine.UI;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using System; // for Action type using System; // for Action type
public class ItemSlot : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDragHandler, IDropHandler public class ItemSlot : MonoBehaviour, ISlot, IBeginDragHandler, IEndDragHandler, IDragHandler, IDropHandler
{ {
[Header("UI Stuff to change")] [Header("UI Stuff to change")]
[SerializeField] private TextMeshProUGUI slotItemNumberText; [SerializeField] private TextMeshProUGUI slotItemNumberText;
[SerializeField] private Image itemImage; [SerializeField] private Image itemImage;
public ChestPanelController chestPanelController; public BasePanelController _PanelController;
public event Action<ItemSlot> OnBeginDragEvent;
public event Action<ItemSlot> OnEndDragEvent;
public event Action<ItemSlot> OnDragEvent;
public event Action<ItemSlot> OnDropEvent;
private Color normalColor = Color.white; private Color normalColor = Color.white;
private Color disabledColor = new Color(1, 1, 1, 0); // transparency = 0 private Color disabledColor = new Color(1, 1, 1, 0); // transparency = 0
@ -48,11 +43,14 @@ public class ItemSlot : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDrag
} }
public int countStackableItems = 0; public int countStackableItems = 0;
public event Action<ItemSlot> OnBeginDragEvent;
public event Action<ItemSlot> OnEndDragEvent;
public event Action<ItemSlot> OnDragEvent;
public event Action<ItemSlot> OnDropEvent;
public void SetupSlot(int _number, Item _item, BasePanelController _PanelController)
public void SetupInventorySlot(int _number, Item _item, ChestPanelController _chestPanelController)
{ {
chestPanelController = _chestPanelController; this._PanelController = _PanelController;
Number = _number; Number = _number;
@ -99,11 +97,6 @@ public class ItemSlot : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDrag
} }
} }
// Update is called once per frame
void Update()
{
}
public virtual bool CanReceiveItem(Item item) public virtual bool CanReceiveItem(Item item)
{ {
return true; return true;

View File

@ -1,92 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Chest : MonoBehaviour
{
[SerializeField] public GameObject chest;
[SerializeField] public GameObject chestPanel;
[SerializeField] public List<Item> developerList = new List<Item>(); // FOR DEVELOPER TESTE - remove later !!!
[SerializeField]
public Dictionary<int, Item> itemsList = new Dictionary<int, Item>();
private GameObject dynamicPanel; // UI elemend created during script work
bool isOpen = false;
bool isTrigerred = false;
// Start is called before the first frame update
void Start()
{
chest = gameObject; // set object on current GameObject
// FOR DEVELOPER TESTE - remove later !!!
for(int i = 0; i < developerList.Count; i++)
{
SetItemOnPosition(i, developerList[i]);
}
}
// Update is called once per frame
void Update()
{
if (chestPanel && isTrigerred && !isOpen) // we can open chest only when its closed
{
if (Input.GetKeyDown(KeyCode.E))
{
OpenChest();
}
}
}
void OnTriggerExit2D(Collider2D collision)
{
if (chestPanel != null)
{
CloseChest();
}
isTrigerred = false;
}
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.tag == "Player")
{
isTrigerred = true;
}
}
public void OpenChest()
{
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0];
if(globalGUI)
{
dynamicPanel = Instantiate(chestPanel, chestPanel.transform.position, Quaternion.identity, globalGUI.transform); // 4'th arg allow set object as child
dynamicPanel.transform.localPosition = chestPanel.transform.position; // prevent overwritten position by... environment???
dynamicPanel.GetComponent<ChestPanelController>().SetupChest(gameObject, itemsList); // bind pandel to current chest
isOpen = true;
} else {
Debug.Log("Can't find global GUI object!!!");
}
}
public void CloseChest()
{
Destroy(dynamicPanel); // destroy object from scene
isOpen = false;
}
// WARNING
// DANGER - functon override position which may be not free
public void SetItemOnPosition(int _keyPosition, Item _item)
{
itemsList[_keyPosition] = _item;
}
}

8
Assets/Scripts/UI.meta Normal file
View File

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

View File

@ -0,0 +1,224 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
abstract public class BasePanelController : MonoBehaviour
// where _slotT: ISlot // (A -> D, B, C)
{
[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 const int MAX_SLOT_CUNT = 6 * 8;
[SerializeField] public List<ISlot> _itemSlots = new List<ISlot>();
// public event Action<ISlot> OnBeginDragEvent;
// public event Action<ISlot> OnEndDragEvent;
// public event Action<ISlot> OnDragEvent;
// public event Action<ISlot> OnDropEvent;
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);
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
_itemSlots[i].OnBeginDragEvent += BeginDrag;
_itemSlots[i].OnEndDragEvent += EndDrag;
_itemSlots[i].OnDragEvent += Drag;
_itemSlots[i].OnDropEvent += Drop;
}
}
}
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<int, Item> _items)
{
SetPanelItems(_items);
}
private void SetPanelItems(Dictionary<int, Item> _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
for (int i = 0; i < _itemSlots.Count; i++)
{
if (_itemSlots[i].Item != null)
{
_instance.GetComponent<BaseWarehouseController>().SetItemOnPosition(i, _itemSlots[i].Item);
}
else
{
_instance.GetComponent<BaseWarehouseController>().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;
// update items position in chest slots
// - after close paned - items dont reset its positions
_instance.GetComponent<BaseWarehouseController>().SetItemOnPosition(InventoryManager.Instance.DraggedSlot.Number, InventoryManager.Instance.DraggedSlot.Item);
_instance.GetComponent<BaseWarehouseController>().SetItemOnPosition(dropItemSlot.Number, dropItemSlot.Item);
}
}
#endregion
}

View File

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

View File

@ -0,0 +1,65 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// T will be type panel: inventory, equipment, chest
abstract public class BaseWarehouseController : MonoBehaviour
{
[SerializeField] public GameObject _panel;
[SerializeField] public Dictionary<int, Item> _items = new Dictionary<int, Item>();
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;
}
protected abstract void SetupPanel();
// public virtual void CloseOnClick()
// {
// Destroy(gameObject); // destroy panel
// if(_panel)
// {
// _inventory.GetComponent<InventoryManager>().ClosePanel();
// }
// }
public void SetItemOnPosition(int _keyPosition, Item _item)
{
this._items[_keyPosition] = _item;
}
public void RemoveItemFromPosition(int _keyPosition)
{
this._items.Remove(_keyPosition);
}
}

View File

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

View File

@ -2,7 +2,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class DragDropItemManager : MonoBehaviour interface IPanel
{ {
} }

View File

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

View File

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System;
public interface ISlot
{
int Number { get; set; }
Item Item { get; set; }
// enum typ dziecka
// A : enum A
// B : enum B
event Action<ItemSlot> OnBeginDragEvent;
event Action<ItemSlot> OnEndDragEvent;
event Action<ItemSlot> OnDragEvent;
event Action<ItemSlot> OnDropEvent;
//(B)Islot // as B
public void SetupSlot(int _number, Item _item, BasePanelController _PanelController);
public void SetItem(Item _item);
bool CanReceiveItem(Item item);
}

View File

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