Compare commits
2 commits
2b5a227237
...
29140fcf8b
| Author | SHA1 | Date | |
|---|---|---|---|
| 29140fcf8b | |||
| 8ed9a59fec |
78 changed files with 2910 additions and 1849 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
BIN
Assets/.DS_Store
vendored
BIN
Assets/.DS_Store
vendored
Binary file not shown.
8
Assets/Settings/Build Profiles.meta
Normal file
8
Assets/Settings/Build Profiles.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e6ba11b83a33a47ae97a2c030f4437b2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
47
Assets/Settings/Build Profiles/macOS.asset
Normal file
47
Assets/Settings/Build Profiles/macOS.asset
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 15003, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: macOS
|
||||
m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.Build.Profile.BuildProfile
|
||||
m_AssetVersion: 1
|
||||
m_BuildTarget: 2
|
||||
m_Subtarget: 2
|
||||
m_PlatformId: 0d2129357eac403d8b359c2dcbf82502
|
||||
m_PlatformBuildProfile:
|
||||
rid: 8483784835878617158
|
||||
m_OverrideGlobalSceneList: 0
|
||||
m_Scenes: []
|
||||
m_ScriptingDefines: []
|
||||
m_PlayerSettingsYaml:
|
||||
m_Settings: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 8483784835878617158
|
||||
type: {class: OSXStandaloneBuildProfile, ns: UnityEditor.OSXStandalone, asm: UnityEditor.OSXStandalone.Extensions}
|
||||
data:
|
||||
m_Development: 0
|
||||
m_ConnectProfiler: 0
|
||||
m_BuildWithDeepProfilingSupport: 0
|
||||
m_AllowDebugging: 0
|
||||
m_WaitForManagedDebugger: 0
|
||||
m_ManagedDebuggerFixedPort: 0
|
||||
m_ExplicitNullChecks: 0
|
||||
m_ExplicitDivideByZeroChecks: 0
|
||||
m_ExplicitArrayBoundsChecks: 0
|
||||
m_CompressionType: 0
|
||||
m_InstallInBuildFolder: 0
|
||||
m_InsightsSettingsContainer:
|
||||
m_BuildProfileEngineDiagnosticsState: 2
|
||||
m_MacOSXcodeBuildConfig: 1
|
||||
m_Architecture: 2
|
||||
m_CreateXcodeProject: 0
|
||||
8
Assets/Settings/Build Profiles/macOS.asset.meta
Normal file
8
Assets/Settings/Build Profiles/macOS.asset.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 507d789f650e6469aafc1773c976cb0e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/StreamingAssets/.DS_Store
vendored
BIN
Assets/StreamingAssets/.DS_Store
vendored
Binary file not shown.
BIN
Assets/_/.DS_Store
vendored
BIN
Assets/_/.DS_Store
vendored
Binary file not shown.
BIN
Assets/_/Content/.DS_Store
vendored
BIN
Assets/_/Content/.DS_Store
vendored
Binary file not shown.
8
Assets/_/Content/Sprites.meta
Normal file
8
Assets/_/Content/Sprites.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f1bccd7cd4a1c483fb787906ba6228ea
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
BIN
Assets/_/Content/Sprites/AVI-logo.png
Normal file
BIN
Assets/_/Content/Sprites/AVI-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
117
Assets/_/Content/Sprites/AVI-logo.png.meta
Normal file
117
Assets/_/Content/Sprites/AVI-logo.png.meta
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2c6248ac814304e0999e01c4da5f37ac
|
||||
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: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
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: 4
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_/Content/Sprites/Background_green.png
Normal file
BIN
Assets/_/Content/Sprites/Background_green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
117
Assets/_/Content/Sprites/Background_green.png.meta
Normal file
117
Assets/_/Content/Sprites/Background_green.png.meta
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e0673d29f9bac4b4f9e01ba7f6d253cf
|
||||
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: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
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: 4
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_/Content/Sprites/cover.png
Normal file
BIN
Assets/_/Content/Sprites/cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
117
Assets/_/Content/Sprites/cover.png.meta
Normal file
117
Assets/_/Content/Sprites/cover.png.meta
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fb940c24e391f4841ba3b5a18f80decc
|
||||
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: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
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: 4
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_/Content/Sprites/cursor.png
Normal file
BIN
Assets/_/Content/Sprites/cursor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
117
Assets/_/Content/Sprites/cursor.png.meta
Normal file
117
Assets/_/Content/Sprites/cursor.png.meta
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2e13a6792973f4bd1bde9bbd6350947c
|
||||
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: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
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: 4
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_/Content/Sprites/icone.png
Normal file
BIN
Assets/_/Content/Sprites/icone.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 410 KiB |
117
Assets/_/Content/Sprites/icone.png.meta
Normal file
117
Assets/_/Content/Sprites/icone.png.meta
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7356543a802e040f18c822d55bcc8dec
|
||||
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: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
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: 4
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/_/Content/Sprites/text.png
Normal file
BIN
Assets/_/Content/Sprites/text.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 88 KiB |
117
Assets/_/Content/Sprites/text.png.meta
Normal file
117
Assets/_/Content/Sprites/text.png.meta
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 889128e4757934138abb506bbc5a61e6
|
||||
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: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
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: 4
|
||||
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
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using Core.Runtime.Interfaces;
|
||||
using UnityEditor.Graphs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Core.Runtime
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1af87ae38a8c4cc392838e512ee0a5a7
|
||||
timeCreated: 1753972331
|
||||
guid: 9d93f672c88e468a91bf9a1881447d3d
|
||||
timeCreated: 1760972259
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 70056d884cd64fc182b3fb1051cf37f6
|
||||
timeCreated: 1753972353
|
||||
guid: c7346c50ac9344e887b8f4b585e19507
|
||||
timeCreated: 1760972269
|
||||
BIN
Assets/_/Features/UI/Runtime/.DS_Store
vendored
BIN
Assets/_/Features/UI/Runtime/.DS_Store
vendored
Binary file not shown.
|
|
@ -1,3 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2d3f76b5fab34eb4a7a72108fc94d9ff
|
||||
timeCreated: 1754227951
|
||||
guid: 6fb8b539b31e4439bab43c1385c6091c
|
||||
timeCreated: 1760972333
|
||||
BIN
Assets/_/Features/UI/Runtime/Adventurers/.DS_Store
vendored
BIN
Assets/_/Features/UI/Runtime/Adventurers/.DS_Store
vendored
Binary file not shown.
|
|
@ -1,91 +0,0 @@
|
|||
using System;
|
||||
using Adventurer.Runtime;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class AdventurerCardSelectionnable : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
public Sprite m_selectedSprite;
|
||||
public Sprite m_unselectedSprite;
|
||||
public GameObject m_BGSprite;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
_adventurer = GetComponent<AdventurerCardUI>().Adventurer;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (_isSelected)
|
||||
{
|
||||
m_BGSprite.GetComponent<Image>().sprite = m_selectedSprite;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_BGSprite.GetComponent<Image>().sprite = m_unselectedSprite;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
if (!QuestManager.Instance.CanSelectedAdventurers())
|
||||
{
|
||||
gameObject.GetComponent<Button>().interactable = false;
|
||||
return;
|
||||
}
|
||||
|
||||
_isSelected = !_isSelected;
|
||||
if (_isSelected)
|
||||
AdventurerSignals.RaiseAdventurerSelected(_adventurer);
|
||||
else
|
||||
AdventurerSignals.RaiseAdventurerUnselected(_adventurer);
|
||||
}
|
||||
|
||||
public void OnPointerEnter()
|
||||
{
|
||||
if (!QuestManager.Instance.CanSelectedAdventurers()) return;
|
||||
transform.localScale = Vector3.one * 1.1f;
|
||||
}
|
||||
|
||||
public void OnPointerExit()
|
||||
{
|
||||
transform.localScale = Vector3.one;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
bool _isSelected;
|
||||
AdventurerClass _adventurer;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ab0eb1ff1f8649719673f40e0d46da0f
|
||||
timeCreated: 1754334060
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
using System;
|
||||
using Adventurer.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class AdventurerCardUI : MonoBehaviour
|
||||
{
|
||||
#region Publics
|
||||
|
||||
[Header("UI References")]
|
||||
public GameObject m_hourglass;
|
||||
public TMPro.TextMeshProUGUI m_name;
|
||||
public TMPro.TextMeshProUGUI m_class;
|
||||
//public TMPro.TextMeshProUGUI m_traits;
|
||||
|
||||
//public TMPro.TextMeshProUGUI m_experience;
|
||||
public TMPro.TextMeshProUGUI m_level;
|
||||
|
||||
public TMPro.TextMeshProUGUI m_strength;
|
||||
public TMPro.TextMeshProUGUI m_defense;
|
||||
public TMPro.TextMeshProUGUI m_agility;
|
||||
public TMPro.TextMeshProUGUI m_intelligence;
|
||||
public Image m_portrait;
|
||||
|
||||
[Header("Only Shop")]
|
||||
public Button m_buyButton;
|
||||
public GameObject m_footer;
|
||||
public TMPro.TextMeshProUGUI m_price;
|
||||
|
||||
AdventurerClass _adventurer;
|
||||
|
||||
#endregion
|
||||
|
||||
public AdventurerClass Adventurer => _adventurer;
|
||||
|
||||
void Start()
|
||||
{
|
||||
QuestManager.OnQuestCompleted += ChangeAvailable;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
QuestManager.OnQuestCompleted -= ChangeAvailable;
|
||||
}
|
||||
|
||||
public void setup(AdventurerClass adventurerClass)
|
||||
{
|
||||
_adventurer = adventurerClass;
|
||||
m_name.text = adventurerClass.Name;
|
||||
m_class.text = adventurerClass.AdventurerClassEnum.ToString();
|
||||
m_level.text = adventurerClass.Level.ToString();
|
||||
m_strength.text = adventurerClass.Strength.ToString();
|
||||
m_defense.text = adventurerClass.Defense.ToString();
|
||||
m_agility.text = adventurerClass.Agility.ToString();
|
||||
m_intelligence.text = adventurerClass.Intelligence.ToString();
|
||||
|
||||
if(!adventurerClass.IsAvailable && m_hourglass != null)
|
||||
m_hourglass.gameObject.SetActive(true);
|
||||
|
||||
var interaction = GetComponent<InteractionAdventurerCard>();
|
||||
if (interaction != null)
|
||||
interaction.SetAdventurer(adventurerClass);
|
||||
}
|
||||
|
||||
public void SetPortrait(Sprite portrait)
|
||||
{
|
||||
if (m_portrait != null)
|
||||
m_portrait.sprite = portrait;
|
||||
}
|
||||
|
||||
void ChangeAvailable(QuestClass quest)
|
||||
{
|
||||
if (quest.State == QuestStateEnum.Completed && _adventurer.IsAvailable)
|
||||
{
|
||||
if (m_hourglass != null)
|
||||
m_hourglass.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ac33d10d3a201471d817d415fcde31b0
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
namespace GameUI.Runtime
|
||||
{
|
||||
public enum AdventurerSortEnum
|
||||
{
|
||||
None,
|
||||
Available,
|
||||
NotAvailable,
|
||||
AssignedToQuest,
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5b2582e771c9405e93ced5bbc1a0003b
|
||||
timeCreated: 1754337102
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
using Adventurer.Runtime;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class AdventurerUIController : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
AdventurerSignals.OnInfoAdventurerPanel += HandleInfoPanel;
|
||||
_uiManager = GetComponent<UIManager>();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
void HandleInfoPanel(AdventurerClass adventurer)
|
||||
{
|
||||
_uiManager.ShowPanel(_infoAdventurerPanel);
|
||||
_infoAdventurerPanel.GetComponent<InfoAdventurerPanel>().ShowInfo(adventurer);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
[SerializeField] private GameObject _infoAdventurerPanel;
|
||||
UIManager _uiManager;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c4d5cc7840ef451fa22f5d0c277d6aff
|
||||
timeCreated: 1754231469
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using EventSystem.Runtime;
|
||||
using Adventurer.Runtime;
|
||||
using Core.Runtime;
|
||||
using Quests.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class AdventurersPanel : BasePanel
|
||||
{
|
||||
#region Unity API
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
AdventurerSignals.OnPortraitCaptured += OnPortraitCapturedHandler;
|
||||
AdventurerSignals.OnRefresh += DisplayAdventurers;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
foreach (var txt in GetComponentsInChildren<TMP_Text>())
|
||||
{
|
||||
txt.text = LocalizationSystem.Instance.GetLocalizedText(txt.text);
|
||||
}
|
||||
|
||||
DisplayAdventurers();
|
||||
}
|
||||
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
AdventurerSignals.OnPortraitCaptured -= OnPortraitCapturedHandler;
|
||||
AdventurerSignals.OnRefresh -= DisplayAdventurers;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
void OnPortraitCapturedHandler(AdventurerClass adventurer, Sprite portrait)
|
||||
{
|
||||
foreach (Transform child in _heroesPanel.transform)
|
||||
{
|
||||
AdventurerCardUI card = child.GetComponent<AdventurerCardUI>();
|
||||
if (card != null && card.Adventurer == adventurer)
|
||||
{
|
||||
card.SetPortrait(portrait);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayAdventurers()
|
||||
{
|
||||
foreach (Transform child in _heroesPanel.transform)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
|
||||
List<AdventurerClass> filtered = FilterAdventurers(_sort);
|
||||
|
||||
foreach (AdventurerClass adventurer in filtered)
|
||||
{
|
||||
GameObject cardAdventurerGO = Instantiate(_adventurerPrefab, _heroesPanel.transform);
|
||||
cardAdventurerGO.transform.SetAsLastSibling();
|
||||
AdventurerCardUI card = cardAdventurerGO.GetComponent<AdventurerCardUI>();
|
||||
card.setup(adventurer);
|
||||
}
|
||||
}
|
||||
|
||||
List<AdventurerClass> FilterAdventurers(AdventurerSortEnum sortType)
|
||||
{
|
||||
List<AdventurerClass> allAdventurers = GetFact<List<AdventurerClass>>("my_adventurers");
|
||||
switch (sortType)
|
||||
{
|
||||
case AdventurerSortEnum.Available:
|
||||
return allAdventurers.FindAll(a => a.IsAvailable);
|
||||
case AdventurerSortEnum.NotAvailable:
|
||||
return allAdventurers.FindAll(a => !a.IsAvailable);
|
||||
case AdventurerSortEnum.AssignedToQuest:
|
||||
return QuestClass.GetAdventurersFromId(QuestManager.Instance.AssignedAdventurers);
|
||||
case AdventurerSortEnum.None:
|
||||
return allAdventurers;
|
||||
default:
|
||||
return allAdventurers;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
[SerializeField] GameObject _adventurerPrefab;
|
||||
[SerializeField] GameObject _heroesPanel;
|
||||
[SerializeField] AdventurerSortEnum _sort;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5104eaeccc974d829b1bc9298481c2df
|
||||
timeCreated: 1753910448
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 654fd5aae0624c529ff6147dbfb36890
|
||||
timeCreated: 1754078701
|
||||
|
|
@ -1,185 +0,0 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Adventurer.Runtime;
|
||||
using UnityEngine;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using Random = UnityEngine.Random;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class RecruitementPanel: BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
public AdventurerFactorySO m_adventurersSO;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (_content == null)
|
||||
{
|
||||
_content = GetComponent<RectTransform>();
|
||||
}
|
||||
StartCoroutine(OpenRoutine());
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
IEnumerator OpenRoutine()
|
||||
{
|
||||
yield return null;
|
||||
|
||||
GenerateAdventurer(20);
|
||||
|
||||
// Wait until end of frame to ensure instantiated elements are present before forcing layout
|
||||
yield return new WaitForEndOfFrame();
|
||||
|
||||
Canvas.ForceUpdateCanvases();
|
||||
if (_content != null)
|
||||
{
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(_content);
|
||||
// Also rebuild the parent (Viewport) if present to ensure mask/scroll region updates
|
||||
var parentRT = _content.parent as RectTransform;
|
||||
if (parentRT != null)
|
||||
{
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(parentRT);
|
||||
}
|
||||
}
|
||||
Canvas.ForceUpdateCanvases();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
[ContextMenu("Effacer le container")]
|
||||
public void Clear()
|
||||
{
|
||||
if (_content == null)
|
||||
{
|
||||
_content = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
if (_content == null) return;
|
||||
|
||||
foreach (Transform child in _content)
|
||||
{
|
||||
AdventurerCardUI card = child.GetComponent<AdventurerCardUI>();
|
||||
if (card != null)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ContextMenu("Générer un aventurier")]
|
||||
public void Generate()
|
||||
{
|
||||
GenerateAdventurer();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
public void GenerateAdventurer(int nbAdventurers = 1)
|
||||
{
|
||||
if (_content == null)
|
||||
{
|
||||
_content = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < nbAdventurers; i++)
|
||||
{
|
||||
AdventurerClass newRecruit = m_adventurersSO.CreateAdventurer();
|
||||
DisplayHeroCard(newRecruit);
|
||||
}
|
||||
|
||||
// Ensure the first-time open displays items correctly
|
||||
StartCoroutine(RefreshLayoutNextFrame());
|
||||
}
|
||||
|
||||
void DisplayHeroCard(AdventurerClass newRecruit)
|
||||
{
|
||||
if (_content == null)
|
||||
{
|
||||
_content = GetComponent<RectTransform>();
|
||||
}
|
||||
|
||||
GameObject adventurerGO = Instantiate(_adventurerPrefab, _content != null ? _content : transform);
|
||||
adventurerGO.transform.SetAsLastSibling();
|
||||
AdventurerCardUI card = adventurerGO.GetComponent<AdventurerCardUI>();
|
||||
|
||||
card.setup(newRecruit);
|
||||
|
||||
string price = ((newRecruit.Agility + newRecruit.Defense + newRecruit.Intelligence + newRecruit.Strength) / 4 * 50).ToString();
|
||||
card.m_price.text = price;
|
||||
card.m_footer.gameObject.SetActive(true);
|
||||
|
||||
card.m_buyButton.onClick.RemoveAllListeners();
|
||||
card.m_buyButton.onClick.AddListener(() => BuyHero(adventurerGO, newRecruit, int.Parse(price)));
|
||||
}
|
||||
|
||||
IEnumerator RefreshLayoutNextFrame()
|
||||
{
|
||||
yield return new WaitForEndOfFrame();
|
||||
Canvas.ForceUpdateCanvases();
|
||||
if (_content != null)
|
||||
{
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(_content);
|
||||
}
|
||||
Canvas.ForceUpdateCanvases();
|
||||
}
|
||||
|
||||
void BuyHero(GameObject go, AdventurerClass newRecruit, int price = 0)
|
||||
{
|
||||
Player.Runtime.PlayerClass playerClass = GetFact<Player.Runtime.PlayerClass>(GameManager.Instance.Profile);
|
||||
if (playerClass.AdventurersCount == playerClass.AdventurersMax)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (playerClass.Money >= price)
|
||||
{
|
||||
playerClass.AdventurersCount += 1;
|
||||
playerClass.Money -= price;
|
||||
if (!FactExists<List<AdventurerClass>>("my_adventurers", out _))
|
||||
{
|
||||
SetFact<List<AdventurerClass>>("my_adventurers", new List<AdventurerClass>(), FactPersistence.Persistent);
|
||||
}
|
||||
List<AdventurerClass> myAdventurers = GetFact<List<AdventurerClass>>("my_adventurers");
|
||||
myAdventurers.Add(newRecruit);
|
||||
SaveFacts();
|
||||
_photoStudio.SetActive(true);
|
||||
AdventurerSignals.RaiseSpawnRequested(newRecruit);
|
||||
AdventurerSignals.RaiseRefreshAdventurers();
|
||||
Destroy(go);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
[SerializeField] RectTransform _content; // Assign this to ScrollView/Viewport/Content in the inspector
|
||||
private int _nextId = 0;
|
||||
[SerializeField] GameObject _adventurerPrefab;
|
||||
[SerializeField] GameObject _photoStudio;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1e6344b00ba24272abc7c36ed57c87b0
|
||||
timeCreated: 1753477292
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
using Adventurer.Runtime;
|
||||
using Core.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class InfoAdventurerPanel : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
public TextMeshProUGUI m_name;
|
||||
public TextMeshProUGUI m_level;
|
||||
public TextMeshProUGUI m_adventurerClass;
|
||||
public TextMeshProUGUI m_strenght;
|
||||
public TextMeshProUGUI m_defense;
|
||||
public TextMeshProUGUI m_agility;
|
||||
public TextMeshProUGUI m_intelligence;
|
||||
public TextMeshProUGUI m_isAvailable;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void ShowInfo(AdventurerClass adventurer)
|
||||
{
|
||||
m_name.text = adventurer.Name;
|
||||
m_level.text = $"Level {adventurer.Level.ToString()}";
|
||||
m_adventurerClass.text = adventurer.AdventurerClassEnum.ToString();
|
||||
m_strenght.text = adventurer.Strength.ToString();
|
||||
m_defense.text = adventurer.Defense.ToString();
|
||||
m_agility.text = adventurer.Agility.ToString();
|
||||
m_intelligence.text = adventurer.Intelligence.ToString();
|
||||
|
||||
if (adventurer.IsAvailable)
|
||||
{
|
||||
m_isAvailable.color = new Color(51, 171, 32);
|
||||
m_isAvailable.text = LocalizationSystem.Instance.GetLocalizedText("in_qg");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_isAvailable.color = new Color(171, 32, 32);
|
||||
m_isAvailable.text = LocalizationSystem.Instance.GetLocalizedText("in_quest");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1651133be0a74e70899889b1ea3cacdc
|
||||
timeCreated: 1754230195
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
using System;
|
||||
using Adventurer.Runtime;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class InteractionAdventurerCard : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void SetAdventurer(AdventurerClass adventurer)
|
||||
{
|
||||
_adventurer = adventurer;
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
AdventurerSignals.RaiseInfoAdventurerPanel(_adventurer);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
AdventurerClass _adventurer;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 784c9e46540b4c5c8acb20a4605edb44
|
||||
timeCreated: 1754227974
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
using System;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class BasePanel : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
PanelSignals.OnRefresh += Refresh;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
PanelSignals.OnRefresh -= Refresh;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void Refresh(string panelName)
|
||||
{
|
||||
// Debug supprimé
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
// Variables privées
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a305d0b47032411087c35e385549fc85
|
||||
timeCreated: 1754381537
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
using System;
|
||||
using Core.Runtime;
|
||||
using Player.Runtime;
|
||||
using TMPro;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class InfoPanel : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
public TextMeshProUGUI m_guildName;
|
||||
public TextMeshProUGUI m_level;
|
||||
public TextMeshProUGUI m_golds;
|
||||
public TextMeshProUGUI m_adventurerCount;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
_infoPlayerClass = GetFact<PlayerClass>(GameManager.Instance.Profile);
|
||||
LocalizationSystem.Instance.LocalizeAllTextsIn(gameObject.transform);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
m_guildName.text = _infoPlayerClass.GuildName;
|
||||
m_level.text = $"{_infoPlayerClass.GuildLevel.ToString()}";
|
||||
m_golds.text = _infoPlayerClass.Money.ToString();
|
||||
m_adventurerCount.text = $"{_infoPlayerClass.AdventurersCount.ToString()}/{_infoPlayerClass.AdventurersMax.ToString()}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
PlayerClass _infoPlayerClass;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ec6601b07756494b9e9fc4510c60c398
|
||||
timeCreated: 1754058454
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
using Core.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class InventoryPanel : BaseMonoBehaviour
|
||||
{
|
||||
#region Unity API
|
||||
|
||||
private void Start()
|
||||
{
|
||||
foreach (var txt in GetComponentsInChildren<TMP_Text>())
|
||||
{
|
||||
txt.text = LocalizationSystem.Instance.GetLocalizedText(txt.text);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cf19bf1355c4475ba97030bd16379798
|
||||
timeCreated: 1753972477
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: aa5268813bd64e7b949a1a80ba5d8be7
|
||||
timeCreated: 1754249202
|
||||
guid: 17d13b060fde498687bf6ebda66ca7fd
|
||||
timeCreated: 1760972341
|
||||
BIN
Assets/_/Features/UI/Runtime/Quests/.DS_Store
vendored
BIN
Assets/_/Features/UI/Runtime/Quests/.DS_Store
vendored
Binary file not shown.
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a3a810e3a5f145b3aa9dd2eb4a74cd0f
|
||||
timeCreated: 1754590089
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
using System;
|
||||
using Core.Runtime;
|
||||
using Quests.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime.Events
|
||||
{
|
||||
public class EventsDisplayUI : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
public TextMeshProUGUI m_questNameText;
|
||||
public TextMeshProUGUI m_questDescriptionText;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
QuestManager.OnEventReceived += ShowEvent;
|
||||
QuestManager.OnEventFromQuest += ShowQuestName;
|
||||
m_questNameText.text = "";
|
||||
m_questDescriptionText.text = "";
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
QuestManager.OnEventReceived -= ShowEvent;
|
||||
QuestManager.OnEventFromQuest -= ShowQuestName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
void ShowQuestName(QuestClass quest)
|
||||
{
|
||||
m_questNameText.text = LocalizationSystem.Instance.GetLocalizedText(quest.Name);
|
||||
}
|
||||
|
||||
void ShowEvent(QuestEvent questEvent)
|
||||
{
|
||||
m_questDescriptionText.text = LocalizationSystem.Instance.GetLocalizedText(questEvent.DescriptionKey);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
// Variables privées
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5849cda3e5bb40ba805ebf198aa1465e
|
||||
timeCreated: 1754590246
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
using Core.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime.Events
|
||||
{
|
||||
public class QuestLogUI : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void setDatas(int time, string description)
|
||||
{
|
||||
_timeLogLabel.text = $"{time.ToString()} secs.";
|
||||
description = $"{LocalizationSystem.Instance.GetLocalizedText(description)}";
|
||||
_descriptionLogLabel.text = description;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
// Variables privées
|
||||
[SerializeField] TMP_Text _timeLogLabel;
|
||||
[SerializeField] TMP_Text _descriptionLogLabel;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5eca0fd92d064a449b71fe52ae375cd8
|
||||
timeCreated: 1754762284
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Core.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime.Events
|
||||
{
|
||||
public class QuestLogsListUI : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void Refresh(Guid questId)
|
||||
{
|
||||
for (int i = _logPanel.transform.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(_logPanel.transform.GetChild(i).gameObject);
|
||||
}
|
||||
|
||||
var logs = GetQuestEventsLogList(questId);
|
||||
foreach (var log in logs.OrderBy(l => l.Time))
|
||||
{
|
||||
QuestEvent questEvent = QuestManager.Instance.GetEventById(log.EventId);
|
||||
GenerateLog(log.Time, questEvent);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowFor(Guid questId)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
Refresh(questId);
|
||||
}
|
||||
|
||||
public void GenerateList(Guid questId)
|
||||
{
|
||||
Refresh(questId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
List<QuestEventLog> GetQuestEventsLogList(Guid questId)
|
||||
{
|
||||
Dictionary<Guid, List<QuestEventLog>> eventsDict = GetFact<Dictionary<Guid, List<QuestEventLog>>>("events_quests_history");
|
||||
|
||||
if (eventsDict != null && eventsDict.TryGetValue(questId, out var logs))
|
||||
return logs;
|
||||
|
||||
return new List<QuestEventLog>();
|
||||
}
|
||||
|
||||
void GenerateLog(int time, QuestEvent questEvent)
|
||||
{
|
||||
GameObject logGO = Instantiate(_questLogPrefab, _logPanel.transform);
|
||||
QuestLogUI logUI = logGO.GetComponent<QuestLogUI>();
|
||||
logUI.setDatas(time, questEvent.DescriptionKey);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
// Variables privées
|
||||
[SerializeField] GameObject _questLogPrefab;
|
||||
[SerializeField] GameObject _logPanel;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 599b7d2c983c43beb15f0242026c5c98
|
||||
timeCreated: 1754762587
|
||||
|
|
@ -1,218 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Adventurer.Runtime;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using GameUI.Runtime.Events;
|
||||
using Item.Runtime;
|
||||
using Quests.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class InfoQuestPanel : BaseMonoBehaviour
|
||||
{
|
||||
#region Publics
|
||||
[Header("UI Text Elements")]
|
||||
public TextMeshProUGUI m_title;
|
||||
public TextMeshProUGUI m_description;
|
||||
public TextMeshProUGUI m_objective;
|
||||
public TextMeshProUGUI m_reward;
|
||||
#endregion
|
||||
|
||||
#region Privates and Protected
|
||||
[Header("UI Control Elements")]
|
||||
[SerializeField] private GameObject _buttonActivation;
|
||||
[FormerlySerializedAs("_buttonRecap")]
|
||||
[SerializeField] private GameObject _panelRecap;
|
||||
[SerializeField] private GameObject _adventurersOnThisQuestPanel;
|
||||
[SerializeField] private GameObject _adventurersSelection;
|
||||
|
||||
private List<AdventurerClass> _adventurersSelected = new List<AdventurerClass>();
|
||||
private Button _activationButton;
|
||||
private TMP_Text _activationButtonText;
|
||||
#endregion
|
||||
|
||||
#region Unity API
|
||||
private void Start()
|
||||
{
|
||||
InitializeUI();
|
||||
RegisterEventHandlers();
|
||||
LocalizeTexts();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
UnregisterEventHandlers();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
UpdateActivationButtonState();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Initialization
|
||||
private void InitializeUI()
|
||||
{
|
||||
_activationButton = _buttonActivation.GetComponent<Button>();
|
||||
_activationButtonText = _buttonActivation.GetComponentInChildren<TMP_Text>();
|
||||
}
|
||||
|
||||
private void RegisterEventHandlers()
|
||||
{
|
||||
AdventurerSignals.OnAdventurerSelected += HandleAddAdventurersFromQuest;
|
||||
AdventurerSignals.OnAdventurerUnselected += HandleRemoveAdventurersFromQuest;
|
||||
}
|
||||
|
||||
private void UnregisterEventHandlers()
|
||||
{
|
||||
AdventurerSignals.OnAdventurerSelected -= HandleAddAdventurersFromQuest;
|
||||
AdventurerSignals.OnAdventurerUnselected -= HandleRemoveAdventurersFromQuest;
|
||||
}
|
||||
|
||||
private void LocalizeTexts()
|
||||
{
|
||||
foreach (var txt in GetComponentsInChildren<TMP_Text>())
|
||||
{
|
||||
txt.text = LocalizationSystem.Instance.GetLocalizedText(txt.text);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UI Updates
|
||||
private void UpdateActivationButtonState()
|
||||
{
|
||||
bool hasAdventurers = _adventurersSelected.Count >= 1;
|
||||
_activationButton.interactable = hasAdventurers;
|
||||
_activationButtonText.color = hasAdventurers ? Color.yellow : Color.grey;
|
||||
}
|
||||
|
||||
void ConfigureUIForQuestState(QuestStateEnum state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case QuestStateEnum.Disponible:
|
||||
// Before acceptance: can see info but shouldn't assign adventurers yet
|
||||
_buttonActivation.SetActive(false);
|
||||
_adventurersOnThisQuestPanel.SetActive(false);
|
||||
_adventurersSelection.SetActive(false);
|
||||
_panelRecap.SetActive(false);
|
||||
break;
|
||||
case QuestStateEnum.Accepted:
|
||||
// After acceptance: allow selecting adventurers and launching the quest
|
||||
_buttonActivation.SetActive(true);
|
||||
_adventurersOnThisQuestPanel.SetActive(false);
|
||||
_adventurersSelection.SetActive(true);
|
||||
_panelRecap.SetActive(false);
|
||||
break;
|
||||
case QuestStateEnum.InProgress:
|
||||
_buttonActivation.SetActive(false);
|
||||
_adventurersOnThisQuestPanel.SetActive(true);
|
||||
_adventurersSelection.SetActive(false);
|
||||
_panelRecap.SetActive(false);
|
||||
break;
|
||||
case QuestStateEnum.Completed:
|
||||
_buttonActivation.SetActive(false);
|
||||
_adventurersOnThisQuestPanel.SetActive(false);
|
||||
_adventurersSelection.SetActive(false);
|
||||
_panelRecap.SetActive(true);
|
||||
_panelRecap.GetComponent<QuestLogsListUI>().ShowFor(QuestManager.Instance.CurrentQuest.ID);
|
||||
break;
|
||||
default:
|
||||
_buttonActivation.SetActive(false);
|
||||
_adventurersOnThisQuestPanel.SetActive(true);
|
||||
_panelRecap.SetActive(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Main Methods
|
||||
public void ShowInfo(QuestClass quest)
|
||||
{
|
||||
quest = FindMatchingActiveQuest(quest);
|
||||
QuestManager.Instance.CurrentQuest = quest;
|
||||
|
||||
UpdateQuestInfoDisplay(quest);
|
||||
ConfigureUIForQuestState(quest.State);
|
||||
}
|
||||
|
||||
public void LaunchQuest()
|
||||
{
|
||||
if (_adventurersSelected.Count <= 0) return;
|
||||
|
||||
StartQuestWithSelectedAdventurers();
|
||||
CleanupAfterQuestLaunch();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Quest Operations
|
||||
private QuestClass FindMatchingActiveQuest(QuestClass quest)
|
||||
{
|
||||
if (!FactExists<List<QuestClass>>("active_quests", out _)) return quest;
|
||||
|
||||
var activeQuests = GetFact<List<QuestClass>>("active_quests");
|
||||
var matchingQuest = activeQuests.FirstOrDefault(q => q.ID == quest.ID);
|
||||
return matchingQuest ?? quest;
|
||||
}
|
||||
|
||||
void UpdateQuestInfoDisplay(QuestClass quest)
|
||||
{
|
||||
m_title.text = LocalizationSystem.Instance.GetLocalizedText(quest?.Name);
|
||||
string descKey = quest?.Description;
|
||||
if (string.IsNullOrEmpty(descKey))
|
||||
{
|
||||
Debug.LogWarning($"🧨 Clé de localisation vide ou nulle pour la quête ! ({quest.Description})");
|
||||
}
|
||||
m_description.text = LocalizationSystem.Instance.GetLocalizedText(descKey);
|
||||
m_objective.text = LocalizationSystem.Instance.GetLocalizedText(quest?.Objective);
|
||||
m_reward.text = FormatRewardsList(quest.Rewards);
|
||||
}
|
||||
|
||||
private void StartQuestWithSelectedAdventurers()
|
||||
{
|
||||
var gameTime = GetFact<GameTime>("game_time");
|
||||
QuestManager.Instance.StartQuest(QuestManager.Instance.CurrentQuest, _adventurersSelected, gameTime);
|
||||
|
||||
// Ajouter la quête à la liste des quêtes actives
|
||||
var activeQuests = GetFact<List<QuestClass>>("active_quests");
|
||||
activeQuests.Add(QuestManager.Instance.CurrentQuest);
|
||||
}
|
||||
|
||||
private void CleanupAfterQuestLaunch()
|
||||
{
|
||||
_adventurersSelected.Clear();
|
||||
AdventurerSignals.RaiseRefreshAdventurers();
|
||||
QuestSignals.RaiseRefreshQuests();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Utils
|
||||
private string FormatRewardsList(List<ItemReward> rewards)
|
||||
{
|
||||
return string.Join(", ", rewards.Select(r => {
|
||||
if (r.m_itemDefinition.DisplayNameKey == null) return "???";
|
||||
return LocalizationSystem.Instance.GetLocalizedText(r.m_itemDefinition.DisplayNameKey);
|
||||
}));
|
||||
}
|
||||
|
||||
private void HandleAddAdventurersFromQuest(AdventurerClass adventurer)
|
||||
{
|
||||
_adventurersSelected.Add(adventurer);
|
||||
Debug.Log($"Aventurier sélectionné: {adventurer.Name}. Total: {_adventurersSelected.Count}");
|
||||
}
|
||||
|
||||
private void HandleRemoveAdventurersFromQuest(AdventurerClass adventurer)
|
||||
{
|
||||
_adventurersSelected.Remove(adventurer);
|
||||
Debug.Log($"Aventurier retiré: {adventurer.Name}. Total: {_adventurersSelected.Count}");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c1f21a6ed56d470d9ce0bbe00914d159
|
||||
timeCreated: 1754316542
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using Quest.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class InteractionQuestCard : BaseMonoBehaviour
|
||||
{
|
||||
[SerializeField] QuestFactoryDatabase _questDatabase;
|
||||
|
||||
QuestClass _quest;
|
||||
|
||||
public void SetQuest(QuestClass quest)
|
||||
{
|
||||
_quest = quest;
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
if (_quest != null)
|
||||
{
|
||||
QuestManager.Instance.CurrentQuest = _quest;
|
||||
QuestSignals.RaiseInfoQuestPanel(_quest);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ad2c11555d8e49929481d17c51562af9
|
||||
timeCreated: 1754315536
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using Item.Runtime;
|
||||
using Quests.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class QuestCardUI : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
[Header("UI References")]
|
||||
public TMPro.TextMeshProUGUI m_title;
|
||||
public TMPro.TextMeshProUGUI m_description;
|
||||
public TMPro.TextMeshProUGUI m_objective;
|
||||
public TMPro.TextMeshProUGUI m_duration;
|
||||
public TMPro.TextMeshProUGUI m_difficulty;
|
||||
public TMPro.TextMeshProUGUI m_reward;
|
||||
public TMPro.TextMeshProUGUI m_minLevel;
|
||||
|
||||
public QuestClass Quest => _quest;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
foreach (var txt in GetComponentsInChildren<TMP_Text>())
|
||||
{
|
||||
txt.text = LocalizationSystem.Instance.GetLocalizedText(txt.text);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void Setup(QuestClass quest)
|
||||
{
|
||||
_quest = quest;
|
||||
m_title.text = quest.Name;
|
||||
m_description.text = quest.Description;
|
||||
m_objective.text = quest.Objective;
|
||||
//m_duration.text = quest.Duration.ToString();
|
||||
m_difficulty.text = quest.Difficulty.ToString();
|
||||
m_reward.text = RewardsListJoined(quest.Rewards);
|
||||
m_minLevel.text = quest.MinLevel.ToString();
|
||||
}
|
||||
|
||||
public void AcceptQuest()
|
||||
{
|
||||
// Ensure state order: Disponible -> Accepted
|
||||
_quest.State = QuestStateEnum.Accepted;
|
||||
|
||||
// Persist in saved quests list, ensure it exists
|
||||
var savedQuests = GetFact<List<QuestClass>>("accepted_quests");
|
||||
if (savedQuests == null)
|
||||
{
|
||||
savedQuests = new List<QuestClass>();
|
||||
SetFact("accepted_quests", savedQuests, FactPersistence.Persistent);
|
||||
}
|
||||
// Avoid duplicates by GUID
|
||||
if (!savedQuests.Any(q => q.ID == _quest.ID))
|
||||
{
|
||||
savedQuests.Add(_quest);
|
||||
}
|
||||
|
||||
SaveFacts();
|
||||
|
||||
// Refresh quest UIs and availability board
|
||||
QuestSignals.RaiseRefreshQuests();
|
||||
var player = GetFact<Player.Runtime.PlayerClass>(GameManager.Instance.Profile);
|
||||
QuestManager.Instance.NotifyAvailableQuestsUpdated(player.GuildLevel);
|
||||
|
||||
// Remove the accepted card from the board
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
string RewardsListJoined(List<ItemReward> rewards)
|
||||
{
|
||||
return string.Join(", ", rewards.Select(r => r.m_itemDefinition.DisplayNameKey != null
|
||||
? LocalizationSystem.Instance.GetLocalizedText(r.m_itemDefinition.DisplayNameKey)
|
||||
: "???"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
QuestClass _quest;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c18e7bb0735f48db9cf238d0b0e23036
|
||||
timeCreated: 1754253737
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
using System;
|
||||
using Core.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class QuestMini : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
public GameObject m_check;
|
||||
public GameObject m_hourglass;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
QuestManager.OnQuestCompleted += HandleQuestState;
|
||||
QuestManager.OnCheckStateQuest += HandleQuestState;
|
||||
// Re-synchroniser l'état quand l'UI s'active
|
||||
if (QuestManager.Instance != null)
|
||||
{
|
||||
QuestManager.Instance.CheckStateQuest();
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
QuestManager.OnQuestCompleted -= HandleQuestState;
|
||||
QuestManager.OnCheckStateQuest -= HandleQuestState;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
public void SetQuestName(string name)
|
||||
{
|
||||
_questName = name;
|
||||
}
|
||||
|
||||
public bool MatchesQuest(string questNameToCheck)
|
||||
{
|
||||
return _questName == questNameToCheck;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
void HandleQuestState(QuestClass quest)
|
||||
{
|
||||
if (!MatchesQuest(quest.Name)) return;
|
||||
Info($"Etat de la quete {quest.Name} : {quest.State}", Color.burlywood);
|
||||
switch (quest.State)
|
||||
{
|
||||
case QuestStateEnum.Disponible:
|
||||
m_check.SetActive(false);
|
||||
m_hourglass.SetActive(false);
|
||||
break;
|
||||
case QuestStateEnum.InProgress:
|
||||
m_check.SetActive(false);
|
||||
m_hourglass.SetActive(true);
|
||||
break;
|
||||
case QuestStateEnum.Completed:
|
||||
Info("Completed !!", Color.green);
|
||||
m_check.SetActive(true);
|
||||
m_hourglass.SetActive(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
// Variables privées
|
||||
string _questName;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7d7dbf81dcf3411484f2b34e5e36775d
|
||||
timeCreated: 1754426707
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
using System;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using Quests.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class QuestUIController : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
void Start()
|
||||
{
|
||||
QuestSignals.OnInfoQuestPanel += HandleInfoPanel;
|
||||
_uiManager = GetComponent<UIManager>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
void HandleInfoPanel(QuestClass quest)
|
||||
{
|
||||
_uiManager.ShowPanel(_infoQuestPanel);
|
||||
_infoQuestPanel.GetComponent<InfoQuestPanel>().ShowInfo(quest);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
UIManager _uiManager;
|
||||
[SerializeField] GameObject _infoQuestPanel;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fc179d0d729745ac911b52434d5e5fb0
|
||||
timeCreated: 1754316815
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Core.Runtime;
|
||||
using Player.Runtime;
|
||||
using Quest.Runtime;
|
||||
using Quests.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class QuestsBoardPanel : BaseMonoBehaviour
|
||||
{
|
||||
#region Unity API
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_player = GetFact<PlayerClass>(GameManager.Instance.Profile);
|
||||
QuestManager.OnAvailableQuestsUpdated += OnAvailableQuestsChanged;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
QuestManager.OnAvailableQuestsUpdated -= OnAvailableQuestsChanged;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
InitializeLocalization();
|
||||
List<QuestTemplate> availableTemplates = QuestManager.Instance.GetAvailableQuests(_player.GuildLevel);
|
||||
List<QuestClass> acceptedQuests = QuestManager.Instance.ActiveQuests;
|
||||
DisplayAvailableQuests(availableTemplates, acceptedQuests);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public
|
||||
|
||||
void OnAvailableQuestsChanged(List<QuestTemplate> availableTemplates)
|
||||
{
|
||||
List<QuestClass> acceptedQuests = QuestManager.Instance.ActiveQuests;
|
||||
ClearPanel();
|
||||
DisplayAvailableQuests(availableTemplates, acceptedQuests);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Utils
|
||||
|
||||
void InitializeLocalization()
|
||||
{
|
||||
foreach (var txt in GetComponentsInChildren<TMP_Text>())
|
||||
{
|
||||
txt.text = LocalizationSystem.Instance.GetLocalizedText(txt.text);
|
||||
}
|
||||
}
|
||||
|
||||
void ClearPanel()
|
||||
{
|
||||
foreach (Transform child in _panel.transform)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayAvailableQuests(List<QuestTemplate> availableTemplates, List<QuestClass> acceptedQuests)
|
||||
{
|
||||
// Build a set of started/accepted quest IDs to filter out from the board
|
||||
var startedIds = new HashSet<System.Guid>();
|
||||
// Active (in progress)
|
||||
foreach (var q in QuestManager.Instance.ActiveQuests ?? new List<QuestClass>())
|
||||
{
|
||||
if (q != null && q.ID != System.Guid.Empty) startedIds.Add(q.ID);
|
||||
}
|
||||
// Completed
|
||||
foreach (var q in QuestManager.Instance.CompletedQuests ?? new List<QuestClass>())
|
||||
{
|
||||
if (q != null && q.ID != System.Guid.Empty) startedIds.Add(q.ID);
|
||||
}
|
||||
// Accepted but not yet started (persisted list)
|
||||
try
|
||||
{
|
||||
if (FactExists<List<QuestClass>>("accepted_quests", out var accepted) && accepted != null)
|
||||
{
|
||||
foreach (var q in accepted)
|
||||
{
|
||||
if (q != null && q.ID != System.Guid.Empty) startedIds.Add(q.ID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try to read anyway (some implementations auto-initialize facts)
|
||||
var fallbackAccepted = GetFact<List<QuestClass>>("accepted_quests");
|
||||
if (fallbackAccepted != null)
|
||||
{
|
||||
foreach (var q in fallbackAccepted)
|
||||
{
|
||||
if (q != null && q.ID != System.Guid.Empty) startedIds.Add(q.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// If facts system isn't ready, just skip; board will refresh later
|
||||
}
|
||||
|
||||
foreach (var template in availableTemplates)
|
||||
{
|
||||
// Skip if this template already started/accepted (by GUID)
|
||||
if (System.Guid.TryParse(template.m_assetGuid, out var guid) && startedIds.Contains(guid))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
DisplayCard(template);
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayCard(QuestTemplate quest)
|
||||
{
|
||||
GameObject GO = Instantiate(_questCardPrefab, _panel.transform);
|
||||
QuestCardUI card = GO.GetComponent<QuestCardUI>();
|
||||
// Use the template's asset GUID as the quest ID so we can track acceptance/completion by template
|
||||
if (System.Guid.TryParse(quest.m_assetGuid, out var templateGuid))
|
||||
{
|
||||
card.Setup(quest.ToQuestClass(QuestStateEnum.Disponible, templateGuid));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: generate a new quest with a random ID
|
||||
card.Setup(quest.ToQuestClass(QuestStateEnum.Disponible));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
PlayerClass _player;
|
||||
[SerializeField] GameObject _panel;
|
||||
[SerializeField] GameObject _questCardPrefab;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c74283006b49480f9076d5907b022c9d
|
||||
timeCreated: 1754249219
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Core.Runtime;
|
||||
using EventSystem.Runtime;
|
||||
using Quests.Runtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace GameUI.Runtime
|
||||
{
|
||||
public class QuestsPanel : BaseMonoBehaviour
|
||||
{
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity API
|
||||
|
||||
private void Start()
|
||||
{
|
||||
QuestSignals.OnRefresh += QuestList;
|
||||
QuestManager.OnQuestCompleted += QuestCompleted;
|
||||
|
||||
foreach (var txt in GetComponentsInChildren<TMP_Text>())
|
||||
{
|
||||
txt.text = LocalizationSystem.Instance.GetLocalizedText(txt.text);
|
||||
}
|
||||
|
||||
QuestList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Utils
|
||||
|
||||
void QuestList()
|
||||
{
|
||||
foreach (Transform child in _panel.transform)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
|
||||
if (FactExists<List<QuestClass>>(("accepted_quests"), out _))
|
||||
{
|
||||
List<QuestClass> questsFromSave = GetFact<List<QuestClass>>(("accepted_quests"));
|
||||
|
||||
List<QuestClass> quests = QuestManager.Instance.ResolveQuestsList(questsFromSave);
|
||||
foreach (var quest in quests)
|
||||
{
|
||||
DisplayQuest(quest); //=> Key : L'id de la quête, Value : Le State
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayQuest(QuestClass quest)
|
||||
{
|
||||
GameObject questGO = Instantiate(_questMiniPrefab, _panel.transform);
|
||||
TMP_Text questNameLabel = questGO.GetComponentInChildren<TMP_Text>();
|
||||
questNameLabel.text = LocalizationSystem.Instance.GetLocalizedText(quest.Name);
|
||||
|
||||
var questMini = questGO.GetComponent<QuestMini>();
|
||||
if (questMini != null)
|
||||
{
|
||||
questMini.SetQuestName(quest.Name);
|
||||
bool isCompleted = QuestManager.Instance?.IsQuestCompleted(quest.Name) == true;
|
||||
questMini.m_check?.SetActive(isCompleted);
|
||||
questMini.m_hourglass?.SetActive(quest.State == QuestStateEnum.InProgress);
|
||||
}
|
||||
|
||||
questGO.GetComponent<InteractionQuestCard>().SetQuest(quest);
|
||||
}
|
||||
|
||||
void QuestCompleted(QuestClass quest)
|
||||
{
|
||||
CheckCompleted(quest);
|
||||
}
|
||||
|
||||
void CheckCompleted(QuestClass quest)
|
||||
{
|
||||
foreach (Transform child in _panel.transform)
|
||||
{
|
||||
var questMini = child.GetComponent<QuestMini>();
|
||||
if (questMini != null && questMini.MatchesQuest(quest.Name))
|
||||
{
|
||||
questMini.m_check?.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region privates and protected
|
||||
|
||||
[SerializeField] GameObject _panel;
|
||||
[SerializeField] GameObject _questMiniPrefab;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 811dd6c4c640425fba3403c129dc1def
|
||||
timeCreated: 1753972450
|
||||
|
|
@ -6896,6 +6896,22 @@ PrefabInstance:
|
|||
propertyPath: _photoStudio
|
||||
value:
|
||||
objectReference: {fileID: 1410581032}
|
||||
- target: {fileID: 800618211664167273, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 800618211664167273, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 800618211664167273, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -17
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 800618211664167273, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: -17
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1376644795009871993, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_Size
|
||||
value: 1
|
||||
|
|
@ -6940,6 +6956,26 @@ PrefabInstance:
|
|||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2308005275153697180, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_RenderMode
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2614678749999758721, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2614678749999758721, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2745692227999840423, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2745692227999840423, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: -17
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3097600141765312524, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -0.000058174133
|
||||
|
|
@ -6964,6 +7000,14 @@ PrefabInstance:
|
|||
propertyPath: m_Value
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4043912274817869175, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4043912274817869175, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: -17
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4122751825814951959, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
|
|
@ -6972,6 +7016,10 @@ PrefabInstance:
|
|||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4631386966355472390, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5017359089990763485, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
|
|
@ -7044,13 +7092,21 @@ PrefabInstance:
|
|||
propertyPath: m_Value
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6901625127544276562, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_fontAsset
|
||||
value:
|
||||
objectReference: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
- target: {fileID: 6901625127544276562, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_sharedMaterial
|
||||
value:
|
||||
objectReference: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
- target: {fileID: 7035451296418190708, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7035451296418190708, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -0.000061035156
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7705016881237931988, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
|
|
@ -7068,6 +7124,26 @@ PrefabInstance:
|
|||
propertyPath: m_Size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8291558037244538663, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.99999994
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8291558037244538663, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8291558037244538663, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8383779235938206096, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_ScreenMatchMode
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8383779235938206096, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_MatchWidthOrHeight
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8471769633384916933, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_Value
|
||||
value: 1
|
||||
|
|
@ -7168,14 +7244,22 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8855925603636279985, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
- target: {fileID: 8585461738485252514, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: -748
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8585461738485252514, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8855925603636279985, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -0.000061035156
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8855925603636279985, guid: 9096b4ca29c944a6189d4269e97f0089, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0.000030517578
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
|
|
|||
2013
Assets/_/Levels/Map.unity
Normal file
2013
Assets/_/Levels/Map.unity
Normal file
File diff suppressed because it is too large
Load diff
7
Assets/_/Levels/Map.unity.meta
Normal file
7
Assets/_/Levels/Map.unity.meta
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d5dfcd7e4bcb2405e881f73d149a5969
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -12,17 +12,17 @@ PlayerSettings:
|
|||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: ToineSensei Inc.
|
||||
companyName: AV Interactive Inc.
|
||||
productName: 'GuildTycoon: Heroes, Gold and Chaos'
|
||||
defaultCursor: {fileID: 0}
|
||||
defaultCursor: {fileID: 2800000, guid: 2e13a6792973f4bd1bde9bbd6350947c, type: 3}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
m_SplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_ShowUnitySplashScreen: 1
|
||||
m_ShowUnitySplashLogo: 1
|
||||
m_SplashScreenOverlayOpacity: 1
|
||||
m_SplashScreenAnimation: 1
|
||||
m_SplashScreenLogoStyle: 1
|
||||
m_SplashScreenDrawMode: 0
|
||||
m_SplashScreenDrawMode: 1
|
||||
m_SplashScreenBackgroundAnimationZoom: 1
|
||||
m_SplashScreenLogoAnimationZoom: 1
|
||||
m_SplashScreenBackgroundLandscapeAspect: 1
|
||||
|
|
@ -39,11 +39,15 @@ PlayerSettings:
|
|||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
m_SplashScreenLogos: []
|
||||
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||
m_SplashScreenLogos:
|
||||
- logo: {fileID: 10404, guid: 0000000000000000f000000000000000, type: 0}
|
||||
duration: 3
|
||||
- logo: {fileID: 21300000, guid: 2c6248ac814304e0999e01c4da5f37ac, type: 3}
|
||||
duration: 5
|
||||
m_VirtualRealitySplashScreen: {fileID: 2800000, guid: fb940c24e391f4841ba3b5a18f80decc, type: 3}
|
||||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1024
|
||||
defaultScreenHeight: 768
|
||||
defaultScreenWidth: 1920
|
||||
defaultScreenHeight: 1080
|
||||
defaultScreenWidthWeb: 960
|
||||
defaultScreenHeightWeb: 600
|
||||
m_StereoRenderingPath: 0
|
||||
|
|
@ -107,7 +111,7 @@ PlayerSettings:
|
|||
xboxEnableFitness: 0
|
||||
visibleInBackground: 1
|
||||
allowFullscreenSwitch: 1
|
||||
fullscreenMode: 1
|
||||
fullscreenMode: 2
|
||||
xboxSpeechDB: 0
|
||||
xboxEnableHeadOrientation: 0
|
||||
xboxEnableGuest: 0
|
||||
|
|
@ -294,7 +298,14 @@ PlayerSettings:
|
|||
AndroidAppBundleSizeToValidate: 150
|
||||
AndroidReportGooglePlayAppDependencies: 1
|
||||
androidSymbolsSizeThreshold: 800
|
||||
m_BuildTargetIcons: []
|
||||
m_BuildTargetIcons:
|
||||
- m_BuildTarget:
|
||||
m_Icons:
|
||||
- serializedVersion: 2
|
||||
m_Icon: {fileID: 2800000, guid: 7356543a802e040f18c822d55bcc8dec, type: 3}
|
||||
m_Width: 128
|
||||
m_Height: 128
|
||||
m_Kind: 0
|
||||
m_BuildTargetPlatformIcons:
|
||||
- m_BuildTarget: iPhone
|
||||
m_Icons:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue