+物品展示
todo 玩家背包
This commit is contained in:
6
.idea/.idea.Dontback/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/.idea.Dontback/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="UnnecessaryLabelOnBreakStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
File diff suppressed because one or more lines are too long
2
Assets/Resources/Dialog/ItemText.csv
Normal file
2
Assets/Resources/Dialog/ItemText.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
name,description
|
||||
Cube,只是一个方块。
|
||||
|
7
Assets/Resources/Dialog/ItemText.csv.meta
Normal file
7
Assets/Resources/Dialog/ItemText.csv.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff7174eb735efa145a5859c9464a4cb5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Resources/Item.meta
Normal file
8
Assets/Resources/Item.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8089c5c19169a146bc0b8710128403e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Item/Cube.png
Normal file
BIN
Assets/Resources/Item/Cube.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
127
Assets/Resources/Item/Cube.png.meta
Normal file
127
Assets/Resources/Item/Cube.png.meta
Normal file
@@ -0,0 +1,127 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e300c3d4a418b3b449a6fa22573a6cb0
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
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
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
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: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -475,6 +475,84 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
index: 1
|
||||
--- !u!1 &143509929
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 143509930}
|
||||
- component: {fileID: 143509932}
|
||||
- component: {fileID: 143509931}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &143509930
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 143509929}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1028053271}
|
||||
- {fileID: 1251479982}
|
||||
- {fileID: 607943744}
|
||||
m_Father: {fileID: 1673866091}
|
||||
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.5, y: 0.5}
|
||||
--- !u!114 &143509931
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 143509929}
|
||||
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: 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 &143509932
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 143509929}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &158490224
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -624,7 +702,7 @@ GameObject:
|
||||
- component: {fileID: 183733061}
|
||||
- component: {fileID: 183733062}
|
||||
m_Layer: 0
|
||||
m_Name: CubeCanBeAct
|
||||
m_Name: Cube
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@@ -831,6 +909,140 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 601447515}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &607943743
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 607943744}
|
||||
- component: {fileID: 607943746}
|
||||
- component: {fileID: 607943745}
|
||||
m_Layer: 5
|
||||
m_Name: ItemText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &607943744
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 607943743}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 143509930}
|
||||
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: 608, y: 0}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &607943745
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 607943743}
|
||||
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: ItemText
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: faf204988c60a4c4fb8373d533153646, 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: 1
|
||||
m_VerticalAlignment: 256
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: -242.03677, y: -165.05481, z: -132.2355, w: -380.00235}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 1
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &607943746
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 607943743}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &675862481
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1519,6 +1731,78 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
TargetAspect: 1.7777778
|
||||
--- !u!1 &1028053270
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1028053271}
|
||||
- component: {fileID: 1028053273}
|
||||
- component: {fileID: 1028053272}
|
||||
m_Layer: 5
|
||||
m_Name: ItemIcon
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1028053271
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1028053270}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 143509930}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 370.96, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1028053272
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1028053270}
|
||||
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 &1028053273
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1028053270}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1107264574
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1619,6 +1903,7 @@ RectTransform:
|
||||
- {fileID: 1296216549}
|
||||
- {fileID: 940286022}
|
||||
- {fileID: 2008085081}
|
||||
- {fileID: 1673866091}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@@ -1680,6 +1965,140 @@ MonoBehaviour:
|
||||
printTime: 0
|
||||
maxPrintTime: 6
|
||||
isTime2Break: 0
|
||||
--- !u!1 &1251479981
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1251479982}
|
||||
- component: {fileID: 1251479984}
|
||||
- component: {fileID: 1251479983}
|
||||
m_Layer: 5
|
||||
m_Name: ItemName
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1251479982
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1251479981}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 143509930}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -340.9, y: -181.3}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1251479983
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1251479981}
|
||||
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: ItemName
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: faf204988c60a4c4fb8373d533153646, 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: 48
|
||||
m_fontSizeBase: 48
|
||||
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: -81.26331, y: 0, z: -57.968506, w: -43.84233}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 1
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!222 &1251479984
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1251479981}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1265395134
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2326,6 +2745,68 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1644802855}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1673866090
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1673866091}
|
||||
- component: {fileID: 1673866093}
|
||||
- component: {fileID: 1673866094}
|
||||
m_Layer: 5
|
||||
m_Name: ItemShowPanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1673866091
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673866090}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 143509930}
|
||||
m_Father: {fileID: 1107264578}
|
||||
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.5, y: 0.5}
|
||||
--- !u!222 &1673866093
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673866090}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1673866094
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1673866090}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d01b517b44ab4ca4adc5cec9b2a8ea4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
itemIcon: {fileID: 1028053272}
|
||||
itemName: {fileID: 1251479983}
|
||||
itemDescription: {fileID: 607943745}
|
||||
panel: {fileID: 143509929}
|
||||
--- !u!1 &1815511256
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,12 +14,16 @@ namespace Camera
|
||||
_camera = GetComponent<UnityEngine.Camera>();
|
||||
_processVolume = GetComponent<PostProcessVolume>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
private void OnEnable()
|
||||
{
|
||||
EventManager.Instance.PlayerRunning += PostProcess;
|
||||
EventManager.Instance.PlayerRunStop += ProcessingStop;
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
EventManager.Instance.PlayerRunning -= PostProcess;
|
||||
EventManager.Instance.PlayerRunStop -= ProcessingStop;
|
||||
}
|
||||
|
||||
private void PostProcess()
|
||||
{
|
||||
|
||||
@@ -16,12 +16,23 @@ namespace Camera
|
||||
private void Start()
|
||||
{
|
||||
_originalPos = cameraTransform.localPosition;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
EventManager.Instance.PlayerRunning += OnPlayerRunning;
|
||||
EventManager.Instance.PlayerRunStop += StopRunning;
|
||||
EventManager.Instance.PlayerWalking += OnPlayerWalking;
|
||||
EventManager.Instance.PlayerWalkStop += StopWalking;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EventManager.Instance.PlayerRunning -= OnPlayerRunning;
|
||||
EventManager.Instance.PlayerRunStop -= StopRunning;
|
||||
EventManager.Instance.PlayerWalking -= OnPlayerWalking;
|
||||
EventManager.Instance.PlayerWalkStop -= StopWalking;
|
||||
}
|
||||
|
||||
private void OnPlayerRunning()
|
||||
{
|
||||
|
||||
@@ -53,14 +53,19 @@ namespace Dialog
|
||||
private IEnumerator Delay()
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
EventManager.Instance.DialogEventSwitch(_eventToBeExc, _eventArg);
|
||||
EventManager.Instance.EventSwitch(_eventToBeExc, _eventArg);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
private void OnEnable()
|
||||
{
|
||||
EventManager.Instance.DialogPop += StartPrinting;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EventManager.Instance.DialogPop -= StartPrinting;
|
||||
}
|
||||
|
||||
private void Time2Break()
|
||||
{
|
||||
if (!isTime2Break) return;
|
||||
|
||||
@@ -27,9 +27,21 @@ namespace Dialog
|
||||
}
|
||||
}
|
||||
|
||||
public class ItemText
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly string Description;
|
||||
|
||||
public ItemText(string name, string description)
|
||||
{
|
||||
Name = name;
|
||||
Description = description;
|
||||
}
|
||||
}
|
||||
public class DialogManager : MonoBehaviour
|
||||
{
|
||||
private readonly List<Dialog> _dialog = new();
|
||||
private readonly List<ItemText> _itemTexts = new();
|
||||
private static DialogManager _instance;
|
||||
|
||||
public static DialogManager Instance
|
||||
@@ -53,10 +65,32 @@ namespace Dialog
|
||||
else
|
||||
{
|
||||
LoadCsv("Dialog/DialogData");
|
||||
LoadItemTexts("Dialog/ItemText");
|
||||
_instance = this;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadItemTexts(string resourcePath)
|
||||
{
|
||||
var texts = Resources.Load<TextAsset>(resourcePath);
|
||||
if (texts == null)
|
||||
{
|
||||
Debug.LogError($"Unable to find CSV file at path: {resourcePath}");
|
||||
return;
|
||||
}
|
||||
var lines = texts.text.Split('\n');
|
||||
for (var i = 1; i < lines.Length; i++)
|
||||
{
|
||||
var values = lines[i].Split(',');
|
||||
if (values.Length < 2) continue;
|
||||
var text = new ItemText(
|
||||
values[0],
|
||||
values[1]
|
||||
);
|
||||
_itemTexts.Add(text);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadCsv(string resourcePath)
|
||||
{
|
||||
var textAsset = Resources.Load<TextAsset>(resourcePath);
|
||||
@@ -95,5 +129,15 @@ namespace Dialog
|
||||
Debug.LogWarning($"Dialog with index {index} not found.");
|
||||
return null;
|
||||
}
|
||||
|
||||
public ItemText GetItemText(string nName)
|
||||
{
|
||||
foreach (var text in _itemTexts.Where(text => text.Name == nName))
|
||||
{
|
||||
return text;
|
||||
}
|
||||
Debug.LogWarning($"Dialog with name {nName} not found.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Assets/Scripts/Dialog/ItemDialog.cs
Normal file
46
Assets/Scripts/Dialog/ItemDialog.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using Event;
|
||||
using Event.EventArgs;
|
||||
using Keyboard;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Dialog
|
||||
{
|
||||
public class ItemDialog : MonoBehaviour
|
||||
{
|
||||
public RawImage itemIcon;
|
||||
public TMP_Text itemName;
|
||||
public TMP_Text itemDescription;
|
||||
public GameObject panel;
|
||||
private string _itemName;
|
||||
private void OnEnable()
|
||||
{
|
||||
EventManager.Instance.ItemDialog+=DialogPop;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EventManager.Instance.ItemDialog-=DialogPop;
|
||||
}
|
||||
|
||||
private void DialogPop(ItemDialogArgs itemDialogArgs)
|
||||
{
|
||||
var itemText = DialogManager.Instance.GetItemText(itemDialogArgs.ItemName);
|
||||
if (itemText is null) return;
|
||||
panel.SetActive(true);
|
||||
itemIcon.texture = Resources.Load<Texture2D>("Item" + "/" + itemText.Name);
|
||||
itemName.text = itemText.Name;
|
||||
itemDescription.text = itemText.Description;
|
||||
Time.timeScale = 0;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if ((!panel.activeSelf || !Input.GetKeyDown(KeyCode.Escape)) &&
|
||||
!Input.GetKeyDown(KeySettingManager.Instance.GetKey("InterAct"))) return;
|
||||
Time.timeScale = 1;
|
||||
panel.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Dialog/ItemDialog.cs.meta
Normal file
3
Assets/Scripts/Dialog/ItemDialog.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d01b517b44ab4ca4adc5cec9b2a8ea4d
|
||||
timeCreated: 1727505211
|
||||
@@ -49,14 +49,19 @@ namespace Dialog
|
||||
private IEnumerator Delay()
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
EventManager.Instance.DialogEventSwitch(_eventToBeExc, _eventArg);
|
||||
EventManager.Instance.EventSwitch(_eventToBeExc, _eventArg);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
private void OnEnable()
|
||||
{
|
||||
EventManager.Instance.DialogPop += StartPrinting;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EventManager.Instance.DialogPop -= StartPrinting;
|
||||
}
|
||||
|
||||
private IEnumerator BlinkCursor()
|
||||
{
|
||||
while (true)
|
||||
|
||||
12
Assets/Scripts/Event/EventArgs/ItemDialogArgs.cs
Normal file
12
Assets/Scripts/Event/EventArgs/ItemDialogArgs.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Event.EventArgs
|
||||
{
|
||||
public class ItemDialogArgs : System.EventArgs
|
||||
{
|
||||
public string ItemName { get;private set; }
|
||||
|
||||
public ItemDialogArgs(string nItemName)
|
||||
{
|
||||
ItemName = nItemName;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Event/EventArgs/ItemDialogArgs.cs.meta
Normal file
3
Assets/Scripts/Event/EventArgs/ItemDialogArgs.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9296ff0a4da4c7094115457f7278e00
|
||||
timeCreated: 1727505266
|
||||
6
Assets/Scripts/Event/EventHandler/ItemDialogHandler.cs
Normal file
6
Assets/Scripts/Event/EventHandler/ItemDialogHandler.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Event.EventArgs;
|
||||
|
||||
namespace Event.EventHandler
|
||||
{
|
||||
public delegate void ItemDialogHandler(ItemDialogArgs args);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: beeb3f2691a14bb291fd94c08e811d6d
|
||||
timeCreated: 1727505146
|
||||
@@ -42,8 +42,10 @@ namespace Event
|
||||
public event PlayerWalkStartHandler PlayerWalkStart;
|
||||
public event PlayerWalkStopHandler PlayerWalkStop;
|
||||
public event PlayerWalkingHandler PlayerWalking;
|
||||
|
||||
public event ItemDialogHandler ItemDialog;
|
||||
|
||||
public void DialogEventSwitch(string eventName, string args)
|
||||
public void EventSwitch(string eventName, string args)
|
||||
{
|
||||
switch (eventName)
|
||||
{
|
||||
@@ -85,6 +87,11 @@ namespace Event
|
||||
PlayerRunStart?.Invoke();
|
||||
}
|
||||
|
||||
public void OnItemDialog(string nName)
|
||||
{
|
||||
ItemDialog?.Invoke(new ItemDialogArgs(nName));
|
||||
}
|
||||
|
||||
public void OnPlayerRunning()
|
||||
{
|
||||
PlayerRunning?.Invoke();
|
||||
|
||||
@@ -8,11 +8,16 @@ namespace Items.Abstract
|
||||
{
|
||||
public int index;
|
||||
|
||||
private void Start()
|
||||
private void OnEnable()
|
||||
{
|
||||
EventManager.Instance.CameraInterAct += ReceiveEvent;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
EventManager.Instance.CameraInterAct -= ReceiveEvent;
|
||||
}
|
||||
|
||||
protected virtual void ReceiveEvent(CameraInterActArgs item)
|
||||
{
|
||||
if (item.Item != gameObject) return;
|
||||
@@ -21,7 +26,7 @@ namespace Items.Abstract
|
||||
|
||||
protected virtual void ActivateItem()
|
||||
{
|
||||
Debug.Log("Item is activated");
|
||||
//Debug.Log("Item is activated");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ namespace Items
|
||||
{
|
||||
base.ActivateItem();
|
||||
EventManager.Instance.OnDialogPop(index);
|
||||
EventManager.Instance.OnItemDialog(gameObject.name);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user