Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 29140fcf8b | |||
| 8ed9a59fec | |||
| 2b5a227237 | |||
| aac376670c | |||
| 9143f3c50d |
110 changed files with 4338 additions and 2525 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.
|
|
@ -35,6 +35,8 @@
|
|||
<available_title>Disponible(s)</available_title>
|
||||
<in_qg>Au QG</in_qg>
|
||||
<in_quest>En mission</in_quest>
|
||||
<!-- Recap quête -->
|
||||
<quest.completed.title>Récap' Quête</quest.completed.title>
|
||||
|
||||
<!-- QUÊTES -->
|
||||
<quests.1.title>Invasion de Rats</quests.1.title>
|
||||
|
|
@ -62,7 +64,6 @@
|
|||
|
||||
<event.plain.fight.1>Un groupe de bandit demandent un droit de passage au abord d'un pont. Vous êtes contraint de pay... de les abattre. Après un combat acharné, vos aventuriers l'emporte !</event.plain.fight.1>
|
||||
|
||||
|
||||
<!-- OBJETS -->
|
||||
<item_gold>Or</item_gold>
|
||||
<item_gold_desc>Or.</item_gold_desc>
|
||||
|
|
|
|||
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:
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,7 @@ using UnityEngine.UI;
|
|||
|
||||
namespace AudioSystem.Runtime
|
||||
{
|
||||
public class AudioManager : BaseMonobehaviour
|
||||
public class AudioManager : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
namespace Core.Runtime
|
||||
{
|
||||
public class SceneLoader : BaseMonobehaviour
|
||||
public class SceneLoader : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
namespace Cheat.Runtime
|
||||
{
|
||||
public class Cheat : BaseMonobehaviour
|
||||
public class Cheat : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
|||
|
||||
namespace Core.Runtime
|
||||
{
|
||||
public class BaseMonobehaviour : MonoBehaviour
|
||||
public class BaseMonoBehaviour : MonoBehaviour
|
||||
{
|
||||
#region Publics
|
||||
|
||||
|
|
@ -101,9 +101,14 @@ namespace Core.Runtime
|
|||
|
||||
#region DEBUG
|
||||
|
||||
protected void Info(string message)
|
||||
protected void Info(string message, Color color)
|
||||
{
|
||||
Debug.Log(message);
|
||||
if (color == null)
|
||||
{
|
||||
color = Color.aliceBlue;
|
||||
}
|
||||
|
||||
Debug.Log($"<color=#{ColorUtility.ToHtmlStringRGB(color)}>{message}</color>");
|
||||
}
|
||||
|
||||
protected void Error(string message)
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ namespace Core.Runtime
|
|||
return false;
|
||||
}
|
||||
|
||||
public void SetFact<T>(string key, T value, BaseMonobehaviour.FactPersistence persistence)
|
||||
public void SetFact<T>(string key, T value, BaseMonoBehaviour.FactPersistence persistence)
|
||||
{
|
||||
if (_facts.TryGetValue(key, out var existingFact))
|
||||
{
|
||||
if (existingFact is Fact<T> typedFact)
|
||||
{
|
||||
typedFact.Value = value;
|
||||
typedFact.IsPersistent = persistence == BaseMonobehaviour.FactPersistence.Persistent;
|
||||
typedFact.IsPersistent = persistence == BaseMonoBehaviour.FactPersistence.Persistent;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -45,7 +45,7 @@ namespace Core.Runtime
|
|||
}
|
||||
else
|
||||
{
|
||||
bool isPersistent = persistence == BaseMonobehaviour.FactPersistence.Persistent;
|
||||
bool isPersistent = persistence == BaseMonoBehaviour.FactPersistence.Persistent;
|
||||
_facts[key] = new Fact<T>(value, isPersistent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
namespace Core.Runtime
|
||||
{
|
||||
public class GameManager: BaseMonobehaviour
|
||||
public class GameManager: BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using UnityEngine;
|
|||
|
||||
namespace Core.Runtime
|
||||
{
|
||||
public class LocalizationSystem : BaseMonobehaviour
|
||||
public class LocalizationSystem : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using Random = UnityEngine.Random;
|
|||
|
||||
namespace Core.Runtime
|
||||
{
|
||||
public class SceneLoader : BaseMonobehaviour
|
||||
public class SceneLoader : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
|||
|
||||
namespace Core.Runtime
|
||||
{
|
||||
public class UIManager : BaseMonobehaviour
|
||||
public class UIManager : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using UnityEngine;
|
|||
|
||||
namespace Decor.Runtime
|
||||
{
|
||||
public class AdventurerApearanceSpawner : BaseMonobehaviour
|
||||
public class AdventurerApearanceSpawner : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
|||
|
||||
namespace Decor.Runtime
|
||||
{
|
||||
public class AdventurerModelBinder : BaseMonobehaviour
|
||||
public class AdventurerModelBinder : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ using UnityEngine.AI;
|
|||
|
||||
namespace Decor.Runtime
|
||||
{
|
||||
public class PortraitGenerator : BaseMonobehaviour
|
||||
public class PortraitGenerator : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using UnityEngine.UI;
|
|||
|
||||
namespace _.Features.Decor.Runtime
|
||||
{
|
||||
public class TakePhoto : BaseMonobehaviour
|
||||
public class TakePhoto : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ using UnityEngine;
|
|||
|
||||
namespace Decor.Runtime
|
||||
{
|
||||
public class QuestSign: BaseMonobehaviour
|
||||
public class QuestSign: BaseMonoBehaviour
|
||||
{
|
||||
#region private & protected
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
|||
|
||||
namespace Goals.Runtime
|
||||
{
|
||||
public class GoalSystem : BaseMonobehaviour
|
||||
public class GoalSystem : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using UnityEngine;
|
|||
|
||||
namespace MenuSystem.Runtime.LoadGame
|
||||
{
|
||||
public class LoadGame : BaseMonobehaviour
|
||||
public class LoadGame : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
|||
|
||||
namespace MenuSystem.Runtime
|
||||
{
|
||||
public class MenuManager : BaseMonobehaviour
|
||||
public class MenuManager : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using UnityEngine;
|
|||
|
||||
namespace MenuSystem.Runtime
|
||||
{
|
||||
public class NewGame : BaseMonobehaviour
|
||||
public class NewGame : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using Cursor = UnityEngine.Cursor;
|
|||
|
||||
namespace MenuSystem.Runtime
|
||||
{
|
||||
public class PauseMenu : BaseMonobehaviour
|
||||
public class PauseMenu : BaseMonoBehaviour
|
||||
{
|
||||
#region Publics
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using UnityEngine;
|
|||
|
||||
namespace MenuSystem.Runtime.Settings
|
||||
{
|
||||
public class AudioMenuModule : BaseMonobehaviour, IMenuModule
|
||||
public class AudioMenuModule : BaseMonoBehaviour, IMenuModule
|
||||
{
|
||||
#region Publics
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using UnityEngine.UI;
|
|||
|
||||
namespace MenuSystem.Runtime
|
||||
{
|
||||
public class SettingsMenu : BaseMonobehaviour
|
||||
public class SettingsMenu : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using UnityEngine;
|
|||
|
||||
namespace MenuSystem.Runtime.TitleScreen
|
||||
{
|
||||
public class TitleScreen : BaseMonobehaviour
|
||||
public class TitleScreen : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using UnityEngine.Serialization;
|
|||
|
||||
namespace Player.Runtime
|
||||
{
|
||||
public class Deplacements : BaseMonobehaviour
|
||||
public class Deplacements : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
44
Assets/_/Features/Quests/Runtime/Events/QuestHistory.cs
Normal file
44
Assets/_/Features/Quests/Runtime/Events/QuestHistory.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using Core.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Quests.Runtime
|
||||
{
|
||||
public class QuestHistory : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Unity API
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Main Methods
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Utils
|
||||
|
||||
/* Fonctions privées utiles */
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Privates and Protected
|
||||
|
||||
[SerializeField] TextMesh _historyContent;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a360a2299eba4e078acfa47eac0464e3
|
||||
timeCreated: 1760204281
|
||||
|
|
@ -5,7 +5,7 @@ using UnityEngine;
|
|||
|
||||
namespace Quests.Runtime._.Features.Quests
|
||||
{
|
||||
public class QuestInitializer : BaseMonobehaviour
|
||||
public class QuestInitializer : BaseMonoBehaviour
|
||||
{
|
||||
void Awake()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using Random = UnityEngine.Random;
|
|||
|
||||
namespace Quests.Runtime
|
||||
{
|
||||
public class QuestManager : BaseMonobehaviour
|
||||
public class QuestManager : BaseMonoBehaviour
|
||||
{
|
||||
#region Singleton
|
||||
|
||||
|
|
@ -33,6 +33,8 @@ namespace Quests.Runtime
|
|||
public static event Action<QuestClass> OnEventFromQuest;
|
||||
public static event Action<List<QuestTemplate>> OnAvailableQuestsUpdated;
|
||||
|
||||
public static event Action<QuestClass> OnCheckStateQuest;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity API
|
||||
|
|
@ -77,6 +79,9 @@ namespace Quests.Runtime
|
|||
if (_activeQuests == null) _activeQuests = new List<QuestClass>();
|
||||
if (_completedQuests == null) _completedQuests = new List<QuestClass>();
|
||||
if (_disponibleQuests == null) _disponibleQuests = new List<QuestClass>();
|
||||
|
||||
// On Check L'état des quêtes avant toutes choses
|
||||
CheckStateQuest();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
@ -174,12 +179,24 @@ namespace Quests.Runtime
|
|||
/// </summary>
|
||||
public void NotifyCompletedQuests()
|
||||
{
|
||||
foreach (var quest in _completedQuests)
|
||||
foreach (QuestClass quest in _completedQuests)
|
||||
{
|
||||
OnQuestCompleted?.Invoke(quest);
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckStateQuest()
|
||||
{
|
||||
List<QuestClass> quests = GetFact<List<QuestClass>>("accepted_quests");
|
||||
|
||||
if (quests == null) return;
|
||||
|
||||
foreach (QuestClass quest in quests)
|
||||
{
|
||||
OnCheckStateQuest?.Invoke(quest);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Récupère l'historique des events lié à une quête
|
||||
/// </summary>
|
||||
|
|
@ -334,10 +351,9 @@ namespace Quests.Runtime
|
|||
AdventurerClass adventurer = QuestClass.GetOneAdventurerFromId(adventurerId);
|
||||
if (adventurer == null)
|
||||
{
|
||||
Info($"<color=orange>Aventurer {adventurerId} introuvable</color>");
|
||||
continue;
|
||||
}
|
||||
Info($"<color=orange>{adventurer.Name} est dans la team avec le status dispo : {adventurer.IsAvailable}</color>");
|
||||
|
||||
if (adventurer != null && adventurer.IsAvailable == false)
|
||||
{
|
||||
adventurer.IsAvailable = true;
|
||||
|
|
@ -346,7 +362,7 @@ namespace Quests.Runtime
|
|||
}
|
||||
if (anyChanged)
|
||||
{
|
||||
Info("<color=cyan>Comme les données on changées, on les sauvegarde.</color>");
|
||||
|
||||
SaveFacts();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ namespace GuildTycoon.Tests.Editor
|
|||
// Ensure profile and base facts are set
|
||||
_gameManager.Profile = "UnitTestProfile";
|
||||
_gameManager.Fact = new FactDictionnary();
|
||||
GameManager.m_gameFacts = _gameManager.Fact; // ensure BaseMonobehaviour access works
|
||||
GameManager.m_gameFacts = _gameManager.Fact; // ensure BaseMonoBehaviour access works
|
||||
|
||||
// Pre-seed facts used by QuestManager
|
||||
_gameManager.Fact.SetFact("accepted_quests", new List<QuestClass>(), BaseMonobehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("events_quests_history", new Dictionary<Guid, List<QuestEventLog>>(), BaseMonobehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("accepted_quests", new List<QuestClass>(), BaseMonoBehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("events_quests_history", new Dictionary<Guid, List<QuestEventLog>>(), BaseMonoBehaviour.FactPersistence.Normal);
|
||||
|
||||
// Create QuestManager
|
||||
_qmGO = new GameObject("QuestManager_Test");
|
||||
|
|
@ -64,7 +64,7 @@ namespace GuildTycoon.Tests.Editor
|
|||
|
||||
// Seed facts with the same quest so QuestManager can update saved state
|
||||
var accepted = new List<QuestClass> { new QuestClass(questId, quest.Name, quest.Description, quest.Objective, quest.Duration, quest.Difficulty, quest.Rewards, quest.MinLevel) { State = QuestStateEnum.InProgress } };
|
||||
_gameManager.Fact.SetFact("accepted_quests", accepted, BaseMonobehaviour.FactPersistence.Normal);
|
||||
_gameManager.Fact.SetFact("accepted_quests", accepted, BaseMonoBehaviour.FactPersistence.Normal);
|
||||
|
||||
QuestClass completedRaised = null;
|
||||
Action<QuestClass> handler = q => completedRaised = q;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using UnityEngine.SceneManagement;
|
|||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class AutoLoaderGame : BaseMonobehaviour
|
||||
public class AutoLoaderGame : BaseMonoBehaviour
|
||||
{
|
||||
|
||||
#region Publics
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using UnityEngine;
|
|||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class TestFacts : BaseMonobehaviour
|
||||
public class TestFacts : BaseMonoBehaviour
|
||||
{
|
||||
string _fact;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ namespace TestFacts.Runtime
|
|||
{
|
||||
foreach (var fact in GetAllFacts())
|
||||
{
|
||||
Info($"Fact[{fact.Key}] = {fact.Value}");
|
||||
Info($"Fact[{fact.Key}] = {fact.Value}", Color.aliceBlue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ using UnityEngine;
|
|||
|
||||
namespace TestFacts.Runtime
|
||||
{
|
||||
public class Triche : BaseMonobehaviour
|
||||
public class Triche : BaseMonoBehaviour
|
||||
{
|
||||
[ContextMenu("Add 99999 Gold")]
|
||||
void AddInfiniteGold()
|
||||
{
|
||||
PlayerClass profile = GetFact<PlayerClass>(GameManager.Instance.Profile);
|
||||
profile.Money = 99999;
|
||||
Info("➕99999 Gold added");
|
||||
Info("➕99999 Gold added", Color.green);
|
||||
SaveFacts();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,189 +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()
|
||||
{
|
||||
Info("On rentre dans la routine <OpenRoutine>");
|
||||
// Defer one frame to let Canvas/Scaler/Mask finish their activation cycle
|
||||
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>();
|
||||
}
|
||||
|
||||
Info($"Génération de {nbAdventurers} aventuriers");
|
||||
|
||||
for (int i = 0; i < nbAdventurers; i++)
|
||||
{
|
||||
AdventurerClass newRecruit = m_adventurersSO.CreateAdventurer();
|
||||
Info($"Aventurier n°{i}/{nbAdventurers}. Nom : {newRecruit.Name}");
|
||||
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,220 +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)
|
||||
{
|
||||
Info($"<color=orange>Etat de la quête : {state}</color>");
|
||||
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;
|
||||
|
||||
Info($"<color=green><InfoQuestPanel.cs:143></color><color=orange>{quest.Name}</color>");
|
||||
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,32 +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;
|
||||
Info($"⏱️MAJ de la current quest {QuestManager.Instance.CurrentQuest.Name}");
|
||||
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,82 +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 Start()
|
||||
{
|
||||
QuestManager.OnQuestCompleted += HandleQuestCompleted;
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
QuestManager.OnQuestCompleted -= HandleQuestCompleted;
|
||||
}
|
||||
|
||||
#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 HandleQuestCompleted(QuestClass quest)
|
||||
{
|
||||
if (!MatchesQuest(quest.Name)) return;
|
||||
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:
|
||||
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
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue