diff --git a/Assets/IMG/Aseprite/Inv_Dagger.aseprite b/Assets/IMG/Aseprite/Inv_Dagger.aseprite index ed2fe47..af8a7b6 100644 Binary files a/Assets/IMG/Aseprite/Inv_Dagger.aseprite and b/Assets/IMG/Aseprite/Inv_Dagger.aseprite differ diff --git a/Assets/IMG/Aseprite/Inv_Orb.aseprite b/Assets/IMG/Aseprite/Inv_Orb.aseprite index ed2fe47..0ea9ae5 100644 Binary files a/Assets/IMG/Aseprite/Inv_Orb.aseprite and b/Assets/IMG/Aseprite/Inv_Orb.aseprite differ diff --git a/Assets/IMG/Aseprite/Inv_Shield.aseprite b/Assets/IMG/Aseprite/Inv_Shield.aseprite index ed2fe47..e2d56a7 100644 Binary files a/Assets/IMG/Aseprite/Inv_Shield.aseprite and b/Assets/IMG/Aseprite/Inv_Shield.aseprite differ diff --git a/Assets/IMG/Aseprite/Inv_SmallShield.aseprite b/Assets/IMG/Aseprite/Inv_SmallShield.aseprite index ed2fe47..5c87e3c 100644 Binary files a/Assets/IMG/Aseprite/Inv_SmallShield.aseprite and b/Assets/IMG/Aseprite/Inv_SmallShield.aseprite differ diff --git a/Assets/IMG/Aseprite/Inv_Staff.aseprite b/Assets/IMG/Aseprite/Inv_Staff.aseprite deleted file mode 100644 index ed2fe47..0000000 Binary files a/Assets/IMG/Aseprite/Inv_Staff.aseprite and /dev/null differ diff --git a/Assets/IMG/Aseprite/Inv_Staff.aseprite.meta b/Assets/IMG/Aseprite/Inv_Staff.aseprite.meta deleted file mode 100644 index 1a36792..0000000 --- a/Assets/IMG/Aseprite/Inv_Staff.aseprite.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 80e847c2f2c05e548a05d0bafb267ad1 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/IMG/Aseprite/Inv_Sword.aseprite b/Assets/IMG/Aseprite/Inv_Sword.aseprite index ed2fe47..3db137d 100644 Binary files a/Assets/IMG/Aseprite/Inv_Sword.aseprite and b/Assets/IMG/Aseprite/Inv_Sword.aseprite differ diff --git a/Assets/IMG/Aseprite/Inv_Wand.aseprite b/Assets/IMG/Aseprite/Inv_Wand.aseprite index ed2fe47..37244d2 100644 Binary files a/Assets/IMG/Aseprite/Inv_Wand.aseprite and b/Assets/IMG/Aseprite/Inv_Wand.aseprite differ diff --git a/Assets/Prefabs/slot.prefab b/Assets/Prefabs/slot.prefab index 2b2fa78..890a2e3 100644 --- a/Assets/Prefabs/slot.prefab +++ b/Assets/Prefabs/slot.prefab @@ -87,7 +87,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: itemRemoved: 000000 - place: 9 + place: 8 --- !u!114 &206628748623723557 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Resources/Equipment/Mage/Inv_LeftHand.png b/Assets/Resources/Equipment/Mage/Inv_LeftHand.png new file mode 100644 index 0000000..06e8b4a Binary files /dev/null and b/Assets/Resources/Equipment/Mage/Inv_LeftHand.png differ diff --git a/Assets/Resources/Equipment/Mage/Inv_LeftHand.png.meta b/Assets/Resources/Equipment/Mage/Inv_LeftHand.png.meta new file mode 100644 index 0000000..3cb5ced --- /dev/null +++ b/Assets/Resources/Equipment/Mage/Inv_LeftHand.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: b66a8056f4648ce46bab29a767d9afba +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Equipment/Mage/Inv_RightHand.png b/Assets/Resources/Equipment/Mage/Inv_RightHand.png new file mode 100644 index 0000000..984562e Binary files /dev/null and b/Assets/Resources/Equipment/Mage/Inv_RightHand.png differ diff --git a/Assets/Resources/Equipment/Mage/Inv_RightHand.png.meta b/Assets/Resources/Equipment/Mage/Inv_RightHand.png.meta new file mode 100644 index 0000000..80f7792 --- /dev/null +++ b/Assets/Resources/Equipment/Mage/Inv_RightHand.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 4bc52ed8be65d5b49b4a2b591ed57d74 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Equipment/Thief/Inv_LeftHand.png b/Assets/Resources/Equipment/Thief/Inv_LeftHand.png new file mode 100644 index 0000000..39e1108 Binary files /dev/null and b/Assets/Resources/Equipment/Thief/Inv_LeftHand.png differ diff --git a/Assets/Resources/Equipment/Thief/Inv_LeftHand.png.meta b/Assets/Resources/Equipment/Thief/Inv_LeftHand.png.meta new file mode 100644 index 0000000..0661802 --- /dev/null +++ b/Assets/Resources/Equipment/Thief/Inv_LeftHand.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 8ed35ed5dcae8e849a975d9781ccfd16 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Equipment/Thief/Inv_RightHand.png b/Assets/Resources/Equipment/Thief/Inv_RightHand.png new file mode 100644 index 0000000..9f11870 Binary files /dev/null and b/Assets/Resources/Equipment/Thief/Inv_RightHand.png differ diff --git a/Assets/Resources/Equipment/Thief/Inv_RightHand.png.meta b/Assets/Resources/Equipment/Thief/Inv_RightHand.png.meta new file mode 100644 index 0000000..b686061 --- /dev/null +++ b/Assets/Resources/Equipment/Thief/Inv_RightHand.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 8a9eb9ae934891242a4d2be76a715c8c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Equipment/Warrior/Inv_LeftHand.png b/Assets/Resources/Equipment/Warrior/Inv_LeftHand.png new file mode 100644 index 0000000..c932a07 Binary files /dev/null and b/Assets/Resources/Equipment/Warrior/Inv_LeftHand.png differ diff --git a/Assets/Resources/Equipment/Warrior/Inv_LeftHand.png.meta b/Assets/Resources/Equipment/Warrior/Inv_LeftHand.png.meta new file mode 100644 index 0000000..5b219ff --- /dev/null +++ b/Assets/Resources/Equipment/Warrior/Inv_LeftHand.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: 5fa11cb6b01eb3b46b3b6cf4869c8536 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Equipment/Warrior/Inv_RightHand.png b/Assets/Resources/Equipment/Warrior/Inv_RightHand.png new file mode 100644 index 0000000..eebad9f Binary files /dev/null and b/Assets/Resources/Equipment/Warrior/Inv_RightHand.png differ diff --git a/Assets/Resources/Equipment/Warrior/Inv_RightHand.png.meta b/Assets/Resources/Equipment/Warrior/Inv_RightHand.png.meta new file mode 100644 index 0000000..8727e8a --- /dev/null +++ b/Assets/Resources/Equipment/Warrior/Inv_RightHand.png.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: ce4916623c299ba469b676f135be5ef8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/GameScene.unity b/Assets/Scenes/GameScene.unity index 3eed825..ad8ab9b 100644 --- a/Assets/Scenes/GameScene.unity +++ b/Assets/Scenes/GameScene.unity @@ -938,6 +938,8 @@ RectTransform: - {fileID: 1521636294} - {fileID: 822494757} - {fileID: 349908981} + - {fileID: 1991779060} + - {fileID: 125253396} m_Father: {fileID: 1456932137} m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1004,6 +1006,8 @@ MonoBehaviour: amulet: {fileID: 1144658891} leftHand: {fileID: 2074995250} rightHand: {fileID: 2051014505} + dragImage: {fileID: 1991779059} + itemDisplay: {fileID: 125253395} bags: - {fileID: 188567431} - {fileID: 1446002923} @@ -1943,6 +1947,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 123765786} m_CullTransparentMesh: 1 +--- !u!1 &125253395 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 125253396} + - component: {fileID: 125253398} + - component: {fileID: 125253397} + m_Layer: 5 + m_Name: itemDisplay + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &125253396 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 125253395} + 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: 1841765046} + - {fileID: 472316756} + - {fileID: 1419201682} + - {fileID: 1674772567} + m_Father: {fileID: 66523172} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -12.5, y: -25} + m_SizeDelta: {x: -375, y: -250} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &125253397 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 125253395} + 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: 0, g: 0, b: 0, a: 0.78431374} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &125253398 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 125253395} + m_CullTransparentMesh: 1 --- !u!1001 &134850915 PrefabInstance: m_ObjectHideFlags: 0 @@ -4343,7 +4426,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 206628748623723553, guid: 6561ab2146fa2534cb13d1da79d00a97, type: 3} propertyPath: m_AnchorMax.x - value: 0.9 + value: 0.925 objectReference: {fileID: 0} - target: {fileID: 206628748623723553, guid: 6561ab2146fa2534cb13d1da79d00a97, type: 3} propertyPath: m_AnchorMax.y @@ -4351,7 +4434,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 206628748623723553, guid: 6561ab2146fa2534cb13d1da79d00a97, type: 3} propertyPath: m_AnchorMin.x - value: 0.75 + value: 0.775 objectReference: {fileID: 0} - target: {fileID: 206628748623723553, guid: 6561ab2146fa2534cb13d1da79d00a97, type: 3} propertyPath: m_AnchorMin.y @@ -6647,6 +6730,78 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 463065572} m_CullTransparentMesh: 1 +--- !u!1 &472316755 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 472316756} + - component: {fileID: 472316758} + - component: {fileID: 472316757} + m_Layer: 5 + m_Name: itemImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &472316756 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472316755} + 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: 125253396} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.675} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -2.5} + m_SizeDelta: {x: -80, y: -5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &472316757 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472316755} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &472316758 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 472316755} + m_CullTransparentMesh: 1 --- !u!1 &476405302 GameObject: m_ObjectHideFlags: 0 @@ -18827,7 +18982,6 @@ RectTransform: - {fileID: 319341376} - {fileID: 1365079344} - {fileID: 2147336495} - - {fileID: 1494783048} m_Father: {fileID: 822494757} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -18874,6 +19028,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1400711198} m_CullTransparentMesh: 1 +--- !u!1 &1419201681 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1419201682} + - component: {fileID: 1419201684} + - component: {fileID: 1419201683} + m_Layer: 5 + m_Name: itemName + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1419201682 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1419201681} + 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: 125253396} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.675} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1419201683 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1419201681} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1419201684 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1419201681} + m_CullTransparentMesh: 1 --- !u!1 &1420067069 GameObject: m_ObjectHideFlags: 0 @@ -19807,78 +20040,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1489889202} m_CullTransparentMesh: 1 ---- !u!1 &1494783047 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1494783048} - - component: {fileID: 1494783050} - - component: {fileID: 1494783049} - m_Layer: 5 - m_Name: equipStats - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1494783048 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1494783047} - 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: 1400711199} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.925, y: 0.7} - m_AnchorMax: {x: 0.975, y: 0.95} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1494783049 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1494783047} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &1494783050 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1494783047} - m_CullTransparentMesh: 1 --- !u!1 &1501111747 GameObject: m_ObjectHideFlags: 0 @@ -21911,6 +22072,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1666134055} m_CullTransparentMesh: 1 +--- !u!1 &1674772566 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1674772567} + - component: {fileID: 1674772569} + - component: {fileID: 1674772568} + m_Layer: 5 + m_Name: itemStats + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1674772567 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674772566} + 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: 125253396} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1674772568 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674772566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: New Text +--- !u!222 &1674772569 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1674772566} + m_CullTransparentMesh: 1 --- !u!1 &1675736206 GameObject: m_ObjectHideFlags: 0 @@ -23498,6 +23738,78 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1820018527} m_CullTransparentMesh: 1 +--- !u!1 &1841765045 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1841765046} + - component: {fileID: 1841765048} + - component: {fileID: 1841765047} + m_Layer: 5 + m_Name: itemImageBackground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1841765046 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841765045} + 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: 125253396} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.675} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -2.5} + m_SizeDelta: {x: -80, y: -5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1841765047 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841765045} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1841765048 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1841765045} + m_CullTransparentMesh: 1 --- !u!1 &1849127265 GameObject: m_ObjectHideFlags: 0 @@ -25134,6 +25446,78 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1964336710} m_CullTransparentMesh: 1 +--- !u!1 &1991779059 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1991779060} + - component: {fileID: 1991779062} + - component: {fileID: 1991779061} + m_Layer: 5 + m_Name: dragImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1991779060 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1991779059} + 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: 66523172} + m_RootOrder: 3 + 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!114 &1991779061 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1991779059} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1991779062 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1991779059} + m_CullTransparentMesh: 1 --- !u!1 &2025004927 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Inventory.cs b/Assets/Scripts/Inventory.cs index e0799c2..eb552c6 100644 --- a/Assets/Scripts/Inventory.cs +++ b/Assets/Scripts/Inventory.cs @@ -16,17 +16,34 @@ namespace Assets.Scripts public GameObject amulet; public GameObject leftHand; public GameObject rightHand; + public GameObject dragImage; + public GameObject itemDisplay; public GameObject[] bags; public GameObject[] slots; + Dictionary statBoost; + public int currentBag = -1; GameObject startDrag; + TooltipHandler tooltip; + // Start is called before the first frame update void Start() { + statBoost = new Dictionary(); + statBoost.Add("HP", 0); + statBoost.Add("MP", 0); + statBoost.Add("HPR", 0); + statBoost.Add("MPR", 0); + statBoost.Add("STR", 0); + statBoost.Add("DEX", 0); + statBoost.Add("INT", 0); + statBoost.Add("LCK", 0); + tooltip = GameObject.Find("TooltipHandler").GetComponent(); + itemDisplay.transform.localScale = new Vector3(0,0,0); changeCurrentBag(0); } @@ -41,15 +58,14 @@ namespace Assets.Scripts { if (item != null) { - GameObject.Find("UIHandler").GetComponent().showMessage("SUCCESS;You got an item!"); bool itemAdded = false; for (int i = 0; i < bags.Length; i++) { for (int j = 0; j < slots.Length; j++) { - if (slots[j].GetComponent().getItem() == null) + if (slots[j].GetComponent().getItem(i) == null) { - slots[j].GetComponent().setItem(item); + slots[j].GetComponent().setItem(item, i); itemAdded = true; slots[j].GetComponent().color = item.rarityColor; slots[j].GetComponent().texture = item.image; @@ -58,9 +74,14 @@ namespace Assets.Scripts } if (itemAdded) { + GameObject.Find("UIHandler").GetComponent().showMessage("SUCCESS;You got an item!"); break; } } + if (!itemAdded) + { + GameObject.Find("UIHandler").GetComponent().showMessage("ERROR;No inventory space left."); + } } } @@ -84,7 +105,7 @@ namespace Assets.Scripts Item item; for (int i = 0; i < slots.Length; i++) { - item = slots[i].GetComponent().getItem(); + item = slots[i].GetComponent().getItem(currentBag); if (item != null) { slots[i].GetComponent().color = item.rarityColor; @@ -178,6 +199,37 @@ namespace Assets.Scripts return null; } } - } + public void calculateStatBoost(Dictionary attributes, bool isAddition) + { + foreach (string key in attributes.Keys) + { + if (isAddition) + { + statBoost[key] = statBoost[key] + attributes[key]; + } + else + { + statBoost[key] = statBoost[key] - attributes[key]; + } + } + } + + public Dictionary getEquipmentBonus() + { + if (statBoost == null) + { + statBoost = new Dictionary(); + statBoost.Add("HP", 0); + statBoost.Add("MP", 0); + statBoost.Add("HPR", 0); + statBoost.Add("MPR", 0); + statBoost.Add("STR", 0); + statBoost.Add("DEX", 0); + statBoost.Add("INT", 0); + statBoost.Add("LCK", 0); + } + return statBoost; + } + } } \ No newline at end of file diff --git a/Assets/Scripts/InventorySlot.cs b/Assets/Scripts/InventorySlot.cs index b006b5a..cfb331b 100644 --- a/Assets/Scripts/InventorySlot.cs +++ b/Assets/Scripts/InventorySlot.cs @@ -14,10 +14,12 @@ namespace Assets.Scripts int currentBag = 0; public ItemPlace place; Item equip; + Inventory inventory; private void Start() { tooltip = GameObject.Find("TooltipHandler").GetComponent(); + inventory = GameObject.Find("Inventory").GetComponent(); loadImages(); } @@ -26,15 +28,15 @@ namespace Assets.Scripts this.currentBag = currentBag; } - public void setItem(Item item) + public void setItem(Item item, int bag) { - items[currentBag] = item; - itemRemoved[currentBag] = false; + items[bag] = item; + itemRemoved[bag] = false; } - public Item getItem() + public Item getItem(int bag) { - return items[currentBag]; + return items[bag]; } public void removeItem() @@ -45,52 +47,82 @@ namespace Assets.Scripts public void showTooltip() { + Item item = getItemForTooltip(); + if (item != null) + { + inventory.itemDisplay.transform.Find("itemImage").GetComponent().texture = item.image; + inventory.itemDisplay.transform.Find("itemImage").GetComponent().color = item.rarityColor; + inventory.itemDisplay.transform.Find("itemName").GetComponent().text = item.getName(); + string text = "Stats:\r\n"; + Dictionary attributes = item.getAttributes(); + foreach (string key in attributes.Keys) + { + text = text + key + ": " + attributes[key] + "\r\n"; + } + inventory.itemDisplay.transform.Find("itemStats").GetComponent().text = text; + int changeY = 0; + if (inventory.itemDisplay.transform.localScale == new Vector3(0,0,0)) + { + if (Input.mousePosition.y < Screen.height / 2) + { + changeY = -150; + } + inventory.itemDisplay.transform.position = new Vector3(Input.mousePosition.x - 175, Input.mousePosition.y - changeY, 0); + } + inventory.itemDisplay.transform.localScale = new Vector3(1, 1, 1); + } + } + + private Item getItemForTooltip() + { + Item item = null; if (place == ItemPlace.BAG) { - if (items[currentBag] != null) - { - string text = items[currentBag].getDisplayText(); - Item equip = GameObject.Find("Inventory").GetComponent().getEquip(items[currentBag].getPlace()); - if (equip != null) - { - text = "(Current)\r\n" + equip.getDisplayText() + "----------\r\n" + text; - } - tooltip.showTooltip(text); - } + item = items[currentBag]; } else { - if (equip != null) - { - tooltip.showTooltip(equip.getDisplayText()); - } + item = equip; } + return item; } public void hideTooltip() { - tooltip.hideToolTip(); - } - - public void onClick() - { - removeItem(); - tooltip.hideToolTip(); + inventory.itemDisplay.transform.localScale = new Vector3(0,0,0); } public void OnMouseDrag() { - GameObject.Find("Inventory").GetComponent().setDrag(gameObject); + inventory.setDrag(gameObject); + Item toMove; + if (place == ItemPlace.BAG) + { + toMove = items[currentBag]; + } + else + { + toMove = equip; + } + if (toMove != null) + { + inventory.dragImage.GetComponent().color = toMove.rarityColor; + inventory.dragImage.GetComponent().texture = toMove.image; + inventory.dragImage.transform.position = new Vector3(Input.mousePosition.x - 50, Input.mousePosition.y - 50, 0); + } } public void OnMouseUp() { - GameObject startDrag = GameObject.Find("Inventory").GetComponent().getDrag(); + inventory.dragImage.GetComponent().color = new Color(0,0,0,0); + inventory.dragImage.GetComponent().texture = null; + inventory.dragImage.transform.position = new Vector3(0,0,0); + GameObject startDrag = inventory.getDrag(); Item item; bool isSwap = false; if (startDrag.GetComponent().place == ItemPlace.BAG) { - item = startDrag.GetComponent().getItem(); + item = startDrag.GetComponent().getItem(currentBag); } else { @@ -106,10 +138,19 @@ namespace Assets.Scripts { if (items[currentBag] != null) { - startDrag.GetComponent().setItem(items[currentBag]); + if (startDrag.GetComponent().place == ItemPlace.BAG) + { + startDrag.GetComponent().setItem(items[currentBag], currentBag); + } + else + { + startDrag.GetComponent().setEquip(items[currentBag]); + inventory.calculateStatBoost(item.getAttributes(), false); + inventory.calculateStatBoost(items[currentBag].getAttributes(), true); + } isSwap = true; } - setItem(item); + setItem(item, currentBag); } else { @@ -117,20 +158,23 @@ namespace Assets.Scripts { if (startDrag.GetComponent().place == ItemPlace.BAG) { - startDrag.GetComponent().setItem(equip); + startDrag.GetComponent().setItem(equip, currentBag); isSwap = true; + inventory.calculateStatBoost(equip.getAttributes(), false); } else { return; } } + inventory.calculateStatBoost(item.getAttributes(), true); setEquip(item); } if (!isSwap) { if (startDrag.GetComponent().place != ItemPlace.BAG) { + inventory.calculateStatBoost(startDrag.GetComponent().getEquip().getAttributes(), false); startDrag.GetComponent().removeEquip(); } else @@ -174,7 +218,7 @@ namespace Assets.Scripts image = Resources.Load("Equipment/Inv_Boots"); break; case ItemPlace.SHOULDER: - image = Resources.Load("Equipment/Inv_Shoulder"); + image = Resources.Load("Equipment/Inv_Shoulders"); break; case ItemPlace.AMULET: image = Resources.Load("Equipment/Inv_Amulet"); diff --git a/Assets/Scripts/Item.cs b/Assets/Scripts/Item.cs index b382e16..75a4353 100644 --- a/Assets/Scripts/Item.cs +++ b/Assets/Scripts/Item.cs @@ -33,13 +33,59 @@ namespace Assets.Scripts } calculateAttributes(luck, numberOfAttributes); place = (ItemPlace)rand.Next(8); + string replacement = ""; + if (place == ItemPlace.LEFTHAND) + { + switch (GameObject.Find("Player").GetComponent().getClass().classname) + { + case "Warrior": + replacement = "greatshield"; + break; + case "Thief": + replacement = "shield"; + break; + case "Mage": + replacement = "orb"; + break; + } + } + else if (place == ItemPlace.RIGHTHAND) + { + switch (GameObject.Find("Player").GetComponent().getClass().classname) + { + case "Warrior": + replacement = "sword"; + break; + case "Thief": + replacement = "dagger"; + break; + case "Mage": + replacement = "wand"; + break; + } + } if (itemName != null) { - itemName = rarity.ToString() + " " + place.ToString() + " of " + itemName; + if (replacement.Length > 0) + { + itemName = rarity.ToString() + " " + replacement + " of " + itemName; + } + else + { + itemName = rarity.ToString() + " " + place.ToString() + " of " + itemName; + } + } else { - itemName = rarity.ToString() + " " + place.ToString(); + if (replacement.Length > 0) + { + itemName = rarity.ToString() + " " + replacement; + } + else + { + itemName = rarity.ToString() + " " + place.ToString(); + } } itemName = itemName.ToLower(); itemName = char.ToUpper(itemName[0]) + itemName.Substring(1); @@ -224,7 +270,7 @@ namespace Assets.Scripts image = Resources.Load("Equipment/Inv_Boots"); break; case ItemPlace.SHOULDER: - image = Resources.Load("Equipment/Inv_Shoulder"); + image = Resources.Load("Equipment/Inv_Shoulders"); break; case ItemPlace.AMULET: image = Resources.Load("Equipment/Inv_Amulet"); @@ -237,6 +283,11 @@ namespace Assets.Scripts break; } } + + public Dictionary getAttributes() + { + return attributes; + } } } \ No newline at end of file