Compare commits
7 Commits
lifecycle_
...
animation-
| Author | SHA1 | Date | |
|---|---|---|---|
| 16962a5ae3 | |||
|
|
612ca7eae8 | ||
| 2602cbbeb3 | |||
| acf46c701e | |||
| fe2eb0a280 | |||
|
|
d647bb5707 | ||
|
|
dec7ced2d1 |
8
Assets/AddressableAssetsData/iOS.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d60f8ff6bf46b494b80e210228c43e61
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -185,7 +185,7 @@ AnimatorController:
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: trafalgar_0002
|
||||
m_Name: AnimSM_Trafalgar
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: Speed
|
||||
8
Assets/Art/Animations/Trafalgar.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdcb5eef530d4d341b9957fc5d954164
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking1.png
Normal file
|
After Width: | Height: | Size: 524 KiB |
570
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking1.png.meta
Normal file
@@ -0,0 +1,570 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e071f6ab7f5db5642bcf5502788a8b6e
|
||||
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: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
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: iOS
|
||||
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: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- 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
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
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:
|
||||
- serializedVersion: 2
|
||||
name: Traf_0012
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 1294
|
||||
width: 497
|
||||
height: 753
|
||||
alignment: 9
|
||||
pivot: {x: 0.43661973, y: -0.006799469}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 2104c4fa569ede04e9e6db84327b11cc
|
||||
internalID: -1603423718
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0013
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 1294
|
||||
width: 497
|
||||
height: 753
|
||||
alignment: 9
|
||||
pivot: {x: 0.43661973, y: -0.006799469}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: dfc34b8e58260474097ac74c0e16fcc7
|
||||
internalID: -1907988884
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0022
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 887
|
||||
y: 1295
|
||||
width: 489
|
||||
height: 752
|
||||
alignment: 9
|
||||
pivot: {x: 0.4212679, y: -0.0014893617}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 5c931e231e8e6474f8882cd577bf312e
|
||||
internalID: 959286612
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0023
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 887
|
||||
y: 1295
|
||||
width: 489
|
||||
height: 752
|
||||
alignment: 9
|
||||
pivot: {x: 0.4212679, y: -0.0014893617}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 3d3411da19b993140a2d54d72ebdbfe3
|
||||
internalID: -1984904044
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0031
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 523
|
||||
width: 388
|
||||
height: 769
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.01576073}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: d76407aa4dcdc8648b365da2d2eb5d10
|
||||
internalID: 1903400688
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0032
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 523
|
||||
width: 388
|
||||
height: 769
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.01576073}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 6584cd841ef691d47b5c391cf55bcb5a
|
||||
internalID: -346991893
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0033
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1168
|
||||
y: 530
|
||||
width: 388
|
||||
height: 749
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.046889186}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: c812b6a01ffaa1c4cbfdfd343883fedd
|
||||
internalID: -1312077390
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0034
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1168
|
||||
y: 530
|
||||
width: 388
|
||||
height: 749
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.046889186}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: dadb8259df47d584d948a41e2679ed4f
|
||||
internalID: -251651705
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0035
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1378
|
||||
y: 1281
|
||||
width: 388
|
||||
height: 766
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.027571801}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 0e6daaa9f75a679449677f606258ad79
|
||||
internalID: -1497385347
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0036
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1378
|
||||
y: 1281
|
||||
width: 388
|
||||
height: 766
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.027571801}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: c83aaa087c551d645af3e82a7bfd409c
|
||||
internalID: 2048706373
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0039
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 778
|
||||
y: 523
|
||||
width: 388
|
||||
height: 769
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.01576073}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 450ecc69dd2e0b14a8428b41d32a4618
|
||||
internalID: 1138447422
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0040
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 778
|
||||
y: 523
|
||||
width: 388
|
||||
height: 769
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.01576073}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 8a8ac3b3cf365d94882a586d83233997
|
||||
internalID: -1620690620
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0041
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1558
|
||||
y: 530
|
||||
width: 388
|
||||
height: 749
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.046889186}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: c7949d6564430af498a79afd6fc5f4be
|
||||
internalID: 110470137
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0042
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1558
|
||||
y: 530
|
||||
width: 388
|
||||
height: 749
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.046889186}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 742eaa0dbdc99824898ed699287521fe
|
||||
internalID: 393019130
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0045
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 1267
|
||||
width: 385
|
||||
height: 780
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.04502564}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 4e7250220be8bc2408ffd1ae6fe05476
|
||||
internalID: 1669039794
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0046
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 1267
|
||||
width: 385
|
||||
height: 780
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.04502564}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 8d3317b4ee45cff4f836db94bac449ca
|
||||
internalID: 1592877174
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0053
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 487
|
||||
width: 385
|
||||
height: 778
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.045141388}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 87e25079c251b2a4d9ac3aa05da45bc0
|
||||
internalID: -1032471120
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0054
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 487
|
||||
width: 385
|
||||
height: 778
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.045141388}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 229c666cb10a51d4aaf6a9ac700fded1
|
||||
internalID: 206645212
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: f90f4f1df4613dd4c9174310f08eec3e
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Traf_0012: -1603423718
|
||||
Traf_0013: -1907988884
|
||||
Traf_0022: 959286612
|
||||
Traf_0023: -1984904044
|
||||
Traf_0031: 1903400688
|
||||
Traf_0032: -346991893
|
||||
Traf_0033: -1312077390
|
||||
Traf_0034: -251651705
|
||||
Traf_0035: -1497385347
|
||||
Traf_0036: 2048706373
|
||||
Traf_0039: 1138447422
|
||||
Traf_0040: -1620690620
|
||||
Traf_0041: 110470137
|
||||
Traf_0042: 393019130
|
||||
Traf_0045: 1669039794
|
||||
Traf_0046: 1592877174
|
||||
Traf_0053: -1032471120
|
||||
Traf_0054: 206645212
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking1.tpsheet
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Sprite sheet data for Unity.
|
||||
#
|
||||
# To import these sprites into your Unity project, download "TexturePackerImporter":
|
||||
# https://www.codeandweb.com/texturepacker/unity
|
||||
#
|
||||
# $TexturePacker:SmartUpdate:12cdac846eeb0ac92e8b589818b5b9fd:1617b416bec25e82693e9f78935249ba:a11e88a1024a8564f888a3954b97f2ab$
|
||||
#
|
||||
:format=40300
|
||||
:texture=Trafalgar-_Walking1.png
|
||||
:size=2048x2048
|
||||
:pivotpoints=enabled
|
||||
:borders=disabled
|
||||
:alphahandling=ClearTransparentPixels
|
||||
|
||||
Traf_0012;388;1294;497;753; 0.43661971830985913;-0.006799468791500729; 0;0;0;0
|
||||
Traf_0013;388;1294;497;753; 0.43661971830985913;-0.006799468791500729; 0;0;0;0
|
||||
Traf_0022;887;1295;489;752; 0.4212678936605317;-0.0014893617021276562; 0;0;0;0
|
||||
Traf_0023;887;1295;489;752; 0.4212678936605317;-0.0014893617021276562; 0;0;0;0
|
||||
Traf_0031;388;523;388;769; 0.49742268041237114;-0.015760728218465525; 0;0;0;0
|
||||
Traf_0032;388;523;388;769; 0.49742268041237114;-0.015760728218465525; 0;0;0;0
|
||||
Traf_0033;1168;530;388;749; 0.49742268041237114;-0.04688918558077426; 0;0;0;0
|
||||
Traf_0034;1168;530;388;749; 0.49742268041237114;-0.04688918558077426; 0;0;0;0
|
||||
Traf_0035;1378;1281;388;766; 0.49742268041237114;-0.027571801566579568; 0;0;0;0
|
||||
Traf_0036;1378;1281;388;766; 0.49742268041237114;-0.027571801566579568; 0;0;0;0
|
||||
Traf_0039;778;523;388;769; 0.49742268041237114;-0.015760728218465525; 0;0;0;0
|
||||
Traf_0040;778;523;388;769; 0.49742268041237114;-0.015760728218465525; 0;0;0;0
|
||||
Traf_0041;1558;530;388;749; 0.49742268041237114;-0.04688918558077426; 0;0;0;0
|
||||
Traf_0042;1558;530;388;749; 0.49742268041237114;-0.04688918558077426; 0;0;0;0
|
||||
Traf_0045;1;1267;385;780; 0.4987012987012987;-0.045025641025641105; 0;0;0;0
|
||||
Traf_0046;1;1267;385;780; 0.4987012987012987;-0.045025641025641105; 0;0;0;0
|
||||
Traf_0053;1;487;385;778; 0.4987012987012987;-0.045141388174807284; 0;0;0;0
|
||||
Traf_0054;1;487;385;778; 0.4987012987012987;-0.045141388174807284; 0;0;0;0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f8877ac6aea8414b836f7aebe5971c5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking2.png
Normal file
|
After Width: | Height: | Size: 602 KiB |
455
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking2.png.meta
Normal file
@@ -0,0 +1,455 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 733a93f45fa2217478df69dfce47bfe4
|
||||
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: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
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: iOS
|
||||
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: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- 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
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
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:
|
||||
- serializedVersion: 2
|
||||
name: Traf_0001
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 435
|
||||
width: 388
|
||||
height: 789
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: 0.0011153359}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 99e3a7760a8f854449fd6d920b476d9a
|
||||
internalID: 2116105473
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0002
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 428
|
||||
y: 1276
|
||||
width: 484
|
||||
height: 771
|
||||
alignment: 9
|
||||
pivot: {x: 0.4318182, y: 0.008923476}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 42b45001238b5a344bb3c33c518f09c5
|
||||
internalID: 1747672391
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0004
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 1226
|
||||
width: 425
|
||||
height: 821
|
||||
alignment: 9
|
||||
pivot: {x: 0.45411766, y: 0.0010718636}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 38b273fc1f1eb2e4d86d7d188ae29d3b
|
||||
internalID: 676913695
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0010
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 914
|
||||
y: 1287
|
||||
width: 487
|
||||
height: 760
|
||||
alignment: 9
|
||||
pivot: {x: 0.42299795, y: -0.00015789474}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 4f6ffaf61113d374abe4e06fd73cbc36
|
||||
internalID: 1666239922
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0011
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 914
|
||||
y: 1287
|
||||
width: 487
|
||||
height: 760
|
||||
alignment: 9
|
||||
pivot: {x: 0.42299795, y: -0.00015789474}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 86ba464b7d2c8634fb72a9a07dbbef5b
|
||||
internalID: -1222548245
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0014
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1403
|
||||
y: 1299
|
||||
width: 489
|
||||
height: 748
|
||||
alignment: 9
|
||||
pivot: {x: 0.4212679, y: -0.0068449196}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 16f254ec4e949174e9994e2ab73659b0
|
||||
internalID: -996981228
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0015
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1403
|
||||
y: 1299
|
||||
width: 489
|
||||
height: 748
|
||||
alignment: 9
|
||||
pivot: {x: 0.4212679, y: -0.0068449196}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 1009f1f27d01b2f4388b7bbe4a3f831e
|
||||
internalID: -575895047
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0016
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1403
|
||||
y: 539
|
||||
width: 488
|
||||
height: 758
|
||||
alignment: 9
|
||||
pivot: {x: 0.42008197, y: 0.002480211}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 8169527510c5b444396b0858c71de75b
|
||||
internalID: -157325566
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0017
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1403
|
||||
y: 539
|
||||
width: 488
|
||||
height: 758
|
||||
alignment: 9
|
||||
pivot: {x: 0.42008197, y: 0.002480211}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 2f72d53a23eef9f438ea36b8cc42f35b
|
||||
internalID: 879950995
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0027
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 781
|
||||
y: 508
|
||||
width: 388
|
||||
height: 766
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.027571801}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 93a43eb0ec82d584397edb3d0382e9f1
|
||||
internalID: -687394884
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0028
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 781
|
||||
y: 508
|
||||
width: 388
|
||||
height: 766
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: -0.027571801}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 536dcf11c6fb0364ebc1fac7120e2a2e
|
||||
internalID: -200100742
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0029
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 391
|
||||
y: 436
|
||||
width: 388
|
||||
height: 788
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: 0.0023857867}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 177be93cf20be3e438bd15e6a40ccf16
|
||||
internalID: 97038495
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0030
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 391
|
||||
y: 436
|
||||
width: 388
|
||||
height: 788
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: 0.0023857867}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 713b76ad51f3f6840bb01e6eb75b75a8
|
||||
internalID: 1945709413
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 1d9a5d7bb6391e34dbaa067b99ff0718
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Traf_0001: 2116105473
|
||||
Traf_0002: 1747672391
|
||||
Traf_0004: 676913695
|
||||
Traf_0010: 1666239922
|
||||
Traf_0011: -1222548245
|
||||
Traf_0014: -996981228
|
||||
Traf_0015: -575895047
|
||||
Traf_0016: -157325566
|
||||
Traf_0017: 879950995
|
||||
Traf_0027: -687394884
|
||||
Traf_0028: -200100742
|
||||
Traf_0029: 97038495
|
||||
Traf_0030: 1945709413
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
28
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking2.tpsheet
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Sprite sheet data for Unity.
|
||||
#
|
||||
# To import these sprites into your Unity project, download "TexturePackerImporter":
|
||||
# https://www.codeandweb.com/texturepacker/unity
|
||||
#
|
||||
# $TexturePacker:SmartUpdate:12cdac846eeb0ac92e8b589818b5b9fd:1617b416bec25e82693e9f78935249ba:a11e88a1024a8564f888a3954b97f2ab$
|
||||
#
|
||||
:format=40300
|
||||
:texture=Trafalgar-_Walking2.png
|
||||
:size=2048x2048
|
||||
:pivotpoints=enabled
|
||||
:borders=disabled
|
||||
:alphahandling=ClearTransparentPixels
|
||||
|
||||
Traf_0001;1;435;388;789; 0.49742268041237114;0.0011153358681875725; 0;0;0;0
|
||||
Traf_0002;428;1276;484;771; 0.4318181818181818;0.008923476005188058; 0;0;0;0
|
||||
Traf_0004;1;1226;425;821; 0.4541176470588235;0.0010718635809987553; 0;0;0;0
|
||||
Traf_0010;914;1287;487;760; 0.42299794661190965;-0.00015789473684213462; 0;0;0;0
|
||||
Traf_0011;914;1287;487;760; 0.42299794661190965;-0.00015789473684213462; 0;0;0;0
|
||||
Traf_0014;1403;1299;489;748; 0.4212678936605317;-0.0068449197860962485; 0;0;0;0
|
||||
Traf_0015;1403;1299;489;748; 0.4212678936605317;-0.0068449197860962485; 0;0;0;0
|
||||
Traf_0016;1403;539;488;758; 0.42008196721311475;0.0024802110817941925; 0;0;0;0
|
||||
Traf_0017;1403;539;488;758; 0.42008196721311475;0.0024802110817941925; 0;0;0;0
|
||||
Traf_0027;781;508;388;766; 0.49742268041237114;-0.027571801566579568; 0;0;0;0
|
||||
Traf_0028;781;508;388;766; 0.49742268041237114;-0.027571801566579568; 0;0;0;0
|
||||
Traf_0029;391;436;388;788; 0.49742268041237114;0.0023857868020304984; 0;0;0;0
|
||||
Traf_0030;391;436;388;788; 0.49742268041237114;0.0023857868020304984; 0;0;0;0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cbfb3dc06a1e1e469c8648617968feb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking3.png
Normal file
|
After Width: | Height: | Size: 498 KiB |
570
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking3.png.meta
Normal file
@@ -0,0 +1,570 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 433bc1aad6c5ab748aac4443291f7252
|
||||
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: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
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: iOS
|
||||
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: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- 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
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
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:
|
||||
- serializedVersion: 2
|
||||
name: Traf_0018
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 874
|
||||
y: 1296
|
||||
width: 484
|
||||
height: 751
|
||||
alignment: 9
|
||||
pivot: {x: 0.4194215, y: -0.012143808}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: a858c3dfbb70e8446aa55ae6b35af296
|
||||
internalID: 733294300
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0019
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 874
|
||||
y: 1296
|
||||
width: 484
|
||||
height: 751
|
||||
alignment: 9
|
||||
pivot: {x: 0.4194215, y: -0.012143808}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 43a8dc58a6d230d4491863fb2958623d
|
||||
internalID: 705458408
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0020
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 1295
|
||||
width: 484
|
||||
height: 752
|
||||
alignment: 9
|
||||
pivot: {x: 0.4214876, y: -0.008138298}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: fde948e9fdc670045a63f5375c9a76e4
|
||||
internalID: -1431518560
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0021
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 1295
|
||||
width: 484
|
||||
height: 752
|
||||
alignment: 9
|
||||
pivot: {x: 0.4214876, y: -0.008138298}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 092b482429e28a643b19d6599355fcc0
|
||||
internalID: 1414616556
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0037
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1360
|
||||
y: 1259
|
||||
width: 388
|
||||
height: 788
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: 0.0023857867}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 58adfd457989f754cb25c1bc446597d8
|
||||
internalID: -1013923138
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0038
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1360
|
||||
y: 1259
|
||||
width: 388
|
||||
height: 788
|
||||
alignment: 9
|
||||
pivot: {x: 0.4974227, y: 0.0023857867}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 7803c4e1dadb44747b0aefc79fcc49e8
|
||||
internalID: -1414315956
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0047
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 495
|
||||
width: 385
|
||||
height: 798
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.01518797}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: f90b9fc757002b645bc596cb8264a9aa
|
||||
internalID: -1890952713
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0048
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 388
|
||||
y: 495
|
||||
width: 385
|
||||
height: 798
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.01518797}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 9659dae68f79ac041bb18891d2f76a29
|
||||
internalID: 475769653
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0049
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 1231
|
||||
width: 385
|
||||
height: 816
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: 0.0023039216}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 6d91a74e4045ee84b8e74ab315c17fbd
|
||||
internalID: -1497933548
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0050
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 1231
|
||||
width: 385
|
||||
height: 816
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: 0.0023039216}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 0e6beda4798000a4d83a5157043b0e34
|
||||
internalID: 436138382
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0051
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1162
|
||||
y: 462
|
||||
width: 385
|
||||
height: 795
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.026566038}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 3cf4c64953b169a4784b520927e9f63a
|
||||
internalID: -1550351557
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0052
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1162
|
||||
y: 462
|
||||
width: 385
|
||||
height: 795
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.026566038}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 50bd5e33bf88ec6478003c5d562236e3
|
||||
internalID: 69286420
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0055
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 775
|
||||
y: 495
|
||||
width: 385
|
||||
height: 798
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.01518797}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: bf7c57e5ba290b745a5da716a0923e18
|
||||
internalID: -1976038361
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0056
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 775
|
||||
y: 495
|
||||
width: 385
|
||||
height: 798
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.01518797}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 1762325b04ba42c4d86923c76cf3274c
|
||||
internalID: -1779701630
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0057
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 413
|
||||
width: 385
|
||||
height: 816
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: 0.0023039216}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: e0dff8cf484ad2b43a9de9a0fd05b3f5
|
||||
internalID: 747752778
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0058
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 413
|
||||
width: 385
|
||||
height: 816
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: 0.0023039216}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 47cd4dcfd00536e42910a354fecde20c
|
||||
internalID: 1507533172
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0059
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1549
|
||||
y: 462
|
||||
width: 385
|
||||
height: 795
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.026566038}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: e90e03a6ba1435f4e97d2f5f4205f366
|
||||
internalID: -1052919729
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0060
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1549
|
||||
y: 462
|
||||
width: 385
|
||||
height: 795
|
||||
alignment: 9
|
||||
pivot: {x: 0.4987013, y: -0.026566038}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: db25bd93e4d789a48a38745450b1dad1
|
||||
internalID: -413710878
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 140593767a7e00749b0fe65319e90927
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Traf_0018: 733294300
|
||||
Traf_0019: 705458408
|
||||
Traf_0020: -1431518560
|
||||
Traf_0021: 1414616556
|
||||
Traf_0037: -1013923138
|
||||
Traf_0038: -1414315956
|
||||
Traf_0047: -1890952713
|
||||
Traf_0048: 475769653
|
||||
Traf_0049: -1497933548
|
||||
Traf_0050: 436138382
|
||||
Traf_0051: -1550351557
|
||||
Traf_0052: 69286420
|
||||
Traf_0055: -1976038361
|
||||
Traf_0056: -1779701630
|
||||
Traf_0057: 747752778
|
||||
Traf_0058: 1507533172
|
||||
Traf_0059: -1052919729
|
||||
Traf_0060: -413710878
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking3.tpsheet
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Sprite sheet data for Unity.
|
||||
#
|
||||
# To import these sprites into your Unity project, download "TexturePackerImporter":
|
||||
# https://www.codeandweb.com/texturepacker/unity
|
||||
#
|
||||
# $TexturePacker:SmartUpdate:12cdac846eeb0ac92e8b589818b5b9fd:1617b416bec25e82693e9f78935249ba:a11e88a1024a8564f888a3954b97f2ab$
|
||||
#
|
||||
:format=40300
|
||||
:texture=Trafalgar-_Walking3.png
|
||||
:size=2048x2048
|
||||
:pivotpoints=enabled
|
||||
:borders=disabled
|
||||
:alphahandling=ClearTransparentPixels
|
||||
|
||||
Traf_0018;874;1296;484;751; 0.4194214876033058;-0.012143808255659083; 0;0;0;0
|
||||
Traf_0019;874;1296;484;751; 0.4194214876033058;-0.012143808255659083; 0;0;0;0
|
||||
Traf_0020;388;1295;484;752; 0.4214876033057851;-0.008138297872340328; 0;0;0;0
|
||||
Traf_0021;388;1295;484;752; 0.4214876033057851;-0.008138297872340328; 0;0;0;0
|
||||
Traf_0037;1360;1259;388;788; 0.49742268041237114;0.0023857868020304984; 0;0;0;0
|
||||
Traf_0038;1360;1259;388;788; 0.49742268041237114;0.0023857868020304984; 0;0;0;0
|
||||
Traf_0047;388;495;385;798; 0.4987012987012987;-0.015187969924812084; 0;0;0;0
|
||||
Traf_0048;388;495;385;798; 0.4987012987012987;-0.015187969924812084; 0;0;0;0
|
||||
Traf_0049;1;1231;385;816; 0.4987012987012987;0.002303921568627465; 0;0;0;0
|
||||
Traf_0050;1;1231;385;816; 0.4987012987012987;0.002303921568627465; 0;0;0;0
|
||||
Traf_0051;1162;462;385;795; 0.4987012987012987;-0.02656603773584898; 0;0;0;0
|
||||
Traf_0052;1162;462;385;795; 0.4987012987012987;-0.02656603773584898; 0;0;0;0
|
||||
Traf_0055;775;495;385;798; 0.4987012987012987;-0.015187969924812084; 0;0;0;0
|
||||
Traf_0056;775;495;385;798; 0.4987012987012987;-0.015187969924812084; 0;0;0;0
|
||||
Traf_0057;1;413;385;816; 0.4987012987012987;0.002303921568627465; 0;0;0;0
|
||||
Traf_0058;1;413;385;816; 0.4987012987012987;0.002303921568627465; 0;0;0;0
|
||||
Traf_0059;1549;462;385;795; 0.4987012987012987;-0.02656603773584898; 0;0;0;0
|
||||
Traf_0060;1549;462;385;795; 0.4987012987012987;-0.02656603773584898; 0;0;0;0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae948f43b1dcedb408002364a6c894df
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking4.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
202
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking4.png.meta
Normal file
@@ -0,0 +1,202 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f575f07e5277824294ade86131e83c2
|
||||
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: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
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: iOS
|
||||
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: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- 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
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
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:
|
||||
- serializedVersion: 2
|
||||
name: Traf_0024
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 273
|
||||
width: 488
|
||||
height: 750
|
||||
alignment: 9
|
||||
pivot: {x: 0.42008197, y: -0.00816}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: 19eae4ca1bf1e984eb588f7c980dc810
|
||||
internalID: -1703591597
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: Traf_0025
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1
|
||||
y: 273
|
||||
width: 488
|
||||
height: 750
|
||||
alignment: 9
|
||||
pivot: {x: 0.42008197, y: -0.00816}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: f3855632e843eb34e88fcf7251c7cd83
|
||||
internalID: -746435906
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 79d7676310adae84494d551c08b3c47c
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
Traf_0024: -1703591597
|
||||
Traf_0025: -746435906
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
17
Assets/Art/Animations/Trafalgar/Trafalgar-_Walking4.tpsheet
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Sprite sheet data for Unity.
|
||||
#
|
||||
# To import these sprites into your Unity project, download "TexturePackerImporter":
|
||||
# https://www.codeandweb.com/texturepacker/unity
|
||||
#
|
||||
# $TexturePacker:SmartUpdate:12cdac846eeb0ac92e8b589818b5b9fd:1617b416bec25e82693e9f78935249ba:a11e88a1024a8564f888a3954b97f2ab$
|
||||
#
|
||||
:format=40300
|
||||
:texture=Trafalgar-_Walking4.png
|
||||
:size=512x1024
|
||||
:pivotpoints=enabled
|
||||
:borders=disabled
|
||||
:alphahandling=ClearTransparentPixels
|
||||
|
||||
Traf_0024;1;273;488;750; 0.42008196721311475;-0.008159999999999945; 0;0;0;0
|
||||
Traf_0025;1;273;488;750; 0.42008196721311475;-0.008159999999999945; 0;0;0;0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f5d73421b606944bb2a2c34b4fc7117
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/UI/DR/ramasjang_icon.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
156
Assets/Art/UI/DR/ramasjang_icon.png.meta
Normal file
@@ -0,0 +1,156 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57224356af3d045dbbf8b420e13b4b10
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 2364528222304962155
|
||||
second: ramasjang_icon_0
|
||||
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: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
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
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
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:
|
||||
- serializedVersion: 2
|
||||
name: ramasjang_icon_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 4
|
||||
y: 5
|
||||
width: 334
|
||||
height: 334
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: b668fdfe3ed70d020800000000000000
|
||||
internalID: 2364528222304962155
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
ramasjang_icon_0: 2364528222304962155
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3
Assets/Editor/InteractionSystem.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb41c852d70c4066bf510792ee19b3f5
|
||||
timeCreated: 1762866335
|
||||
748
Assets/Editor/InteractionSystem/InteractableEditorWindow.cs
Normal file
@@ -0,0 +1,748 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Interactions;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
|
||||
namespace AppleHills.Editor.InteractionSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Editor utility for managing and debugging interactable objects in the scene.
|
||||
/// Provides scene object locator, inspector editing, and runtime debugging capabilities.
|
||||
/// </summary>
|
||||
public class InteractableEditorWindow : EditorWindow
|
||||
{
|
||||
// Tab management
|
||||
private int _selectedTab = 0;
|
||||
private readonly string[] _tabNames = { "Scene", "Debug" };
|
||||
|
||||
// Scene interactables tracking
|
||||
private List<InteractableBase> _sceneInteractables = new List<InteractableBase>();
|
||||
private InteractableBase _selectedInteractable;
|
||||
private GameObject _selectedGameObject;
|
||||
|
||||
// UI state
|
||||
private Vector2 _listScrollPosition;
|
||||
private Vector2 _inspectorScrollPosition;
|
||||
private Vector2 _debugScrollPosition;
|
||||
private string _searchQuery = "";
|
||||
|
||||
// Runtime state
|
||||
private bool _isPlaying = false;
|
||||
|
||||
// Editor for selected interactable
|
||||
private UnityEditor.Editor _cachedEditor;
|
||||
|
||||
// Available interactable types for adding
|
||||
private static readonly Type[] AvailableInteractableTypes = new Type[]
|
||||
{
|
||||
typeof(OneClickInteraction),
|
||||
typeof(Pickup),
|
||||
typeof(ItemSlot),
|
||||
typeof(SaveableInteractable),
|
||||
typeof(InteractableBase)
|
||||
};
|
||||
|
||||
[MenuItem("AppleHills/Interactable Editor")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<InteractableEditorWindow>("Interactable Editor");
|
||||
window.minSize = new Vector2(900, 600);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
RefreshSceneInteractables();
|
||||
|
||||
// Register for scene and selection changes
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneOpened += OnSceneOpened;
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneClosed += OnSceneClosed;
|
||||
Selection.selectionChanged += OnSelectionChanged;
|
||||
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
|
||||
EditorApplication.hierarchyChanged += OnHierarchyChanged;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneOpened -= OnSceneOpened;
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneClosed -= OnSceneClosed;
|
||||
Selection.selectionChanged -= OnSelectionChanged;
|
||||
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
|
||||
EditorApplication.hierarchyChanged -= OnHierarchyChanged;
|
||||
|
||||
// Clean up cached editor
|
||||
if (_cachedEditor != null)
|
||||
{
|
||||
DestroyImmediate(_cachedEditor);
|
||||
_cachedEditor = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSceneOpened(UnityEngine.SceneManagement.Scene scene, UnityEditor.SceneManagement.OpenSceneMode mode)
|
||||
{
|
||||
RefreshSceneInteractables();
|
||||
}
|
||||
|
||||
private void OnSceneClosed(UnityEngine.SceneManagement.Scene scene)
|
||||
{
|
||||
RefreshSceneInteractables();
|
||||
}
|
||||
|
||||
private void OnHierarchyChanged()
|
||||
{
|
||||
RefreshSceneInteractables();
|
||||
}
|
||||
|
||||
private void OnSelectionChanged()
|
||||
{
|
||||
// Check if selected object has changed
|
||||
if (Selection.activeGameObject != null && Selection.activeGameObject != _selectedGameObject)
|
||||
{
|
||||
var interactable = Selection.activeGameObject.GetComponent<InteractableBase>();
|
||||
if (interactable != null)
|
||||
{
|
||||
// GameObject has an interactable - select it
|
||||
SelectInteractable(interactable);
|
||||
}
|
||||
else
|
||||
{
|
||||
// GameObject doesn't have an interactable - track it for add menu
|
||||
_selectedGameObject = Selection.activeGameObject;
|
||||
_selectedInteractable = null;
|
||||
|
||||
// Clear cached editor
|
||||
if (_cachedEditor != null)
|
||||
{
|
||||
DestroyImmediate(_cachedEditor);
|
||||
_cachedEditor = null;
|
||||
}
|
||||
}
|
||||
Repaint();
|
||||
}
|
||||
else if (Selection.activeGameObject == null)
|
||||
{
|
||||
// Nothing selected - clear selection
|
||||
_selectedGameObject = null;
|
||||
_selectedInteractable = null;
|
||||
|
||||
if (_cachedEditor != null)
|
||||
{
|
||||
DestroyImmediate(_cachedEditor);
|
||||
_cachedEditor = null;
|
||||
}
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPlayModeStateChanged(PlayModeStateChange state)
|
||||
{
|
||||
_isPlaying = EditorApplication.isPlaying;
|
||||
if (_isPlaying)
|
||||
{
|
||||
RefreshSceneInteractables();
|
||||
}
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
DrawHeader();
|
||||
|
||||
_selectedTab = GUILayout.Toolbar(_selectedTab, _tabNames);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
switch (_selectedTab)
|
||||
{
|
||||
case 0: // Scene tab
|
||||
DrawSceneTab();
|
||||
break;
|
||||
case 1: // Debug tab
|
||||
DrawDebugTab();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#region Header UI
|
||||
|
||||
private void DrawHeader()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
|
||||
if (GUILayout.Button("Refresh", EditorStyles.toolbarButton, GUILayout.Width(60)))
|
||||
{
|
||||
RefreshSceneInteractables();
|
||||
}
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
// Tab-specific toolbar options
|
||||
if (_selectedTab == 0) // Scene tab
|
||||
{
|
||||
EditorGUILayout.LabelField($"Found: {_sceneInteractables.Count} interactables", EditorStyles.toolbarButton, GUILayout.Width(150));
|
||||
}
|
||||
else if (_selectedTab == 1) // Debug tab
|
||||
{
|
||||
EditorGUILayout.LabelField(_isPlaying ? "Runtime Active" : "Editor Mode", EditorStyles.toolbarButton, GUILayout.Width(100));
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Scene Tab
|
||||
|
||||
private void DrawSceneTab()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
// Left panel - interactable list
|
||||
EditorGUILayout.BeginVertical(GUILayout.Width(300));
|
||||
DrawInteractableListPanel();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
// Separator
|
||||
EditorGUILayout.Space(5);
|
||||
|
||||
// Right panel - inspector/editor
|
||||
EditorGUILayout.BeginVertical();
|
||||
DrawInspectorPanel();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void DrawInteractableListPanel()
|
||||
{
|
||||
// Search field
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
_searchQuery = EditorGUILayout.TextField(_searchQuery, EditorStyles.toolbarSearchField);
|
||||
if (GUILayout.Button("×", EditorStyles.toolbarButton, GUILayout.Width(20)) && !string.IsNullOrEmpty(_searchQuery))
|
||||
{
|
||||
_searchQuery = "";
|
||||
GUI.FocusControl(null);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
_listScrollPosition = EditorGUILayout.BeginScrollView(_listScrollPosition);
|
||||
|
||||
// Filter interactables by search query
|
||||
var filteredInteractables = string.IsNullOrEmpty(_searchQuery)
|
||||
? _sceneInteractables
|
||||
: _sceneInteractables.Where(i => i != null && i.gameObject.name.ToLower().Contains(_searchQuery.ToLower())).ToList();
|
||||
|
||||
if (filteredInteractables.Count == 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No interactables found in scene", MessageType.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var interactable in filteredInteractables)
|
||||
{
|
||||
if (interactable == null) continue;
|
||||
|
||||
if (DrawInteractableListItem(interactable))
|
||||
{
|
||||
SelectInteractable(interactable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private bool DrawInteractableListItem(InteractableBase interactable)
|
||||
{
|
||||
bool isSelected = interactable == _selectedInteractable;
|
||||
|
||||
Color originalColor = GUI.backgroundColor;
|
||||
if (isSelected)
|
||||
GUI.backgroundColor = new Color(0.3f, 0.5f, 0.8f);
|
||||
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
GUI.backgroundColor = originalColor;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
// Interactable info
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.LabelField(interactable.gameObject.name, EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField(interactable.GetType().Name, EditorStyles.miniLabel);
|
||||
|
||||
// Show additional info for specific types
|
||||
if (interactable is Pickup pickup && pickup.itemData != null)
|
||||
{
|
||||
EditorGUILayout.LabelField($"Item: {pickup.itemData.itemName}", EditorStyles.miniLabel);
|
||||
}
|
||||
else if (interactable is ItemSlot slot && slot.itemData != null)
|
||||
{
|
||||
EditorGUILayout.LabelField($"Slot: {slot.itemData.itemName}", EditorStyles.miniLabel);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
// Ping button
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(interactable.gameObject);
|
||||
Selection.activeGameObject = interactable.gameObject;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
Rect itemRect = GUILayoutUtility.GetLastRect();
|
||||
bool wasClicked = Event.current.type == EventType.MouseDown && Event.current.button == 0
|
||||
&& itemRect.Contains(Event.current.mousePosition);
|
||||
|
||||
if (wasClicked)
|
||||
{
|
||||
Event.current.Use();
|
||||
}
|
||||
|
||||
return wasClicked;
|
||||
}
|
||||
|
||||
private void DrawInspectorPanel()
|
||||
{
|
||||
_inspectorScrollPosition = EditorGUILayout.BeginScrollView(_inspectorScrollPosition);
|
||||
|
||||
if (_selectedInteractable == null && _selectedGameObject == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Select an interactable from the list or in the scene hierarchy", MessageType.Info);
|
||||
}
|
||||
else if (_selectedGameObject != null && _selectedInteractable == null)
|
||||
{
|
||||
// Selected object doesn't have an interactable - show add menu
|
||||
DrawAddInteractableMenu();
|
||||
}
|
||||
else if (_selectedInteractable != null)
|
||||
{
|
||||
// Draw custom inspector for the selected interactable
|
||||
DrawInteractableInspector();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawAddInteractableMenu()
|
||||
{
|
||||
EditorGUILayout.HelpBox($"GameObject '{_selectedGameObject.name}' doesn't have an Interactable component", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Add Interactable Component:", EditorStyles.boldLabel);
|
||||
|
||||
foreach (var interactableType in AvailableInteractableTypes)
|
||||
{
|
||||
if (GUILayout.Button($"Add {interactableType.Name}", GUILayout.Height(30)))
|
||||
{
|
||||
Undo.RecordObject(_selectedGameObject, $"Add {interactableType.Name}");
|
||||
var component = _selectedGameObject.AddComponent(interactableType) as InteractableBase;
|
||||
EditorUtility.SetDirty(_selectedGameObject);
|
||||
SelectInteractable(component);
|
||||
RefreshSceneInteractables();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawInteractableInspector()
|
||||
{
|
||||
// Header
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Editing:", EditorStyles.boldLabel, GUILayout.Width(60));
|
||||
EditorGUILayout.LabelField(_selectedInteractable.gameObject.name, EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(_selectedInteractable.gameObject);
|
||||
Selection.activeGameObject = _selectedInteractable.gameObject;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Draw default inspector using Editor
|
||||
if (_cachedEditor == null || _cachedEditor.target != _selectedInteractable)
|
||||
{
|
||||
if (_cachedEditor != null)
|
||||
{
|
||||
DestroyImmediate(_cachedEditor);
|
||||
}
|
||||
_cachedEditor = UnityEditor.Editor.CreateEditor(_selectedInteractable);
|
||||
}
|
||||
|
||||
if (_cachedEditor != null)
|
||||
{
|
||||
EditorGUI.BeginChangeCheck();
|
||||
_cachedEditor.OnInspectorGUI();
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
EditorUtility.SetDirty(_selectedInteractable);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Additional info section
|
||||
DrawAdditionalInfo();
|
||||
}
|
||||
|
||||
private void DrawAdditionalInfo()
|
||||
{
|
||||
EditorGUILayout.LabelField("Additional Information", EditorStyles.boldLabel);
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// Show component information
|
||||
EditorGUILayout.LabelField("Type:", _selectedInteractable.GetType().Name);
|
||||
|
||||
// Show attached actions
|
||||
var actions = _selectedInteractable.GetComponents<InteractionActionBase>();
|
||||
if (actions.Length > 0)
|
||||
{
|
||||
EditorGUILayout.LabelField($"Actions: {actions.Length}");
|
||||
EditorGUI.indentLevel++;
|
||||
foreach (var action in actions)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(action.GetType().Name, EditorStyles.miniLabel);
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(action);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Show specific type info
|
||||
if (_selectedInteractable is Pickup pickup)
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Pickup Info:", EditorStyles.boldLabel);
|
||||
if (pickup.itemData != null)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Item Data:", GUILayout.Width(100));
|
||||
EditorGUILayout.ObjectField(pickup.itemData, typeof(PickupItemData), false);
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(pickup.itemData);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
else if (_selectedInteractable is ItemSlot slot)
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Slot Info:", EditorStyles.boldLabel);
|
||||
if (slot.itemData != null)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Slot Data:", GUILayout.Width(100));
|
||||
EditorGUILayout.ObjectField(slot.itemData, typeof(PickupItemData), false);
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(slot.itemData);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if (_isPlaying)
|
||||
{
|
||||
var slottedObject = slot.GetSlottedObject();
|
||||
if (slottedObject != null)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Slotted Object:", GUILayout.Width(100));
|
||||
EditorGUILayout.ObjectField(slottedObject, typeof(GameObject), true);
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(slottedObject);
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Debug Tab
|
||||
|
||||
private void DrawDebugTab()
|
||||
{
|
||||
if (!_isPlaying)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Enter Play Mode to debug interactables at runtime", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
_debugScrollPosition = EditorGUILayout.BeginScrollView(_debugScrollPosition);
|
||||
|
||||
EditorGUILayout.LabelField("Scene Interactables", EditorStyles.boldLabel);
|
||||
EditorGUILayout.HelpBox("Test interactions and trigger individual events", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
foreach (var interactable in _sceneInteractables)
|
||||
{
|
||||
if (interactable == null) continue;
|
||||
|
||||
DrawDebugInteractableItem(interactable);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawDebugInteractableItem(InteractableBase interactable)
|
||||
{
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
// Header
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(interactable.gameObject.name, EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField($"({interactable.GetType().Name})", EditorStyles.miniLabel);
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
if (GUILayout.Button("Ping", GUILayout.Width(50)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(interactable.gameObject);
|
||||
Selection.activeGameObject = interactable.gameObject;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Interaction buttons
|
||||
EditorGUILayout.LabelField("Trigger Interaction:", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button("Full Interaction", GUILayout.Height(25)))
|
||||
{
|
||||
TriggerFullInteraction(interactable);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Event buttons
|
||||
EditorGUILayout.LabelField("Trigger Individual Events:", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button("Started"))
|
||||
{
|
||||
TriggerEvent(interactable, "OnInteractionStarted");
|
||||
TriggerUnityEvent(interactable, "interactionStarted");
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Arrived"))
|
||||
{
|
||||
TriggerEvent(interactable, "OnInteractingCharacterArrived");
|
||||
TriggerUnityEvent(interactable, "characterArrived");
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Do Interaction"))
|
||||
{
|
||||
TriggerEvent(interactable, "DoInteraction");
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button("Complete (Success)"))
|
||||
{
|
||||
TriggerEventWithParam(interactable, "OnInteractionFinished", true);
|
||||
TriggerUnityEventWithParam(interactable, "interactionComplete", true);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Complete (Fail)"))
|
||||
{
|
||||
TriggerEventWithParam(interactable, "OnInteractionFinished", false);
|
||||
TriggerUnityEventWithParam(interactable, "interactionComplete", false);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Interrupted"))
|
||||
{
|
||||
TriggerUnityEvent(interactable, "interactionInterrupted");
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Show registered actions
|
||||
var actions = interactable.GetComponents<InteractionActionBase>();
|
||||
if (actions.Length > 0)
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField($"Registered Actions ({actions.Length}):", EditorStyles.boldLabel);
|
||||
|
||||
foreach (var action in actions)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
EditorGUILayout.LabelField(action.GetType().Name);
|
||||
|
||||
if (action.respondToEvents != null && action.respondToEvents.Count > 0)
|
||||
{
|
||||
string events = string.Join(", ", action.respondToEvents);
|
||||
EditorGUILayout.LabelField($"Events: {events}", EditorStyles.miniLabel);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Data Management
|
||||
|
||||
private void RefreshSceneInteractables()
|
||||
{
|
||||
_sceneInteractables.Clear();
|
||||
|
||||
// Find all interactables in the scene
|
||||
var allInteractables = FindObjectsByType<InteractableBase>(FindObjectsSortMode.None);
|
||||
_sceneInteractables.AddRange(allInteractables);
|
||||
|
||||
// Sort by name for easier browsing
|
||||
_sceneInteractables.Sort((a, b) =>
|
||||
{
|
||||
if (a == null || b == null) return 0;
|
||||
return string.Compare(a.gameObject.name, b.gameObject.name, StringComparison.Ordinal);
|
||||
});
|
||||
}
|
||||
|
||||
private void SelectInteractable(InteractableBase interactable)
|
||||
{
|
||||
_selectedInteractable = interactable;
|
||||
_selectedGameObject = interactable?.gameObject;
|
||||
|
||||
// Clear cached editor to force recreation
|
||||
if (_cachedEditor != null)
|
||||
{
|
||||
DestroyImmediate(_cachedEditor);
|
||||
_cachedEditor = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Debug Helpers
|
||||
|
||||
private void TriggerFullInteraction(InteractableBase interactable)
|
||||
{
|
||||
if (!_isPlaying || interactable == null) return;
|
||||
|
||||
// Simulate a tap on the interactable
|
||||
Vector3 worldPos = interactable.transform.position;
|
||||
interactable.OnTap(new Vector2(worldPos.x, worldPos.y));
|
||||
|
||||
Debug.Log($"[Interactable Editor] Triggered full interaction on {interactable.gameObject.name}");
|
||||
}
|
||||
|
||||
private void TriggerEvent(InteractableBase interactable, string methodName)
|
||||
{
|
||||
if (!_isPlaying || interactable == null) return;
|
||||
|
||||
Type type = interactable.GetType();
|
||||
MethodInfo method = type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
|
||||
if (method != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
method.Invoke(interactable, null);
|
||||
Debug.Log($"[Interactable Editor] Invoked {methodName} on {interactable.gameObject.name}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[Interactable Editor] Error invoking {methodName}: {e.Message}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[Interactable Editor] Method {methodName} not found on {type.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
private void TriggerEventWithParam(InteractableBase interactable, string methodName, object param)
|
||||
{
|
||||
if (!_isPlaying || interactable == null) return;
|
||||
|
||||
Type type = interactable.GetType();
|
||||
MethodInfo method = type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
|
||||
if (method != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
method.Invoke(interactable, new object[] { param });
|
||||
Debug.Log($"[Interactable Editor] Invoked {methodName}({param}) on {interactable.gameObject.name}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"[Interactable Editor] Error invoking {methodName}: {e.Message}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[Interactable Editor] Method {methodName} not found on {type.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
private void TriggerUnityEvent(InteractableBase interactable, string fieldName)
|
||||
{
|
||||
if (!_isPlaying || interactable == null) return;
|
||||
|
||||
Type type = interactable.GetType();
|
||||
FieldInfo field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
|
||||
if (field != null && field.GetValue(interactable) is UnityEngine.Events.UnityEventBase unityEvent)
|
||||
{
|
||||
// Use reflection to invoke the protected Invoke method
|
||||
MethodInfo invokeMethod = unityEvent.GetType().GetMethod("Invoke", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
if (invokeMethod != null)
|
||||
{
|
||||
invokeMethod.Invoke(unityEvent, null);
|
||||
Debug.Log($"[Interactable Editor] Invoked UnityEvent {fieldName} on {interactable.gameObject.name}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TriggerUnityEventWithParam(InteractableBase interactable, string fieldName, bool param)
|
||||
{
|
||||
if (!_isPlaying || interactable == null) return;
|
||||
|
||||
Type type = interactable.GetType();
|
||||
FieldInfo field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
|
||||
|
||||
if (field != null && field.GetValue(interactable) is UnityEngine.Events.UnityEvent<bool> unityEvent)
|
||||
{
|
||||
unityEvent.Invoke(param);
|
||||
Debug.Log($"[Interactable Editor] Invoked UnityEvent<bool> {fieldName}({param}) on {interactable.gameObject.name}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3045d5bcf3e04203bfe060f80d8913ca
|
||||
timeCreated: 1762866335
|
||||
@@ -560,6 +560,15 @@ namespace AppleHills.Editor.PuzzleSystem
|
||||
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
EditorGUILayout.LabelField($"Current Level: {_runtimeLevelData.levelId}", EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
// Unlock All button
|
||||
if (GUILayout.Button("Unlock All", EditorStyles.toolbarButton, GUILayout.Width(100)))
|
||||
{
|
||||
UnlockAllPuzzles();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
_debugScrollPosition = EditorGUILayout.BeginScrollView(_debugScrollPosition);
|
||||
@@ -870,6 +879,121 @@ namespace AppleHills.Editor.PuzzleSystem
|
||||
UpdateRuntimeData();
|
||||
}
|
||||
|
||||
private void UnlockAllPuzzles()
|
||||
{
|
||||
if (!_isPlaying || _runtimeLevelData == null) return;
|
||||
|
||||
PuzzleManager puzzleManager = Object.FindFirstObjectByType<PuzzleManager>();
|
||||
if (puzzleManager == null)
|
||||
{
|
||||
Debug.LogError("[Puzzle Editor] Cannot find PuzzleManager in scene");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("[Puzzle Editor] Starting to unlock all puzzles...");
|
||||
|
||||
// Get all steps from the level data
|
||||
List<PuzzleStepSO> allSteps = new List<PuzzleStepSO>(_runtimeLevelData.allSteps);
|
||||
|
||||
// Track which steps we've processed
|
||||
HashSet<string> processedSteps = new HashSet<string>();
|
||||
bool madeProgress = true;
|
||||
int maxIterations = 100; // Safety limit to prevent infinite loops
|
||||
int iteration = 0;
|
||||
|
||||
// Keep iterating until no more steps can be unlocked/completed
|
||||
while (madeProgress && iteration < maxIterations)
|
||||
{
|
||||
madeProgress = false;
|
||||
iteration++;
|
||||
|
||||
foreach (var step in allSteps)
|
||||
{
|
||||
if (step == null || processedSteps.Contains(step.stepId))
|
||||
continue;
|
||||
|
||||
// Check if already completed
|
||||
if (puzzleManager.IsPuzzleStepCompleted(step.stepId))
|
||||
{
|
||||
processedSteps.Add(step.stepId);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if step is unlocked or can be unlocked
|
||||
bool isUnlocked = puzzleManager.IsStepUnlocked(step);
|
||||
|
||||
if (!isUnlocked)
|
||||
{
|
||||
// Try to unlock it if dependencies are met
|
||||
// We need to check if all dependencies are completed
|
||||
bool canUnlock = CanUnlockStep(step, puzzleManager);
|
||||
|
||||
if (canUnlock)
|
||||
{
|
||||
// Unlock the step using reflection
|
||||
System.Type managerType = puzzleManager.GetType();
|
||||
System.Reflection.MethodInfo unlockMethod = managerType.GetMethod("UnlockStep",
|
||||
System.Reflection.BindingFlags.Instance |
|
||||
System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.NonPublic);
|
||||
|
||||
if (unlockMethod != null)
|
||||
{
|
||||
unlockMethod.Invoke(puzzleManager, new object[] { step });
|
||||
Debug.Log($"[Puzzle Editor] Unlocked step: {step.stepId}");
|
||||
isUnlocked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If unlocked, complete it
|
||||
if (isUnlocked && !puzzleManager.IsPuzzleStepCompleted(step.stepId))
|
||||
{
|
||||
puzzleManager.MarkPuzzleStepCompleted(step);
|
||||
Debug.Log($"[Puzzle Editor] Completed step: {step.stepId}");
|
||||
processedSteps.Add(step.stepId);
|
||||
madeProgress = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iteration >= maxIterations)
|
||||
{
|
||||
Debug.LogWarning($"[Puzzle Editor] Reached maximum iterations ({maxIterations}). Some steps may not have been completed.");
|
||||
}
|
||||
|
||||
Debug.Log($"[Puzzle Editor] Unlock all complete. Processed {processedSteps.Count} steps in {iteration} iterations.");
|
||||
|
||||
// Update runtime data to reflect all changes
|
||||
UpdateRuntimeData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a step can be unlocked by verifying all its dependencies are completed
|
||||
/// </summary>
|
||||
private bool CanUnlockStep(PuzzleStepSO step, PuzzleManager puzzleManager)
|
||||
{
|
||||
if (step == null || _runtimeLevelData == null) return false;
|
||||
|
||||
// Initial steps can always be unlocked
|
||||
if (_runtimeLevelData.IsInitialStep(step))
|
||||
return true;
|
||||
|
||||
// Check if all dependencies are completed
|
||||
if (_runtimeLevelData.stepDependencies.TryGetValue(step.stepId, out string[] dependencies))
|
||||
{
|
||||
foreach (var depId in dependencies)
|
||||
{
|
||||
if (!puzzleManager.IsPuzzleStepCompleted(depId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
version: 2
|
||||
tpsheetFileNames:
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking1.tpsheet
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking2.tpsheet
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking3.tpsheet
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking4.tpsheet
|
||||
- Assets/Art/Sprites/Spritesheets/Characters/Annelise_Camera/Annelise_camera-AnneLise_1.tpsheet
|
||||
- Assets/Art/Sprites/Spritesheets/Characters/Annelise_Camera/Annelise_camera-AnneLise_2.tpsheet
|
||||
- Assets/Art/Sprites/Spritesheets/Characters/Gardener/Gardener-IdleRun.tpsheet
|
||||
@@ -30,6 +34,10 @@ tpsheetFileNames:
|
||||
- Assets/Art/Sprites/Spritesheets/Quarry/Trees&Bushes/Trees.tpsheet
|
||||
- Assets/External/Plugins/codeandweb.com/Example/SpriteSheet/sprites.tpsheet
|
||||
textureFileNames:
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking1.png
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking2.png
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking3.png
|
||||
- Assets/Art/Animations/Trafalgar/Trafalgar-_Walking4.png
|
||||
- Assets/Art/Sprites/Spritesheets/Characters/Annelise_Camera/Annelise_camera-AnneLise_1.png
|
||||
- Assets/Art/Sprites/Spritesheets/Characters/Annelise_Camera/Annelise_camera-AnneLise_2.png
|
||||
- Assets/Art/Sprites/Spritesheets/Characters/Gardener/Gardener-IdleRun.png
|
||||
@@ -88,5 +96,9 @@ normalmapFileNames:
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
- Assets/External/Plugins/codeandweb.com/Example/SpriteSheet/sprites_n.png
|
||||
enableDebugOutput: 0
|
||||
|
||||
@@ -313,14 +313,22 @@ PrefabInstance:
|
||||
propertyPath: m_Layer
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3714001194702331617, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6109476811019011833, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_Size.x
|
||||
value: 3.8700001
|
||||
value: 4.97
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6109476811019011833, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_Size.y
|
||||
value: 7.55122
|
||||
value: 7.53
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6109476811019011833, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: -1603423718, guid: e071f6ab7f5db5642bcf5502788a8b6e, type: 3}
|
||||
- target: {fileID: 6109476811019011833, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_SortingOrder
|
||||
value: 1
|
||||
@@ -329,6 +337,10 @@ PrefabInstance:
|
||||
propertyPath: m_SpriteSortPoint
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6109476811019011833, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_WasSpriteAssigned
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7877460049793670011, guid: 361ccc9ef82acef4784b24b72013d971, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
|
||||
@@ -725,10 +725,9 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 3864057818161790164}
|
||||
- component: {fileID: 5271824036850954050}
|
||||
- component: {fileID: 8081783206361873868}
|
||||
- component: {fileID: 5548642987123338363}
|
||||
- component: {fileID: 3058107077406709872}
|
||||
- component: {fileID: 587711432829270645}
|
||||
- component: {fileID: 4189849640380816173}
|
||||
m_Layer: 5
|
||||
m_Name: Icon
|
||||
m_TagString: Untagged
|
||||
@@ -763,53 +762,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4599222264323240281}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8081783206361873868
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4599222264323240281}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: -1
|
||||
--- !u!114 &5548642987123338363
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4599222264323240281}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2fd09147b9e9d42a48d6ddc915ddc3d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: SkiaSharp.Unity::SkiaSharp.Unity.SkottiePlayerV2
|
||||
lottieFile: {fileID: 4900000, guid: 50e22b5bb8a496840952f2563758c13c, type: 3}
|
||||
customResolution: 0
|
||||
resWidth: 250
|
||||
resHeight: 250
|
||||
stateName: Idle
|
||||
resetAfterFinished: 0
|
||||
autoPlay: 1
|
||||
loop: 1
|
||||
--- !u!114 &3058107077406709872
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -850,7 +802,7 @@ MonoBehaviour:
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 8081783206361873868}
|
||||
m_TargetGraphic: {fileID: 0}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
@@ -880,6 +832,36 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: AppleHillsScripts::UI.HudMenuButton
|
||||
pagePrefab: {fileID: 1498581815400593087, guid: ccd858c7962d48147b0233c1bf1382f5, type: 3}
|
||||
buttonName: RamaSjang Button
|
||||
--- !u!114 &4189849640380816173
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4599222264323240281}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 2364528222304962155, guid: 57224356af3d045dbbf8b420e13b4b10, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &5113586844274188410
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -260,6 +260,7 @@ MonoBehaviour:
|
||||
getFlirtyMin: 4
|
||||
getFlirtyMax: 5
|
||||
fakeChocolate: {fileID: 2391935521422290070}
|
||||
realChocolate: {fileID: 0}
|
||||
distractedAudioClips: {fileID: 6418180475301049370, guid: 956d8d84e8dd1de4e94ba48c041dc6ec, type: 2}
|
||||
angryAudioClips: {fileID: 6418180475301049370, guid: 22e6e844862e5b94989b572cb70c1eff, type: 2}
|
||||
feederClips: {fileID: 6418180475301049370, guid: 2e607d3f32c25a14ea074850dd2f8ac5, type: 2}
|
||||
|
||||
@@ -148,8 +148,6 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6108475066390421500}
|
||||
- {fileID: 6717870941799174515}
|
||||
- {fileID: 4136733570236406132}
|
||||
m_Father: {fileID: 1315170081792486277}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -402,8 +400,8 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: '::'
|
||||
PageName:
|
||||
transitionDuration: 0.3
|
||||
rainbowIn: {fileID: 5382650426034128680}
|
||||
rainbowOut: {fileID: 3983328028282460839}
|
||||
rainbowIn: {fileID: 0}
|
||||
rainbowOut: {fileID: 0}
|
||||
gameLayoutContainer: {fileID: 904161782565348054}
|
||||
exitButton: {fileID: 8427602740714176801}
|
||||
rectMask: {fileID: 7425566603516801919}
|
||||
@@ -528,99 +526,6 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &3983328028282460839
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6717870941799174515}
|
||||
- component: {fileID: 6334910097310371923}
|
||||
- component: {fileID: 8821021733826365168}
|
||||
- component: {fileID: 9163925342151684341}
|
||||
m_Layer: 5
|
||||
m_Name: RainbowOut
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6717870941799174515
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3983328028282460839}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8293076336493130222}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6334910097310371923
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3983328028282460839}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8821021733826365168
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3983328028282460839}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: -1
|
||||
--- !u!114 &9163925342151684341
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3983328028282460839}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2fd09147b9e9d42a48d6ddc915ddc3d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: SkiaSharp.Unity::SkiaSharp.Unity.SkottiePlayerV2
|
||||
lottieFile: {fileID: 4900000, guid: 589505308c5daf449800f30dd4b92ce7, type: 3}
|
||||
customResolution: 0
|
||||
resWidth: 250
|
||||
resHeight: 250
|
||||
stateName:
|
||||
resetAfterFinished: 0
|
||||
autoPlay: 0
|
||||
loop: 0
|
||||
--- !u!1 &4270065472017787841
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -936,99 +841,6 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &5382650426034128680
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6108475066390421500}
|
||||
- component: {fileID: 2398693306920598044}
|
||||
- component: {fileID: 7920249735731934357}
|
||||
- component: {fileID: 3566391948883171773}
|
||||
m_Layer: 5
|
||||
m_Name: RainbowIn
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6108475066390421500
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5382650426034128680}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8293076336493130222}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2398693306920598044
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5382650426034128680}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7920249735731934357
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5382650426034128680}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Texture: {fileID: 0}
|
||||
m_UVRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: -1
|
||||
--- !u!114 &3566391948883171773
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5382650426034128680}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2fd09147b9e9d42a48d6ddc915ddc3d2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: SkiaSharp.Unity::SkiaSharp.Unity.SkottiePlayerV2
|
||||
lottieFile: {fileID: 4900000, guid: 622be2ef9d5e27d45a9deaf7ed805f5f, type: 3}
|
||||
customResolution: 0
|
||||
resWidth: 250
|
||||
resHeight: 250
|
||||
stateName:
|
||||
resetAfterFinished: 0
|
||||
autoPlay: 0
|
||||
loop: 0
|
||||
--- !u!1 &5867455130109727138
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
"OptimizedRope",
|
||||
"AudioSourceEvents",
|
||||
"NewAssembly",
|
||||
"SkiaSharp.Unity",
|
||||
"SkiaSharp.Editor",
|
||||
"SkiaSharp",
|
||||
"Unity.Cinemachine"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
|
||||
@@ -13,7 +13,6 @@ using UI.Core;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Playables;
|
||||
using Svg;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using SkiaSharp.Unity;
|
||||
using Input;
|
||||
using AppleHills.Core;
|
||||
using UI.Core;
|
||||
@@ -11,8 +10,6 @@ using UI;
|
||||
|
||||
public class AppSwitcher : UIPage
|
||||
{
|
||||
public GameObject rainbowIn;
|
||||
public GameObject rainbowOut;
|
||||
public GameObject gameLayoutContainer;
|
||||
public GameObject exitButton;
|
||||
public RectMask2D rectMask;
|
||||
@@ -20,8 +17,6 @@ public class AppSwitcher : UIPage
|
||||
[Header("Slide Animation Settings")]
|
||||
public float slideDuration = 0.5f;
|
||||
|
||||
private SkottiePlayerV2 rainbowInPlayer;
|
||||
private SkottiePlayerV2 rainbowOutPlayer;
|
||||
private TweenBase slideInTween;
|
||||
private TweenBase slideOutTween;
|
||||
|
||||
@@ -30,16 +25,13 @@ public class AppSwitcher : UIPage
|
||||
base.OnManagedAwake();
|
||||
|
||||
PageName = "AppSwitcher";
|
||||
rainbowInPlayer = rainbowIn.GetComponent<SkottiePlayerV2>();
|
||||
rainbowOutPlayer = rainbowOut.GetComponent<SkottiePlayerV2>();
|
||||
|
||||
if (rectMask == null)
|
||||
{
|
||||
rectMask = GetComponent<RectMask2D>();
|
||||
}
|
||||
|
||||
// Initially hide both
|
||||
rainbowIn.SetActive(true);
|
||||
// Initially hide
|
||||
exitButton.SetActive(false);
|
||||
}
|
||||
|
||||
@@ -49,27 +41,19 @@ public class AppSwitcher : UIPage
|
||||
|
||||
gameLayoutContainer.SetActive(true);
|
||||
|
||||
// Hide rainbow out, show rainbow in
|
||||
rainbowOut.SetActive(false);
|
||||
|
||||
// Play animation on rainbow in without resetting state
|
||||
rainbowInPlayer.PlayAnimation(true);
|
||||
|
||||
// Slide in animation - tween padding.left from 1700 to 0
|
||||
slideInTween = TweenPaddingLeft(1700f, 0f, Tween.EaseOut, () =>
|
||||
{
|
||||
onComplete?.Invoke();
|
||||
rainbowOut.SetActive(true);
|
||||
exitButton.SetActive(true);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void DoTransitionOut(Action onComplete)
|
||||
{
|
||||
rainbowIn.SetActive(false);
|
||||
|
||||
// Play animation on rainbow out with resetting state
|
||||
rainbowOutPlayer.PlayAnimation(true);
|
||||
|
||||
// Hide the exit button
|
||||
exitButton.SetActive(false);
|
||||
@@ -77,7 +61,6 @@ public class AppSwitcher : UIPage
|
||||
// Slide out animation - tween padding.left from 0 to 1700
|
||||
slideOutTween = TweenPaddingLeft(0f, 1700f, Tween.EaseIn, () => {
|
||||
gameLayoutContainer.SetActive(false);
|
||||
rainbowIn.SetActive(true);
|
||||
onComplete?.Invoke();
|
||||
InputManager.Instance.SetInputMode(InputMode.GameAndUI);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.ammariqais.skiaforunity": "https://github.com/ammariqais/SkiaForUnity.git?path=SkiaUnity/Assets/SkiaSharp",
|
||||
"com.coplaydev.unity-mcp": "https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity",
|
||||
"com.moolt.packages.net": "git+https://github.com/Moolt/UnityAudioSourceEvents?path=Packages/AudioSourceEvents",
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.ammariqais.skiaforunity": {
|
||||
"version": "https://github.com/ammariqais/SkiaForUnity.git?path=SkiaUnity/Assets/SkiaSharp",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"com.unity.nuget.newtonsoft-json": "3.2.0"
|
||||
},
|
||||
"hash": "11e82b71012bf8b4f68172080d6e4969d42120ef"
|
||||
},
|
||||
"com.coplaydev.unity-mcp": {
|
||||
"version": "https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity",
|
||||
"depth": 0,
|
||||
|
||||
@@ -12,8 +12,8 @@ PlayerSettings:
|
||||
targetDevice: 2
|
||||
useOnDemandResources: 0
|
||||
accelerometerFrequency: 60
|
||||
companyName: DefaultCompany
|
||||
productName: AppleHills
|
||||
companyName: DR
|
||||
productName: "DR \xC6blerup"
|
||||
defaultCursor: {fileID: 0}
|
||||
cursorHotspot: {x: 0, y: 0}
|
||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||
@@ -142,7 +142,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: 1.0.2
|
||||
bundleVersion: 1.1
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
@@ -168,7 +168,7 @@ PlayerSettings:
|
||||
Android: com.DefaultCompany.com.unity.template.mobile2D
|
||||
Lumin: com.DefaultCompany.com.unity.template.mobile2D
|
||||
Standalone: com.DefaultCompany.com.unity.template.mobile2D
|
||||
iPhone: com.DefaultCompany.com.unity.template.mobile2D
|
||||
iPhone: dk.dr.ramasjang.aeblerup
|
||||
tvOS: com.DefaultCompany.com.unity.template.mobile2D
|
||||
buildNumber:
|
||||
Standalone: 0
|
||||
@@ -403,25 +403,31 @@ PlayerSettings:
|
||||
m_SubKind:
|
||||
- m_BuildTarget: iPhone
|
||||
m_Icons:
|
||||
- m_Textures:
|
||||
- {fileID: 2800000, guid: a8ae11f948f0cfa4791e954c315376ee, type: 3}
|
||||
m_Width: 1024
|
||||
m_Height: 1024
|
||||
m_Kind: 4
|
||||
m_SubKind: App Store
|
||||
- m_Textures: []
|
||||
m_Width: 120
|
||||
m_Height: 120
|
||||
m_Kind: 3
|
||||
m_Width: 60
|
||||
m_Height: 60
|
||||
m_Kind: 2
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 80
|
||||
m_Height: 80
|
||||
m_Kind: 3
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 80
|
||||
m_Height: 80
|
||||
m_Kind: 3
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 3
|
||||
m_Kind: 2
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 2
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 20
|
||||
m_Height: 20
|
||||
m_Kind: 2
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 87
|
||||
@@ -449,30 +455,25 @@ PlayerSettings:
|
||||
m_Kind: 1
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 60
|
||||
m_Height: 60
|
||||
m_Kind: 2
|
||||
m_Width: 120
|
||||
m_Height: 120
|
||||
m_Kind: 3
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 80
|
||||
m_Height: 80
|
||||
m_Kind: 3
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 80
|
||||
m_Height: 80
|
||||
m_Kind: 3
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 2
|
||||
m_SubKind: iPhone
|
||||
- m_Textures: []
|
||||
m_Width: 40
|
||||
m_Height: 40
|
||||
m_Kind: 2
|
||||
m_Kind: 3
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 20
|
||||
m_Height: 20
|
||||
m_Kind: 2
|
||||
m_SubKind: iPad
|
||||
- m_Textures: []
|
||||
m_Width: 1024
|
||||
m_Height: 1024
|
||||
m_Kind: 4
|
||||
m_SubKind: App Store
|
||||
- m_Textures:
|
||||
- {fileID: 2800000, guid: a8ae11f948f0cfa4791e954c315376ee, type: 3}
|
||||
m_Width: 180
|
||||
@@ -507,6 +508,9 @@ PlayerSettings:
|
||||
- m_BuildTarget: Android
|
||||
m_StaticBatching: 1
|
||||
m_DynamicBatching: 0
|
||||
- m_BuildTarget: iPhone
|
||||
m_StaticBatching: 1
|
||||
m_DynamicBatching: 0
|
||||
m_BuildTargetShaderSettings: []
|
||||
m_BuildTargetGraphicsJobs:
|
||||
- m_BuildTarget: MacStandaloneSupport
|
||||
@@ -836,7 +840,7 @@ PlayerSettings:
|
||||
webEnableSubmoduleStrippingCompatibility: 0
|
||||
scriptingDefineSymbols:
|
||||
Android: ENABLE_LOG
|
||||
iPhone: __UNIFIED__;__IOS__
|
||||
iPhone:
|
||||
additionalCompilerArguments: {}
|
||||
platformArchitecture: {}
|
||||
scriptingBackend:
|
||||
|
||||
573
docs/interactables/code_reference.md
Normal file
@@ -0,0 +1,573 @@
|
||||
# Interactables System - Code Reference
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Class Hierarchy](#class-hierarchy)
|
||||
3. [InteractableBase - The Template Method](#interactablebase---the-template-method)
|
||||
- [Interaction Flow](#interaction-flow)
|
||||
- [Virtual Methods to Override](#virtual-methods-to-override)
|
||||
4. [Creating Custom Interactables](#creating-custom-interactables)
|
||||
- [Example 1: Simple Button (OneClickInteraction)](#example-1-simple-button-oneclickinteraction)
|
||||
- [Example 2: Item Pickup](#example-2-item-pickup)
|
||||
- [Example 3: Item Slot with Validation](#example-3-item-slot-with-validation)
|
||||
5. [Character Movement](#character-movement)
|
||||
6. [Action Component System](#action-component-system)
|
||||
7. [Events System](#events-system)
|
||||
8. [Save/Load System Integration](#saveload-system-integration)
|
||||
9. [Integration with Puzzle System](#integration-with-puzzle-system)
|
||||
10. [Advanced Patterns](#advanced-patterns)
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Simple, centrally orchestrated interaction system for player and follower characters.
|
||||
|
||||
### Core Concepts
|
||||
|
||||
- **Template Method Pattern**: `InteractableBase` defines the interaction flow; subclasses override specific steps
|
||||
- **Action Component System**: Modular actions respond to interaction events independently
|
||||
- **Async/Await Flow**: Character movement and timeline playback use async patterns
|
||||
- **Save/Load Integration**: `SaveableInteractable` provides persistence for interaction state
|
||||
|
||||
---
|
||||
|
||||
## Class Hierarchy
|
||||
|
||||
```
|
||||
ManagedBehaviour
|
||||
└── InteractableBase
|
||||
├── OneClickInteraction
|
||||
└── SaveableInteractable
|
||||
├── Pickup
|
||||
└── ItemSlot
|
||||
```
|
||||
|
||||
### Class Descriptions
|
||||
|
||||
- **InteractableBase** - Abstract base class that orchestrates the complete interaction flow using the Template Method pattern. Handles tap input, character movement, validation, and event dispatching for all interactables.
|
||||
|
||||
- **SaveableInteractable** - Extends InteractableBase with save/load capabilities, integrating with the ManagedBehaviour save system. Provides abstract methods for JSON serialization and deserialization of state.
|
||||
|
||||
- **OneClickInteraction** - Simplest concrete interactable that completes immediately when character arrives with no additional logic. All functionality comes from UnityEvents configured in the Inspector.
|
||||
|
||||
- **Pickup** - Represents items that can be picked up by the follower, handling item combination and state tracking. Integrates with ItemManager and supports bilateral restoration with ItemSlots.
|
||||
|
||||
- **ItemSlot** - Container that accepts specific items with validation for correct/incorrect/forbidden items. Manages item placement, swapping, and supports combination with special puzzle integration that allows swapping when locked.
|
||||
|
||||
---
|
||||
|
||||
## InteractableBase - The Template Method
|
||||
|
||||
### Interaction Flow
|
||||
|
||||
When a player taps an interactable, the following flow executes:
|
||||
|
||||
```csharp
|
||||
OnTap() → CanBeClicked() → StartInteractionFlowAsync()
|
||||
↓
|
||||
1. Find Characters (player, follower)
|
||||
2. OnInteractionStarted() [Virtual Hook]
|
||||
3. Fire interactionStarted events
|
||||
4. MoveCharactersAsync()
|
||||
5. OnInteractingCharacterArrived() [Virtual Hook]
|
||||
6. Fire characterArrived events
|
||||
7. ValidateInteraction()
|
||||
8. DoInteraction() [Virtual Hook - OVERRIDE THIS]
|
||||
9. OnInteractionFinished() [Virtual Hook]
|
||||
10. Fire interactionComplete events
|
||||
```
|
||||
|
||||
### Virtual Methods to Override
|
||||
|
||||
#### 1. `CanBeClicked()` - Pre-Interaction Validation
|
||||
```csharp
|
||||
protected virtual bool CanBeClicked()
|
||||
{
|
||||
if (!isActive) return false;
|
||||
// Add custom checks here
|
||||
return true;
|
||||
}
|
||||
```
|
||||
**When to override:** Add high-level validation before interaction starts (cooldowns, prerequisites, etc.)
|
||||
|
||||
#### 2. `OnInteractionStarted()` - Setup Logic
|
||||
```csharp
|
||||
protected virtual void OnInteractionStarted()
|
||||
{
|
||||
// Called after characters found, before movement
|
||||
// Setup animations, sound effects, etc.
|
||||
}
|
||||
```
|
||||
**When to override:** Perform setup that needs to happen before character movement
|
||||
|
||||
#### 3. `DoInteraction()` - Main Logic ⭐ **OVERRIDE THIS**
|
||||
```csharp
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
// Your interaction logic here
|
||||
return true; // Return true for success, false for failure
|
||||
}
|
||||
```
|
||||
**When to override:** **Always override this** - this is your main interaction logic
|
||||
|
||||
#### 4. `OnInteractingCharacterArrived()` - Arrival Reaction
|
||||
```csharp
|
||||
protected virtual void OnInteractingCharacterArrived()
|
||||
{
|
||||
// Called when character reaches interaction point
|
||||
// Trigger arrival animations, sounds, etc.
|
||||
}
|
||||
```
|
||||
**When to override:** React to character arrival with visuals/audio
|
||||
|
||||
#### 5. `OnInteractionFinished()` - Cleanup Logic
|
||||
```csharp
|
||||
protected virtual void OnInteractionFinished(bool success)
|
||||
{
|
||||
// Called after interaction completes
|
||||
// Cleanup, reset state, etc.
|
||||
}
|
||||
```
|
||||
**When to override:** Perform cleanup after interaction completes
|
||||
|
||||
#### 6. `CanProceedWithInteraction()` - Validation
|
||||
```csharp
|
||||
protected virtual (bool canProceed, string errorMessage) CanProceedWithInteraction()
|
||||
{
|
||||
// Validate if interaction can proceed
|
||||
// Return error message to show to player
|
||||
return (true, null);
|
||||
}
|
||||
```
|
||||
**When to override:** Add validation that shows error messages to player
|
||||
|
||||
---
|
||||
|
||||
## Creating Custom Interactables
|
||||
|
||||
### Example 1: Simple Button (OneClickInteraction)
|
||||
|
||||
The simplest interactable just completes when the character arrives:
|
||||
|
||||
```csharp
|
||||
using Interactions;
|
||||
|
||||
public class OneClickInteraction : InteractableBase
|
||||
{
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
// Simply return success - no additional logic needed
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Use Case:** Triggers, pressure plates, simple activators
|
||||
|
||||
**Configuration:**
|
||||
- Set `characterToInteract` to define which character activates it
|
||||
- Use UnityEvents in inspector to trigger game logic
|
||||
|
||||
---
|
||||
|
||||
### Example 2: Item Pickup
|
||||
|
||||
From `Pickup.cs` - demonstrates validation and follower interaction:
|
||||
|
||||
```csharp
|
||||
public class Pickup : SaveableInteractable
|
||||
{
|
||||
public PickupItemData itemData;
|
||||
public bool IsPickedUp { get; internal set; }
|
||||
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
// Try combination first if follower is holding something
|
||||
var heldItemObject = FollowerController?.GetHeldPickupObject();
|
||||
var heldItemData = heldItemObject?.GetComponent<Pickup>()?.itemData;
|
||||
|
||||
var combinationResult = FollowerController.TryCombineItems(
|
||||
this, out var resultItem
|
||||
);
|
||||
|
||||
if (combinationResult == FollowerController.CombinationResult.Successful)
|
||||
{
|
||||
IsPickedUp = true;
|
||||
FireCombinationEvent(resultItem, heldItemData);
|
||||
return true;
|
||||
}
|
||||
|
||||
// No combination - do regular pickup
|
||||
FollowerController?.TryPickupItem(gameObject, itemData);
|
||||
IsPickedUp = true;
|
||||
OnItemPickedUp?.Invoke(itemData);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Key Patterns:**
|
||||
- Access `FollowerController` directly (set by base class)
|
||||
- Return `true` for successful pickup
|
||||
- Use custom events (`OnItemPickedUp`) for specific notifications
|
||||
|
||||
---
|
||||
|
||||
### Example 3: Item Slot with Validation
|
||||
|
||||
From `ItemSlot.cs` - demonstrates complex validation and state management:
|
||||
|
||||
```csharp
|
||||
public class ItemSlot : SaveableInteractable
|
||||
{
|
||||
public PickupItemData itemData; // What item should go here
|
||||
private ItemSlotState currentState = ItemSlotState.None;
|
||||
|
||||
protected override (bool canProceed, string errorMessage) CanProceedWithInteraction()
|
||||
{
|
||||
var heldItem = FollowerController?.CurrentlyHeldItemData;
|
||||
|
||||
// Can't interact with empty slot and no item
|
||||
if (heldItem == null && currentlySlottedItemObject == null)
|
||||
return (false, "This requires an item.");
|
||||
|
||||
// Check forbidden items
|
||||
if (heldItem != null && currentlySlottedItemObject == null)
|
||||
{
|
||||
var config = interactionSettings?.GetSlotItemConfig(itemData);
|
||||
var forbidden = config?.forbiddenItems ?? new List<PickupItemData>();
|
||||
|
||||
if (PickupItemData.ListContainsEquivalent(forbidden, heldItem))
|
||||
return (false, "Can't place that here.");
|
||||
}
|
||||
|
||||
return (true, null);
|
||||
}
|
||||
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
var heldItemData = FollowerController.CurrentlyHeldItemData;
|
||||
var heldItemObj = FollowerController.GetHeldPickupObject();
|
||||
|
||||
// Scenario 1: Slot empty + holding item = Slot it
|
||||
if (heldItemData != null && currentlySlottedItemObject == null)
|
||||
{
|
||||
SlotItem(heldItemObj, heldItemData);
|
||||
FollowerController.ClearHeldItem();
|
||||
return IsSlottedItemCorrect(); // Returns true only if correct item
|
||||
}
|
||||
|
||||
// Scenario 2: Slot full + holding item = Try combine or swap
|
||||
if (currentlySlottedItemObject != null)
|
||||
{
|
||||
// Try combination...
|
||||
// Or swap items...
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Key Patterns:**
|
||||
- `CanProceedWithInteraction()` shows error messages to player
|
||||
- `DoInteraction()` returns true only for correct item (affects puzzle completion)
|
||||
- Access settings via `GameManager.GetSettingsObject<T>()`
|
||||
|
||||
---
|
||||
|
||||
## Character Movement
|
||||
|
||||
### Character Types
|
||||
|
||||
```csharp
|
||||
public enum CharacterToInteract
|
||||
{
|
||||
None, // No character movement
|
||||
Trafalgar, // Player only
|
||||
Pulver, // Follower only (player moves to range first)
|
||||
Both // Both characters move
|
||||
}
|
||||
```
|
||||
|
||||
Set in Inspector on `InteractableBase`.
|
||||
|
||||
### Custom Movement Targets
|
||||
|
||||
Add `CharacterMoveToTarget` component as child of your interactable:
|
||||
|
||||
```csharp
|
||||
// Automatically used if present
|
||||
var moveTarget = GetComponentInChildren<CharacterMoveToTarget>();
|
||||
Vector3 targetPos = moveTarget.GetTargetPosition();
|
||||
```
|
||||
|
||||
See [Editor Reference](editor_reference.md#character-movement-targets) for details.
|
||||
|
||||
---
|
||||
|
||||
## Action Component System
|
||||
|
||||
Add modular behaviors to interactables via `InteractionActionBase` components.
|
||||
|
||||
### Creating an Action Component
|
||||
|
||||
```csharp
|
||||
using Interactions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class MyCustomAction : InteractionActionBase
|
||||
{
|
||||
protected override async Task<bool> ExecuteAsync(
|
||||
InteractionEventType eventType,
|
||||
PlayerTouchController player,
|
||||
FollowerController follower)
|
||||
{
|
||||
// Your action logic here
|
||||
|
||||
if (eventType == InteractionEventType.InteractionStarted)
|
||||
{
|
||||
// Play sound, spawn VFX, etc.
|
||||
await Task.Delay(1000); // Simulate async work
|
||||
}
|
||||
|
||||
return true; // Return success
|
||||
}
|
||||
|
||||
protected override bool ShouldExecute(
|
||||
InteractionEventType eventType,
|
||||
PlayerTouchController player,
|
||||
FollowerController follower)
|
||||
{
|
||||
// Add conditions for when this action should run
|
||||
return base.ShouldExecute(eventType, player, follower);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Configuring in Inspector
|
||||
|
||||

|
||||
|
||||
- **Respond To Events**: Select which events trigger this action
|
||||
- **Pause Interaction Flow**: If true, interaction waits for this action to complete
|
||||
|
||||
### Built-in Action: Timeline Playback
|
||||
|
||||
`InteractionTimelineAction` plays Unity Timeline sequences in response to events:
|
||||
|
||||
```csharp
|
||||
// Automatically configured via Inspector
|
||||
// See Editor Reference for details
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Character binding to timeline tracks
|
||||
- Sequential timeline playback
|
||||
- Loop options (loop all, loop last)
|
||||
- Timeout protection
|
||||
|
||||
---
|
||||
|
||||
## Events System
|
||||
|
||||
### UnityEvents (Inspector-Configurable)
|
||||
|
||||
Available on all `InteractableBase`:
|
||||
|
||||
```csharp
|
||||
[Header("Interaction Events")]
|
||||
public UnityEvent<PlayerTouchController, FollowerController> interactionStarted;
|
||||
public UnityEvent interactionInterrupted;
|
||||
public UnityEvent characterArrived;
|
||||
public UnityEvent<bool> interactionComplete; // bool = success
|
||||
```
|
||||
|
||||
### C# Events (Code Subscribers)
|
||||
|
||||
Pickup example:
|
||||
```csharp
|
||||
public event Action<PickupItemData> OnItemPickedUp;
|
||||
public event Action<PickupItemData, PickupItemData, PickupItemData> OnItemsCombined;
|
||||
```
|
||||
|
||||
ItemSlot example:
|
||||
```csharp
|
||||
public event Action<PickupItemData> OnItemSlotRemoved;
|
||||
public event Action<PickupItemData, PickupItemData> OnCorrectItemSlotted;
|
||||
public event Action<PickupItemData, PickupItemData> OnIncorrectItemSlotted;
|
||||
```
|
||||
|
||||
### Subscribing to Events
|
||||
|
||||
```csharp
|
||||
void Start()
|
||||
{
|
||||
var pickup = GetComponent<Pickup>();
|
||||
pickup.OnItemPickedUp += HandleItemPickedUp;
|
||||
}
|
||||
|
||||
void HandleItemPickedUp(PickupItemData itemData)
|
||||
{
|
||||
Debug.Log($"Picked up: {itemData.itemName}");
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
var pickup = GetComponent<Pickup>();
|
||||
if (pickup != null)
|
||||
pickup.OnItemPickedUp -= HandleItemPickedUp;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Save/Load System Integration
|
||||
|
||||
### Making an Interactable Saveable
|
||||
|
||||
1. Inherit from `SaveableInteractable` instead of `InteractableBase`
|
||||
2. Define a serializable data structure
|
||||
3. Override `GetSerializableState()` and `ApplySerializableState()`
|
||||
|
||||
### Example Implementation
|
||||
|
||||
```csharp
|
||||
using Interactions;
|
||||
using UnityEngine;
|
||||
|
||||
// 1. Define save data structure
|
||||
[System.Serializable]
|
||||
public class MyInteractableSaveData
|
||||
{
|
||||
public bool hasBeenActivated;
|
||||
public int activationCount;
|
||||
}
|
||||
|
||||
// 2. Inherit from SaveableInteractable
|
||||
public class MyInteractable : SaveableInteractable
|
||||
{
|
||||
private bool hasBeenActivated = false;
|
||||
private int activationCount = 0;
|
||||
|
||||
// 3. Serialize state
|
||||
protected override object GetSerializableState()
|
||||
{
|
||||
return new MyInteractableSaveData
|
||||
{
|
||||
hasBeenActivated = this.hasBeenActivated,
|
||||
activationCount = this.activationCount
|
||||
};
|
||||
}
|
||||
|
||||
// 4. Deserialize state
|
||||
protected override void ApplySerializableState(string serializedData)
|
||||
{
|
||||
var data = JsonUtility.FromJson<MyInteractableSaveData>(serializedData);
|
||||
if (data == null) return;
|
||||
|
||||
this.hasBeenActivated = data.hasBeenActivated;
|
||||
this.activationCount = data.activationCount;
|
||||
|
||||
// IMPORTANT: Don't fire events during restoration
|
||||
// Don't re-run initialization logic
|
||||
}
|
||||
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
hasBeenActivated = true;
|
||||
activationCount++;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
---
|
||||
|
||||
## Integration with Puzzle System
|
||||
|
||||
Interactables can be puzzle steps by adding `ObjectiveStepBehaviour`:
|
||||
|
||||
```csharp
|
||||
// On GameObject with Interactable component
|
||||
var stepBehaviour = gameObject.AddComponent<ObjectiveStepBehaviour>();
|
||||
stepBehaviour.stepData = myPuzzleStepSO;
|
||||
```
|
||||
|
||||
### Automatic Puzzle Integration
|
||||
|
||||
`InteractableBase` automatically checks for puzzle locks:
|
||||
|
||||
```csharp
|
||||
private (bool, string) ValidateInteractionBase()
|
||||
{
|
||||
var step = GetComponent<PuzzleS.ObjectiveStepBehaviour>();
|
||||
if (step != null && !step.IsStepUnlocked())
|
||||
{
|
||||
// Special case: ItemSlots can swap even when locked
|
||||
if (!(this is ItemSlot))
|
||||
{
|
||||
return (false, "This step is locked!");
|
||||
}
|
||||
}
|
||||
return (true, null);
|
||||
}
|
||||
```
|
||||
|
||||
**Result:** Locked puzzle steps can't be interacted with (except ItemSlots for item swapping).
|
||||
|
||||
---
|
||||
|
||||
## Advanced Patterns
|
||||
|
||||
### Async Validation
|
||||
|
||||
For complex validation that requires async operations:
|
||||
|
||||
```csharp
|
||||
protected override (bool canProceed, string errorMessage) CanProceedWithInteraction()
|
||||
{
|
||||
// Synchronous validation only
|
||||
// Async validation should be done in OnInteractionStarted
|
||||
return (true, null);
|
||||
}
|
||||
|
||||
protected override void OnInteractionStarted()
|
||||
{
|
||||
// Can perform async checks here if needed
|
||||
// But interaction flow continues automatically
|
||||
}
|
||||
```
|
||||
|
||||
### Interrupting Interactions
|
||||
|
||||
Interactions auto-interrupt if player cancels movement:
|
||||
|
||||
```csharp
|
||||
// Automatically handled in MoveCharactersAsync()
|
||||
playerRef.OnMoveToCancelled += () => {
|
||||
interactionInterrupted?.Invoke();
|
||||
// Flow stops here
|
||||
};
|
||||
```
|
||||
|
||||
### One-Time Interactions
|
||||
|
||||
```csharp
|
||||
[Header("Interaction Settings")]
|
||||
public bool isOneTime = true;
|
||||
|
||||
// Automatically disabled after first successful interaction
|
||||
// No override needed
|
||||
```
|
||||
|
||||
### Cooldown Systems
|
||||
|
||||
```csharp
|
||||
[Header("Interaction Settings")]
|
||||
public float cooldown = 5f; // Seconds
|
||||
|
||||
// Automatically handled by base class
|
||||
// Interaction disabled for 5 seconds after completion
|
||||
```
|
||||
305
docs/interactables/editor_reference.md
Normal file
@@ -0,0 +1,305 @@
|
||||
# Interactables System - Editor Reference
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Overview](#overview)
|
||||
2. [Adding Interactables to Scene](#adding-interactables-to-scene)
|
||||
3. [InteractableBase Inspector](#interactablebase-inspector)
|
||||
- [Interaction Settings](#interaction-settings)
|
||||
- [Interaction Events](#interaction-events-unityevents)
|
||||
4. [Character Movement Targets](#character-movement-targets)
|
||||
5. [Pickup Inspector](#pickup-inspector)
|
||||
6. [ItemSlot Inspector](#itemslot-inspector)
|
||||
7. [OneClickInteraction Inspector](#oneclickinteraction-inspector)
|
||||
8. [Interaction Action Components](#interaction-action-components)
|
||||
9. [Custom Action Components](#custom-action-components)
|
||||
10. [Puzzle Integration](#puzzle-integration)
|
||||
11. [Save System Configuration](#save-system-configuration)
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This guide covers configuring interactables using the Unity Inspector and scene tools. It might be helpful, although
|
||||
not necessary to be familiar with the code architecture covered in the [Code Reference](code_reference.md).
|
||||
|
||||
---
|
||||
|
||||
## Adding Interactables to Scene
|
||||
|
||||
### Method 1: Add Component Manually
|
||||
Select GameObject → Add Component → Search "Interactable" → Choose type
|
||||
|
||||
### Method 2: Use Interactable Editor
|
||||
`AppleHills > Interactable Editor` → Scene tab → Select GameObject → Click button for desired type
|
||||
|
||||
See [Editor Tools Reference](editor_tools_reference.md#interactable-editor) for details.
|
||||
|
||||
---
|
||||
|
||||
## InteractableBase Inspector
|
||||
|
||||

|
||||
|
||||
### Interaction Settings
|
||||
|
||||
**Is One Time** - Disable after first successful interaction (switches, consumables)
|
||||
|
||||
**Cooldown** - Temporarily disable after use, in seconds. `-1` = no cooldown (levers, buttons)
|
||||
|
||||
**Character To Interact** - Which character(s) move to activate:
|
||||
- **None** - No movement, instant interaction
|
||||
- **Trafalgar** - Player moves to point
|
||||
- **Pulver** - Follower moves (player moves to range first)
|
||||
- **Both** - Both characters move
|
||||
|
||||
### Interaction Events (UnityEvents)
|
||||
|
||||

|
||||
|
||||
**Interaction Started** `<PlayerTouchController, FollowerController>` - Fires after tap, before movement
|
||||
|
||||
**Interaction Interrupted** - Player cancels or validation fails
|
||||
|
||||
**Character Arrived** - Character reaches destination
|
||||
|
||||
**Interaction Complete** `<bool>` - After DoInteraction(), bool = success
|
||||
|
||||
### Example Event Configuration
|
||||
|
||||

|
||||
|
||||
**Door that opens when player arrives:**
|
||||
- Character To Interact: `Trafalgar`
|
||||
- Character Arrived: `DoorAnimator.SetTrigger("Open")`, `AudioSource.Play()`
|
||||
- Interaction Complete: `PuzzleStep.CompleteStep()` (if success)
|
||||
|
||||
---
|
||||
|
||||
## Character Movement Targets
|
||||
|
||||
### Default Movement
|
||||
|
||||
Without `CharacterMoveToTarget`, characters move to default distances configured in `GameManager`:
|
||||
- `PlayerStopDistance` - Follower interactions (~1.5 units)
|
||||
- `PlayerStopDistanceDirectInteraction` - Player interactions (~0.5 units)
|
||||
|
||||
### Custom Movement Targets
|
||||
|
||||
Add `CharacterMoveToTarget` component to child GameObject:
|
||||
|
||||

|
||||
|
||||
**Fields:**
|
||||
- **Character Type** - Which character (Trafalgar/Pulver/Both/None)
|
||||
- **Position Offset** - Offset from transform position
|
||||
|
||||
### Scene Gizmos
|
||||
|
||||

|
||||
|
||||
**Colors:** 🔵 Blue (Trafalgar), 🟠 Orange (Pulver), 🟣 Purple (Both), ⚪ Gray (None)
|
||||
|
||||
---
|
||||
|
||||
## Pickup Inspector
|
||||
|
||||

|
||||
|
||||
**Required Fields:**
|
||||
|
||||
**Item Data** - `PickupItemData` ScriptableObject defining the item. Create via `Assets > Create > AppleHills > Items + Puzzles > Pickup Item Data`
|
||||
|
||||
**Icon Renderer** - `SpriteRenderer` displaying item icon (auto-assigned if not set)
|
||||
|
||||
### PickupItemData ScriptableObject
|
||||
|
||||

|
||||
|
||||
**Fields:** Item Name, Description, Map Sprite, Pick Up Sound, Drop Sound
|
||||
|
||||
**Item ID** (Read-Only) - Auto-generated unique identifier for save/load
|
||||
|
||||
---
|
||||
|
||||
## ItemSlot Inspector
|
||||
|
||||

|
||||
|
||||
**Required Fields:**
|
||||
|
||||
**Item Data** - `PickupItemData` defining the **correct** item for this slot
|
||||
|
||||
**Icon Renderer** - `SpriteRenderer` showing slot icon (background/outline)
|
||||
|
||||
**Slotted Item Renderer** - `SpriteRenderer` showing currently slotted item (usually child GameObject)
|
||||
|
||||
### Slot Events
|
||||
|
||||

|
||||
|
||||
**On Item Slotted** - Any item placed
|
||||
**On Item Slot Removed** - Item removed
|
||||
**On Correct Item Slotted** - Correct item placed (also fires `interactionComplete(true)`)
|
||||
**On Incorrect Item Slotted** - Wrong item placed
|
||||
**On Forbidden Item Slotted** - Forbidden item attempted
|
||||
|
||||
|
||||
### Slot Item Configuration (Settings)
|
||||
|
||||

|
||||
|
||||
Configured in `InteractionSettings` at `Assets/Settings/InteractionSettings`:
|
||||
- **Correct Items** - List of accepted items
|
||||
- **Forbidden Items** - Items that can't be placed
|
||||
- **Incorrect Items** - Items that slot but aren't correct
|
||||
|
||||
|
||||
---
|
||||
|
||||
## OneClickInteraction Inspector
|
||||
|
||||

|
||||
|
||||
**No additional fields** - only inherits `InteractableBase` settings.
|
||||
|
||||
### Typical Configuration
|
||||
|
||||
- **Character To Interact:** `Trafalgar` or `Pulver`
|
||||
- **Is One Time:** Depends on use case
|
||||
- **Interaction Complete Event:** Configure to trigger game logic
|
||||
|
||||
### Example Use Cases
|
||||
|
||||
**Pressure Plate:**
|
||||
- Character To Interact: `Pulver`
|
||||
- Is One Time: `false`
|
||||
- Interaction Complete: Call `Door.Open()`
|
||||
|
||||
**Tutorial Trigger:**
|
||||
- Character To Interact: `None`
|
||||
- Is One Time: `true`
|
||||
- Interaction Started: Call `TutorialManager.ShowTip()`
|
||||
|
||||
**Dialogue Starter:**
|
||||
- Character To Interact: `Both`
|
||||
- Is One Time: `false`
|
||||
- Character Arrived: Call `DialogueManager.StartDialogue()`
|
||||
|
||||
---
|
||||
|
||||
## Interaction Action Components
|
||||
|
||||
### InteractionTimelineAction
|
||||
|
||||

|
||||
|
||||
Plays Unity Timeline sequences in response to interaction events.
|
||||
|
||||
#### Required Fields
|
||||
|
||||
**Playable Director**
|
||||
- **Type:** `PlayableDirector` component
|
||||
- **Purpose:** Timeline player
|
||||
- **Setup:** Auto-assigned from same GameObject if present
|
||||
|
||||
**Timeline Mappings** (Array)
|
||||
Each element maps an interaction event to timeline(s):
|
||||
|
||||

|
||||
|
||||
##### Event Type
|
||||
- **Type:** `InteractionEventType` enum
|
||||
- **Options:**
|
||||
- `InteractionStarted`
|
||||
- `PlayerArrived`
|
||||
- `InteractingCharacterArrived`
|
||||
- `InteractionComplete`
|
||||
- `InteractionInterrupted`
|
||||
- **Purpose:** When to play this timeline
|
||||
|
||||
##### Timelines (Array)
|
||||
- **Type:** `PlayableAsset[]`
|
||||
- **Purpose:** Timeline(s) to play for this event
|
||||
- **Note:** Plays sequentially if multiple
|
||||
|
||||
##### Bind Player Character
|
||||
- **Type:** `bool`
|
||||
- **Purpose:** Automatically bind player to timeline track
|
||||
- **Track Name:** `Player` (customizable via Player Track Name field)
|
||||
|
||||
##### Bind Pulver Character
|
||||
- **Type:** `bool`
|
||||
- **Purpose:** Automatically bind follower to timeline track
|
||||
- **Track Name:** `Pulver` (customizable via Pulver Track Name field)
|
||||
|
||||
##### Player Track Name / Pulver Track Name
|
||||
- **Type:** `string`
|
||||
- **Default:** `"Player"` / `"Pulver"`
|
||||
- **Purpose:** Name of timeline track to bind character to
|
||||
- **Note:** Must match track name in Timeline asset exactly
|
||||
|
||||
##### Timeout Seconds
|
||||
- **Type:** `float`
|
||||
- **Default:** `30`
|
||||
- **Purpose:** Safety timeout - auto-complete if timeline doesn't finish
|
||||
- **Use Case:** Prevent stuck interactions if timeline errors
|
||||
|
||||
##### Loop Last / Loop All
|
||||
- **Type:** `bool`
|
||||
- **Purpose:** Loop behavior for timeline sequence
|
||||
- **Loop Last:** Replays final timeline on next interaction
|
||||
- **Loop All:** Cycles through all timelines repeatedly
|
||||
|
||||
---
|
||||
|
||||
## Custom Action Components
|
||||
|
||||
See [Code Reference - Action Component System](code_reference.md#action-component-system).
|
||||
|
||||
**Base Fields:**
|
||||
- **Respond To Events** - Which events trigger this action
|
||||
- **Pause Interaction Flow** - Wait for completion (`true`) or run in background (`false`)
|
||||
|
||||
---
|
||||
|
||||
## Puzzle Integration
|
||||
|
||||
### Adding Puzzle Step to Interactable
|
||||
|
||||
1. Select interactable GameObject
|
||||
2. Add Component → `ObjectiveStepBehaviour`
|
||||
3. Assign `Step Data` (PuzzleStepSO asset)
|
||||
|
||||

|
||||
|
||||
**GameObject has two components:**
|
||||
- **ItemSlot** (or other Interactable type)
|
||||
- **ObjectiveStepBehaviour**
|
||||
|
||||
**Behavior:**
|
||||
- Interactable locked until puzzle step unlocked
|
||||
- Successful interaction (return `true` from `DoInteraction()`) completes puzzle step
|
||||
- ItemSlots can still swap items when locked (special case)
|
||||
|
||||
### Automatic Step Completion
|
||||
|
||||
**For Pickup:**
|
||||
```csharp
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
// ...pickup logic...
|
||||
return true; // Automatically completes puzzle step if present
|
||||
}
|
||||
```
|
||||
|
||||
**For ItemSlot:**
|
||||
```csharp
|
||||
protected override bool DoInteraction()
|
||||
{
|
||||
// ...slot logic...
|
||||
return IsSlottedItemCorrect(); // Only completes if correct item
|
||||
}
|
||||
```
|
||||
|
||||
No additional code needed - `InteractableBase` handles step completion automatically.
|
||||
251
docs/interactables/editor_tools_reference.md
Normal file
@@ -0,0 +1,251 @@
|
||||
# Editor Tools Reference
|
||||
|
||||
## Overview
|
||||
|
||||
AppleHills provides two specialized editor tools for managing puzzles and interactables:
|
||||
- **Interactable Editor** - Manage scene interactables and debug interactions
|
||||
- **Puzzle Editor** - Manage puzzle steps and debug puzzle flow
|
||||
|
||||
Both tools are accessible via the `AppleHills` menu and follow a consistent two-tab design pattern for editing and debugging.
|
||||
|
||||
---
|
||||
|
||||
## Interactable Editor
|
||||
|
||||
**Menu:** `AppleHills > Interactable Editor`
|
||||
|
||||
The Interactable Editor provides scene-based management and runtime debugging for interactable objects in your scenes.
|
||||
|
||||
### Edit Tab
|
||||
|
||||

|
||||
|
||||
The Edit tab lets you browse, select, and modify all interactables in the current scene with a real-time inspector.
|
||||
|
||||
#### Left Panel - Scene Interactable List
|
||||
|
||||
**Refresh Button** - Manual refresh (auto-refreshes on scene changes, hierarchy changes, and play mode toggle)
|
||||
|
||||
**Found Count** - Displays total number of interactables found in the active scene
|
||||
|
||||
**Search Field** - Filter interactables by GameObject name for quick access
|
||||
|
||||
**Interactable Cards** - Each card shows:
|
||||
- GameObject name
|
||||
- Interactable component type
|
||||
- Item/Slot data reference (for Pickup and ItemSlot types)
|
||||
- Ping button to highlight in scene hierarchy
|
||||
|
||||
**Auto-Discovery:** Automatically scans for all `InteractableBase` components when:
|
||||
- Scene loads or unloads
|
||||
- GameObjects or components are added/removed
|
||||
- Play mode is toggled
|
||||
|
||||
#### Right Panel - Dynamic Inspector
|
||||
|
||||
The right panel adapts based on what's selected:
|
||||
|
||||
**Nothing Selected State:**
|
||||
- Shows a help message prompting you to select an interactable from the list
|
||||
|
||||
**GameObject Without Interactable State:**
|
||||
- Displays "Add Interactable Component" buttons for:
|
||||
- OneClickInteraction
|
||||
- Pickup
|
||||
- ItemSlot
|
||||
- SaveableInteractable
|
||||
- InteractableBase
|
||||
- Clicking any button adds the component with full undo support and auto-refreshes the list
|
||||
|
||||
**Interactable Selected State:**
|
||||
- Shows full Unity inspector for the selected component
|
||||
- All changes auto-save with undo/redo support (Ctrl+Z / Ctrl+Y)
|
||||
- Additional Information section displays:
|
||||
- Component type
|
||||
- Attached action components with Ping buttons
|
||||
- Type-specific data (Item Data for Pickup, Slot Data for ItemSlot)
|
||||
- In Play Mode: shows slotted object for ItemSlot types
|
||||
|
||||
**Selection Synchronization:**
|
||||
- Bidirectional sync between editor list and scene hierarchy
|
||||
- Selecting in the list highlights in hierarchy and vice versa
|
||||
- Selecting a GameObject without an interactable shows the "Add Component" interface
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
### Debug Tab
|
||||
|
||||
**Availability:** Play Mode only
|
||||
|
||||
The Debug tab provides runtime testing tools for triggering interactions and events on interactables.
|
||||
|
||||
#### Interactable Debug Cards
|
||||
|
||||
Each debug card represents one interactable in the scene and includes:
|
||||
|
||||
**Header Section:**
|
||||
- GameObject name (bold text)
|
||||
- Interactable component type (gray text)
|
||||
- Ping button (locates object in hierarchy)
|
||||
|
||||
**Full Interaction Button:**
|
||||
- Simulates complete `OnTap()` flow
|
||||
- Triggers character movement and full event chain
|
||||
- Tests end-to-end interaction behavior
|
||||
|
||||
**Individual Event Triggers:**
|
||||
- **Started** - Calls `OnInteractionStarted()` and fires `interactionStarted` event
|
||||
- **Arrived** - Calls `OnInteractingCharacterArrived()` and fires `characterArrived` event
|
||||
- **Do Interaction** - Calls `DoInteraction()` directly to test core interaction logic
|
||||
- **Complete (Success)** - Calls `OnInteractionFinished(true)` and triggers puzzle completion
|
||||
- **Complete (Fail)** - Calls `OnInteractionFinished(false)` to test failure handling
|
||||
- **Interrupted** - Invokes `interactionInterrupted` event
|
||||
|
||||
**Registered Actions Display:**
|
||||
- Lists all action components registered to this interactable
|
||||
- Shows which events each action responds to
|
||||
|
||||
#### Common Testing Workflows
|
||||
|
||||
**Test Full Interaction:**
|
||||
1. Enter Play Mode
|
||||
2. Find target interactable in debug list
|
||||
3. Click **Full Interaction** button
|
||||
4. Verify complete behavior chain
|
||||
|
||||
**Test Specific Event:**
|
||||
1. Enter Play Mode
|
||||
2. Locate interactable
|
||||
3. Click individual event button (e.g., **Started** or **Arrived**)
|
||||
4. Verify specific event behavior
|
||||
|
||||
**Test Event Sequence:**
|
||||
1. Click **Started**
|
||||
2. Click **Arrived**
|
||||
3. Click **Do Interaction**
|
||||
4. Click **Complete (Success)**
|
||||
5. Verify full event chain executes correctly
|
||||
|
||||
**Test Action Integration:**
|
||||
1. Find interactable with timeline or dialogue action
|
||||
2. Check Registered Actions to confirm action is attached
|
||||
3. Click **Started** or appropriate event trigger
|
||||
4. Verify action executes (timeline plays, dialogue shows, etc.)
|
||||
|
||||
**Test Puzzle Integration:**
|
||||
1. Open both Interactable Editor and Puzzle Editor
|
||||
2. Verify required puzzle step is unlocked in Puzzle Editor
|
||||
3. Click **Full Interaction** in Interactable Editor
|
||||
4. Switch to Puzzle Editor and verify step marked as completed
|
||||
|
||||
---
|
||||
|
||||
## Puzzle Editor
|
||||
|
||||
**Menu:** `AppleHills > Puzzle Editor`
|
||||
|
||||

|
||||
|
||||
The Puzzle Editor manages puzzle step assets and provides runtime debugging for the puzzle progression system.
|
||||
|
||||
### Edit Tab
|
||||
|
||||
The Edit tab displays all `PuzzleStepSO` assets in your project with full editing capabilities.
|
||||
|
||||
#### Left Panel - Puzzle Step List
|
||||
|
||||
**Search Field** - Filter puzzle steps by name
|
||||
|
||||
**Folder Organization:**
|
||||
- Steps are grouped by their asset folder location
|
||||
- Click folder headers to expand/collapse groups
|
||||
- Helps organize large numbers of puzzle steps
|
||||
|
||||
**Step Cards** - Each card displays:
|
||||
- Display name (user-friendly identifier)
|
||||
- Step ID (unique technical identifier)
|
||||
- Dependency information (unlocked by / unlocks)
|
||||
|
||||
**Toolbar Actions:**
|
||||
- **Refresh** - Reloads all puzzle step assets from project
|
||||
- **Create New** - Opens creation dialog
|
||||
|
||||
**Creating New Steps:**
|
||||
1. Click **Create New** button
|
||||
2. Enter step name (stepId auto-generates from name)
|
||||
3. Select destination folder
|
||||
4. Click Create
|
||||
5. New step appears in list and is auto-selected
|
||||
|
||||
#### Right Panel - Step Inspector
|
||||
|
||||
When a puzzle step is selected, the inspector shows:
|
||||
|
||||
**Basic Properties:**
|
||||
- **Display Name** - Editable user-friendly name for the step
|
||||
- **Step ID** - Read-only unique identifier (lowercase, underscored format)
|
||||
|
||||
**Dependencies Configuration:**
|
||||
- **Unlocked By** - List of steps that must complete before this step unlocks
|
||||
- Drag and drop `PuzzleStepSO` assets to add dependencies
|
||||
- Empty list means this is an initial step (unlocked by default)
|
||||
- **Unlocks** - List of steps that this step will unlock when completed
|
||||
- Bidirectional relationship (automatically syncs with "Unlocked By" on other steps)
|
||||
- Edit from either side of the relationship
|
||||
|
||||
**Asset Management:**
|
||||
- **Asset Path** - Shows full file path to the .asset file
|
||||
- **Delete Button** - Permanently deletes the step asset
|
||||
- Shows confirmation dialog before deletion
|
||||
- Cannot be undone after confirmation
|
||||
|
||||
**Auto-Save:** All changes save automatically to the asset with full undo/redo support (Ctrl+Z / Ctrl+Y)
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
### Debug Tab
|
||||
|
||||
**Availability:** Play Mode only
|
||||
|
||||
The Debug tab provides runtime testing and debugging tools for the puzzle progression system.
|
||||
|
||||
#### Toolbar
|
||||
|
||||
**Current Level Display:**
|
||||
- Shows the name of the currently loaded puzzle level
|
||||
- Updates automatically when scenes change
|
||||
- Displays "No level loaded" if puzzle system is inactive
|
||||
|
||||
**Unlock All Button:**
|
||||
- Unlocks and completes all puzzle steps in the current level
|
||||
- Processes steps in dependency order using iterative algorithm
|
||||
- Logs progression to console for debugging
|
||||
- Useful for testing late-game content or verifying completion flow
|
||||
|
||||
#### Step List
|
||||
|
||||
Each step in the current level displays:
|
||||
|
||||
**Step Header:**
|
||||
- Display name in bold text
|
||||
- Step ID in gray text below name
|
||||
|
||||
**State Indicators:**
|
||||
- 🔒 **Locked** (gray background) - Dependencies not met, step unavailable
|
||||
- 🔓 **Unlocked** (yellow background) - Available for interaction but not completed
|
||||
- ✅ **Completed** (green background) - Successfully completed
|
||||
|
||||
**Action Buttons:**
|
||||
- **Toggle Lock** - Manually lock/unlock the step
|
||||
- Bypasses normal dependency requirements
|
||||
- Useful for testing specific scenarios
|
||||
- Does not affect dependent steps automatically
|
||||
- **Complete** - Marks step as completed
|
||||
- Only enabled when step is unlocked
|
||||
- Fires completion events
|
||||
- Automatically unlocks dependent steps
|
||||
- Updates state indicators in real-time
|
||||
@@ -1,253 +0,0 @@
|
||||
# Apple Hills Interaction System
|
||||
|
||||
A concise, code-first guide to creating and extending interactions using `Interactable` and modular action/requirement components. Designed to match the style of the other updated docs (TOC, inline code, case studies).
|
||||
|
||||
## Table of Contents
|
||||
- [What This Solves](#what-this-solves)
|
||||
- [Architecture at a Glance](#architecture-at-a-glance)
|
||||
- [Quick Start (Code-First)](#quick-start-code-first)
|
||||
- [Subscribe to Interaction Events](#subscribe-to-interaction-events)
|
||||
- [Create a Custom Action](#create-a-custom-action)
|
||||
- [Trigger Programmatically](#trigger-programmatically)
|
||||
- [Core Components](#core-components)
|
||||
- [`Interactable`](#interactable)
|
||||
- [`CharacterMoveToTarget`](#charactermovetotarget)
|
||||
- [`InteractionActionBase` and concrete actions](#interactionactionbase-and-concrete-actions)
|
||||
- [`InteractionRequirementBase`](#interactionrequirementbase)
|
||||
- [Interaction Event Flow](#interaction-event-flow)
|
||||
- [Case Studies](#case-studies)
|
||||
- [Open a Door on Arrival](#open-a-door-on-arrival)
|
||||
- [Pick Up an Item then Play Timeline](#pick-up-an-item-then-play-timeline)
|
||||
- [Kick Off Dialogue When Player Arrives](#kick-off-dialogue-when-player-arrives)
|
||||
- [Troubleshooting / FAQ](#troubleshooting--faq)
|
||||
- [Paths & Namespaces](#paths--namespaces)
|
||||
- [Change Log](#change-log)
|
||||
|
||||
## What This Solves
|
||||
- Standardized interaction lifecycle with reliable events (`InteractionStarted`, `PlayerArrived`, `InteractingCharacterArrived`, `InteractionComplete`, `InteractionInterrupted`).
|
||||
- Composable behavior via components derived from `InteractionActionBase` and `InteractionRequirementBase`.
|
||||
- Clean separation of input, locomotion-to-target, cinematic timelines, and game logic.
|
||||
|
||||
## Architecture at a Glance
|
||||
- Driver: `Interactable` — owns lifecycle, input hook, character selection via `CharacterToInteract`, one‑shot/cooldown, and event dispatch.
|
||||
- Targets: `CharacterMoveToTarget` — editor-authored world points for `Trafalgar`/`Pulver` to path to before executing actions.
|
||||
- Actions: `InteractionActionBase` (abstract) — modular responses to specific `InteractionEventType` values; can pause the flow with async tasks.
|
||||
- Requirements: `InteractionRequirementBase` (abstract) — gatekeepers for availability; multiple can be attached.
|
||||
- Cinematics: `InteractionTimelineAction` — plays one or more `PlayableAsset` timelines per event; optional character auto-binding.
|
||||
|
||||
## Quick Start (Code-First)
|
||||
|
||||
### Subscribe to Interaction Events
|
||||
```csharp
|
||||
using Interactions;
|
||||
using UnityEngine;
|
||||
|
||||
public class InteractDebugHooks : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Interactable interactable;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
interactable.interactionStarted.AddListener(OnStarted);
|
||||
interactable.characterArrived.AddListener(OnCharacterArrived);
|
||||
interactable.interactionInterrupted.AddListener(OnInterrupted);
|
||||
interactable.interactionComplete.AddListener(OnComplete);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
interactable.interactionStarted.RemoveListener(OnStarted);
|
||||
interactable.characterArrived.RemoveListener(OnCharacterArrived);
|
||||
interactable.interactionInterrupted.RemoveListener(OnInterrupted);
|
||||
interactable.interactionComplete.RemoveListener(OnComplete);
|
||||
}
|
||||
|
||||
private void OnStarted(Input.PlayerTouchController player, FollowerController follower)
|
||||
=> Debug.Log("Interaction started");
|
||||
|
||||
private void OnCharacterArrived() => Debug.Log("Character arrived");
|
||||
private void OnInterrupted() => Debug.Log("Interaction interrupted");
|
||||
private void OnComplete(bool success) => Debug.Log($"Interaction complete: {success}");
|
||||
}
|
||||
```
|
||||
|
||||
### Create a Custom Action
|
||||
```csharp
|
||||
using System.Threading.Tasks;
|
||||
using Interactions;
|
||||
using Input;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlaySfxOnArrivalAction : InteractionActionBase
|
||||
{
|
||||
[SerializeField] private AudioSource sfx;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
// React to the arrival event; don't block the flow
|
||||
respondToEvents = new() { InteractionEventType.InteractingCharacterArrived };
|
||||
pauseInteractionFlow = false;
|
||||
}
|
||||
|
||||
protected override bool ShouldExecute(InteractionEventType evt, PlayerTouchController player, FollowerController follower)
|
||||
{
|
||||
return sfx != null;
|
||||
}
|
||||
|
||||
protected override async Task<bool> ExecuteAsync(InteractionEventType evt, PlayerTouchController player, FollowerController follower)
|
||||
{
|
||||
sfx.Play();
|
||||
// non-blocking action returns immediately when pauseInteractionFlow == false
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
Attach this component under the same hierarchy as an `Interactable`. Registration is automatic via `OnEnable()`/`OnDisable()` in `InteractionActionBase`.
|
||||
|
||||
### Trigger Programmatically
|
||||
Normally input goes through `ITouchInputConsumer.OnTap(...)`. For testing, you can call the public tap handler:
|
||||
```csharp
|
||||
using UnityEngine;
|
||||
using Interactions;
|
||||
|
||||
public class TestTrigger : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Interactable interactable;
|
||||
|
||||
[ContextMenu("Trigger Interact (dev)")]
|
||||
private void Trigger()
|
||||
{
|
||||
interactable.OnTap(interactable.transform.position);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Core Components
|
||||
|
||||
### `Interactable`
|
||||
- Handles input, cooldowns (`cooldown`), one‑shot (`isOneTime`), and which character participates (`characterToInteract`).
|
||||
- Exposes events: `interactionStarted`, `characterArrived`, `interactionInterrupted`, `interactionComplete`.
|
||||
- Discovers and dispatches to child `InteractionActionBase` components; awaits those that request to pause.
|
||||
|
||||

|
||||
|
||||
### `CharacterMoveToTarget`
|
||||
Defines the world positions characters should reach before actions evaluate.
|
||||
- Can target `Trafalgar`, `Pulver`, or `Both` via configuration.
|
||||
- Supports offsets and editor gizmos; multiple instances allowed.
|
||||
|
||||

|
||||
|
||||
### `InteractionActionBase` and concrete actions
|
||||
- Filter by `InteractionEventType` using `respondToEvents`.
|
||||
- Control flow with `pauseInteractionFlow` and async `ExecuteAsync(...)`.
|
||||
- Built‑in example: `InteractionTimelineAction` for cinematics.
|
||||
|
||||

|
||||
|
||||
### `InteractionRequirementBase`
|
||||
- Attach one or more to gate the interaction based on items, puzzles, proximity, etc.
|
||||
|
||||
## Interaction Event Flow
|
||||
1. `InteractionStarted`
|
||||
2. `PlayerArrived`
|
||||
3. `InteractingCharacterArrived`
|
||||
4. `InteractionComplete` (bool success)
|
||||
5. `InteractionInterrupted`
|
||||
|
||||
Actions receive these events in order and may run concurrently; those with `pauseInteractionFlow` true are awaited.
|
||||
|
||||
## Case Studies
|
||||
|
||||
### Open a Door on Arrival
|
||||
```csharp
|
||||
using System.Threading.Tasks;
|
||||
using Interactions;
|
||||
using Input;
|
||||
using UnityEngine;
|
||||
|
||||
public class DoorOpenOnArrival : InteractionActionBase
|
||||
{
|
||||
[SerializeField] private Animator animator; // expects a bool parameter "Open"
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
respondToEvents = new() { InteractionEventType.InteractingCharacterArrived };
|
||||
pauseInteractionFlow = false;
|
||||
}
|
||||
|
||||
protected override async Task<bool> ExecuteAsync(InteractionEventType evt, PlayerTouchController p, FollowerController f)
|
||||
{
|
||||
animator.SetBool("Open", true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Pick Up an Item then Play Timeline
|
||||
Attach two actions: your `PickupItemAction` that pauses until the item is collected, and an `InteractionTimelineAction` mapped to `InteractionEventType.InteractionComplete` to celebrate.
|
||||
|
||||
### Kick Off Dialogue When Player Arrives
|
||||
```csharp
|
||||
using System.Threading.Tasks;
|
||||
using Dialogue;
|
||||
using Input;
|
||||
using Interactions;
|
||||
using UnityEngine;
|
||||
|
||||
public class StartDialogueOnArrival : InteractionActionBase
|
||||
{
|
||||
[SerializeField] private DialogueComponent dialogue;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
respondToEvents = new() { InteractionEventType.PlayerArrived };
|
||||
pauseInteractionFlow = false;
|
||||
}
|
||||
|
||||
protected override async Task<bool> ExecuteAsync(InteractionEventType evt, PlayerTouchController p, FollowerController f)
|
||||
{
|
||||
dialogue.StartDialogue();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Troubleshooting / FAQ
|
||||
- Interaction doesn’t fire:
|
||||
- Confirm `Interactable` is active and not in cooldown or already completed (`isOneTime`).
|
||||
- Ensure `CharacterMoveToTarget` exists for the selected `CharacterToInteract`.
|
||||
- Actions not running:
|
||||
- Verify `respondToEvents` includes the lifecycle moment you expect.
|
||||
- Check that the component sits under the same hierarchy so it registers with the `Interactable`.
|
||||
- Timeline never finishes:
|
||||
- Make sure `InteractionTimelineAction` has valid `PlayableAsset` entries and binding flags.
|
||||
- Double triggers:
|
||||
- Guard reentry in your actions or check `_interactionInProgress` usage in `Interactable` by following logs.
|
||||
|
||||
## Paths & Namespaces
|
||||
- Scripts: `Assets/Scripts/Interactions/`
|
||||
- `Interactable.cs`
|
||||
- `InteractionActionBase.cs`
|
||||
- `InteractionTimelineAction.cs`
|
||||
- `InteractionEventType.cs`
|
||||
- `InteractionRequirementBase.cs`
|
||||
- Editor tooling: `Assets/Editor/InteractableEditor.cs`
|
||||
- Primary namespace: `Interactions`
|
||||
|
||||
## Additional Editor Visuals
|
||||
- Timeline mapping configuration UI:
|
||||
|
||||

|
||||
|
||||
- Unity Timeline editor when authoring cinematics for interactions:
|
||||
|
||||

|
||||
|
||||
- Example target placement in Scene view:
|
||||
|
||||

|
||||
|
||||
## Change Log
|
||||
- v1.1: Added Table of Contents, code-first snippets, case studies, standardized inline code references, preserved existing editor images, and added troubleshooting/paths.
|
||||
- v1.0: Original overview and setup guide.
|
||||
BIN
docs/media/character_move_target_setup.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
docs/media/interactable_base_inspector.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/media/interactable_editor_debug.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
docs/media/interactable_editor_edit.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
docs/media/interactable_event_configuration_example.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
docs/media/interactable_events_inspector.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
docs/media/item_slot_events.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/media/item_slot_inspector.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
docs/media/movement_target_gizmos.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/media/oneclick_inspector.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
docs/media/pickup_inspector.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
docs/media/pickup_item_data_inspector.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docs/media/puzzle_editor_debug.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
docs/media/puzzle_editor_edit.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
docs/media/puzzle_step_integration.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/media/slot_item_config_settings.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
docs/media/timeline_mapping_element.png
Normal file
|
After Width: | Height: | Size: 40 KiB |