Compare commits
24 Commits
integratio
...
minigame_e
| Author | SHA1 | Date | |
|---|---|---|---|
| ec1a0e70aa | |||
| 46950aa877 | |||
| ae6b995f45 | |||
| b0e44f156e | |||
| bb3c91ec94 | |||
| 8326f03086 | |||
|
|
2942b22c62 | ||
|
|
38f578c56a | ||
|
|
ef3b50b99f | ||
|
|
af5dfbb7a2 | ||
| 46755fecb3 | |||
| 2ec5c3d855 | |||
| 40c3867d29 | |||
| d110616907 | |||
| 31f2ce338d | |||
| 24f5228003 | |||
| 8b3c9a09cb | |||
|
|
6a24330ea0 | ||
| 81723a3cdb | |||
| 70a14e5a84 | |||
|
|
a455e34ed0 | ||
|
|
75be338065 | ||
|
|
bcc6f05058 | ||
| 2c56d0e1de |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -99,3 +99,8 @@ InitTestScene*.unity*
|
||||
|
||||
# Auto-generated scenes by play mode tests
|
||||
/[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*
|
||||
.idea/.idea.AppleHillsProduction/.idea/indexLayout.xml
|
||||
.vscode/extensions.json
|
||||
.vscode/launch.json
|
||||
.vscode/settings.json
|
||||
.idea/.idea.AppleHillsProduction/.idea/indexLayout.xml
|
||||
|
||||
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: 6f3207429a65b3e4b83935ac19791077
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: c0cf00979528ae95d3583c572e4eb343
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
|
||||
@@ -11,6 +11,9 @@ AnimatorStateTransition:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsTalking
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 8246786244015671829}
|
||||
m_Solo: 0
|
||||
@@ -58,7 +61,7 @@ AnimatorState:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: ANIM_Annelise_Camera_TakePhoto
|
||||
m_Speed: 1
|
||||
m_Speed: 5
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 72347323649537359}
|
||||
@@ -74,7 +77,7 @@ AnimatorState:
|
||||
m_TimeParameterActive: 0
|
||||
m_Motion: {fileID: 7400000, guid: 10efbd38167aad04298e975a0f5a5b03, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_SpeedParameter: speed
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
@@ -90,8 +93,8 @@ AnimatorStateTransition:
|
||||
m_ConditionEvent: IsTalking
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.01
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -209390523250253645}
|
||||
m_Solo: 0
|
||||
@@ -144,12 +147,6 @@ AnimatorController:
|
||||
m_Name: Annelise_Camera
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters:
|
||||
- m_Name: Speed
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: TakePhoto
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
@@ -162,6 +159,12 @@ AnimatorController:
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: speed
|
||||
m_Type: 1
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
@@ -184,8 +187,8 @@ AnimatorStateTransition:
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -209390523250253645}
|
||||
m_Solo: 0
|
||||
@@ -212,8 +215,8 @@ AnimatorStateTransition:
|
||||
m_ConditionEvent: IsTalking
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.01
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 6759965249582913303}
|
||||
m_Solo: 0
|
||||
@@ -267,13 +270,13 @@ AnimatorStateMachine:
|
||||
m_Position: {x: 40, y: 270, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -209390523250253645}
|
||||
m_Position: {x: 50, y: 420, z: 0}
|
||||
m_Position: {x: 40, y: 540, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -4318263607971929773}
|
||||
m_Position: {x: 330, y: 340, z: 0}
|
||||
m_Position: {x: 190, y: 410, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 8246786244015671829}
|
||||
m_Position: {x: -240, y: 390, z: 0}
|
||||
m_Position: {x: -100, y: 410, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
@@ -293,8 +296,8 @@ AnimatorStateTransition:
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 3
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.1
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -209390523250253645}
|
||||
m_Solo: 0
|
||||
@@ -318,8 +321,8 @@ AnimatorStateTransition:
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.01
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 6759965249582913303}
|
||||
m_Solo: 0
|
||||
@@ -425,8 +428,8 @@ AnimatorStateTransition:
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 4
|
||||
m_ConditionEvent: Speed
|
||||
m_EventTreshold: 0.1
|
||||
m_ConditionEvent: speed
|
||||
m_EventTreshold: 0.01
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 6759965249582913303}
|
||||
m_Solo: 0
|
||||
|
||||
@@ -45,7 +45,7 @@ AnimatorStateMachine:
|
||||
m_Position: {x: -120, y: 440, z: 0}
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: -4345756845471828943}
|
||||
m_Position: {x: 200, y: 420, z: 0}
|
||||
m_Position: {x: 230, y: 440, z: 0}
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
@@ -68,6 +68,7 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 2668893367386582248}
|
||||
- {fileID: 5345143784295595667}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
@@ -95,6 +96,7 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: -2076711753281386268}
|
||||
- {fileID: 3331597516917425559}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
@@ -250,3 +252,53 @@ AnimatorStateTransition:
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &3331597516917425559
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: IsScared?
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -4517652540075123250}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.16666669
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &5345143784295595667
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: IsScared?
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -4345756845471828943}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.16666669
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,194 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1021fffcba2a03d40ae5371555089a22
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 7766407121562134464
|
||||
second: monster_head1_0
|
||||
- first:
|
||||
213: -9125130289615156199
|
||||
second: monster_head1_1
|
||||
- first:
|
||||
213: -3901095240998639361
|
||||
second: monster_head1_2
|
||||
- first:
|
||||
213: 8247604547213676640
|
||||
second: monster_head1_3
|
||||
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: 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: WebGL
|
||||
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: monster_head1_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 10
|
||||
y: 5
|
||||
width: 246
|
||||
height: 345
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 91cc45e39560d5180800000000000000
|
||||
internalID: -9125130289615156199
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: e64f2633c5a06984296cf655c4c0de04
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
monster_head1_0: 7766407121562134464
|
||||
monster_head1_1: -9125130289615156199
|
||||
monster_head1_2: -3901095240998639361
|
||||
monster_head1_3: 8247604547213676640
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,190 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9ac6c3e349f9b247a0ea03665da57ce
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -7812277834941893986
|
||||
second: monster_head2_0
|
||||
- first:
|
||||
213: 8776893643225885828
|
||||
second: monster_head2_1
|
||||
- first:
|
||||
213: -1611368835902351828
|
||||
second: monster_head2_2
|
||||
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: 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: WebGL
|
||||
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: monster_head2_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 31
|
||||
y: 0
|
||||
width: 200
|
||||
height: 275
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: e9271a943b6359390800000000000000
|
||||
internalID: -7812277834941893986
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 53b458ab419e36f47a2f4e7800de67d7
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
monster_head2_0: -7812277834941893986
|
||||
monster_head2_1: 8776893643225885828
|
||||
monster_head2_2: -1611368835902351828
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,190 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1043ceca06eb2ac48b22c20d281278b0
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 4139348639081821586
|
||||
second: monster_head3_0
|
||||
- first:
|
||||
213: 2144489520682081444
|
||||
second: monster_head3_1
|
||||
- first:
|
||||
213: 6575383119194002169
|
||||
second: monster_head3_2
|
||||
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: 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: WebGL
|
||||
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: monster_head3_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 29
|
||||
y: 0
|
||||
width: 199
|
||||
height: 286
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 295f7f1f7abe17930800000000000000
|
||||
internalID: 4139348639081821586
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: c24627f1ff7adbc498117b1ab2dc914c
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
monster_head3_0: 4139348639081821586
|
||||
monster_head3_1: 2144489520682081444
|
||||
monster_head3_2: 6575383119194002169
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,190 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c85ce41979ed896429c62330c546d3ce
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -3471612407960728276
|
||||
second: monster_head4_0
|
||||
- first:
|
||||
213: 7033164403599601001
|
||||
second: monster_head4_1
|
||||
- first:
|
||||
213: -8127244325322508915
|
||||
second: monster_head4_2
|
||||
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: 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: WebGL
|
||||
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: monster_head4_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 21
|
||||
y: 0
|
||||
width: 221
|
||||
height: 278
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: c2d89a988ea52dfc0800000000000000
|
||||
internalID: -3471612407960728276
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: dd6e5478aaac282458b9f8d39a624aca
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
monster_head4_0: -3471612407960728276
|
||||
monster_head4_1: 7033164403599601001
|
||||
monster_head4_2: -8127244325322508915
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 101 KiB |
@@ -0,0 +1,325 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 464f70d7647a22a4aa688ffc2b6654cc
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -4444670910754578914
|
||||
second: LawnMowerMovingPLACEHOLDER_0
|
||||
- first:
|
||||
213: 6348190279078284696
|
||||
second: LawnMowerMovingPLACEHOLDER_1
|
||||
- first:
|
||||
213: 5233908553689211412
|
||||
second: LawnMowerMovingPLACEHOLDER_2
|
||||
- first:
|
||||
213: -877913300417174042
|
||||
second: LawnMowerMovingPLACEHOLDER_3
|
||||
- first:
|
||||
213: 7052581180763600252
|
||||
second: LawnMowerMovingPLACEHOLDER_4
|
||||
- first:
|
||||
213: 4839952163610979709
|
||||
second: LawnMowerMovingPLACEHOLDER_5
|
||||
- first:
|
||||
213: -5099098398506052249
|
||||
second: LawnMowerMovingPLACEHOLDER_6
|
||||
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: 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: WebGL
|
||||
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: LawnMowerMovingPLACEHOLDER_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 24
|
||||
y: 13
|
||||
width: 569
|
||||
height: 380
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: e1e16f40b5b5152c0800000000000000
|
||||
internalID: -4444670910754578914
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: LawnMowerMovingPLACEHOLDER_1
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 415
|
||||
y: 7
|
||||
width: 16
|
||||
height: 20
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 89d8c07bc6d491850800000000000000
|
||||
internalID: 6348190279078284696
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: LawnMowerMovingPLACEHOLDER_2
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 632
|
||||
y: 13
|
||||
width: 569
|
||||
height: 380
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 4122681691492a840800000000000000
|
||||
internalID: 5233908553689211412
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: LawnMowerMovingPLACEHOLDER_3
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1013
|
||||
y: 12
|
||||
width: 24
|
||||
height: 24
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 6e52b01318601d3f0800000000000000
|
||||
internalID: -877913300417174042
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: LawnMowerMovingPLACEHOLDER_4
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1239
|
||||
y: 13
|
||||
width: 569
|
||||
height: 380
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: c75f40db73dcfd160800000000000000
|
||||
internalID: 7052581180763600252
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: LawnMowerMovingPLACEHOLDER_5
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 1861
|
||||
y: 12
|
||||
width: 569
|
||||
height: 380
|
||||
alignment: 9
|
||||
pivot: {x: 0.5, y: 0.2}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: d7d6ae189d6fa2340800000000000000
|
||||
internalID: 4839952163610979709
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
- serializedVersion: 2
|
||||
name: LawnMowerMovingPLACEHOLDER_6
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 2242
|
||||
y: 11
|
||||
width: 24
|
||||
height: 24
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 7659842d50d5c39b0800000000000000
|
||||
internalID: -5099098398506052249
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 3d4135416001629439aa7297ef718481
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
LawnMowerMovingPLACEHOLDER_0: -4444670910754578914
|
||||
LawnMowerMovingPLACEHOLDER_1: 6348190279078284696
|
||||
LawnMowerMovingPLACEHOLDER_2: 5233908553689211412
|
||||
LawnMowerMovingPLACEHOLDER_3: -877913300417174042
|
||||
LawnMowerMovingPLACEHOLDER_4: 7052581180763600252
|
||||
LawnMowerMovingPLACEHOLDER_5: 4839952163610979709
|
||||
LawnMowerMovingPLACEHOLDER_6: -5099098398506052249
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: LawnMowerMovingPLACEHOLDER
|
||||
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AlphaTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 464f70d7647a22a4aa688ffc2b6654cc, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- PixelSnap: 0
|
||||
- _EnableExternalAlpha: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cba74e1bf006eed439d8cc2938aeddf1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Art/Textures/DivingBackground.png
Normal file
BIN
Assets/Art/Textures/DivingBackground.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
195
Assets/Art/Textures/DivingBackground.png.meta
Normal file
195
Assets/Art/Textures/DivingBackground.png.meta
Normal file
@@ -0,0 +1,195 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad9b785acb09cb247ae2c8cd895863de
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: 5958968447627082961
|
||||
second: DivingBackground_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: 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: WebGL
|
||||
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: DivingBackground_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1080
|
||||
height: 1981
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 1dcb29c2b3282b250800000000000000
|
||||
internalID: 5958968447627082961
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
DivingBackground_0: 5958968447627082961
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/Editor/DivingGameManagerEditor.cs
Normal file
48
Assets/Editor/DivingGameManagerEditor.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Minigames.DivingForPictures;
|
||||
|
||||
/// <summary>
|
||||
/// Custom editor for DivingGameManager that adds runtime buttons for testing surfacing and other functionality
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(DivingGameManager))]
|
||||
public class DivingGameManagerEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
// Draw the default inspector
|
||||
DrawDefaultInspector();
|
||||
|
||||
// Get the target DivingGameManager
|
||||
DivingGameManager manager = (DivingGameManager)target;
|
||||
|
||||
// Add space between default inspector and custom buttons
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// Separator line
|
||||
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||
|
||||
// Add a label for the runtime testing section
|
||||
EditorGUILayout.LabelField("Runtime Testing", EditorStyles.boldLabel);
|
||||
|
||||
// Only enable the buttons during play mode
|
||||
EditorGUI.BeginDisabledGroup(!Application.isPlaying);
|
||||
|
||||
// Add the button to call StartSurfacing
|
||||
if (GUILayout.Button("Start Surfacing", GUILayout.Height(30)))
|
||||
{
|
||||
manager.StartSurfacing();
|
||||
}
|
||||
|
||||
// Add a button for breaking a rope (for testing damage)
|
||||
if (GUILayout.Button("Break Rope (Test Damage)", GUILayout.Height(30)))
|
||||
{
|
||||
manager.ForceBreakRope();
|
||||
}
|
||||
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
// Add explanatory text
|
||||
EditorGUILayout.HelpBox("These buttons only work in Play Mode. 'Start Surfacing' will reverse the trench direction, slow bubbles, and reverse obstacles. 'Break Rope' simulates player taking damage.", MessageType.Info);
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/DivingGameManagerEditor.cs.meta
Normal file
3
Assets/Editor/DivingGameManagerEditor.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8bbb340d8d9b4af581770757e86cc1f8
|
||||
timeCreated: 1758532258
|
||||
776
Assets/Editor/PrefabVariantGeneratorWindow.cs
Normal file
776
Assets/Editor/PrefabVariantGeneratorWindow.cs
Normal file
@@ -0,0 +1,776 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Editor
|
||||
{
|
||||
public class PrefabVariantGeneratorWindow : EditorWindow
|
||||
{
|
||||
// Renderer configuration class to track sprite renderers and their assigned sprites
|
||||
[System.Serializable]
|
||||
private class RendererConfig
|
||||
{
|
||||
public string Path; // Hierarchy path to the renderer
|
||||
public string Name; // Display name for the renderer
|
||||
public SpriteRenderer Renderer; // Reference to the actual renderer
|
||||
public Sprite CurrentSprite; // Current sprite in the renderer
|
||||
public List<Sprite> AssignedSprites = new List<Sprite>(); // Sprites to use for variants
|
||||
public bool Enabled = true; // Whether to include in variant generation
|
||||
public bool Expanded = true; // UI expanded state
|
||||
public Vector2 ScrollPosition; // Scroll position for sprite list
|
||||
}
|
||||
|
||||
// Main fields
|
||||
private GameObject sourcePrefab;
|
||||
private GameObject previousSourcePrefab;
|
||||
private List<RendererConfig> detectedRenderers = new List<RendererConfig>();
|
||||
private Vector2 mainScrollPosition;
|
||||
private string variantSaveFolder = "Assets/Prefabs/Variants";
|
||||
private string namingPattern = "{0}_{1}"; // Default: {0} = prefab name, {1} = first renderer sprite
|
||||
private bool userChangedSavePath = false;
|
||||
private int estimatedVariantCount = 0;
|
||||
private int maxSafeVariantCount = 100; // Warn above this number
|
||||
private GUIStyle boldFoldoutStyle;
|
||||
private bool showDefaultHelp = true;
|
||||
|
||||
// Editor window setup
|
||||
[MenuItem("Tools/Sprite Variant Generator")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<PrefabVariantGeneratorWindow>("Prefab Variant Generator");
|
||||
window.minSize = new Vector2(500, 600);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// Initialize styles on enable to avoid null reference issues
|
||||
boldFoldoutStyle = new GUIStyle(EditorStyles.foldout)
|
||||
{
|
||||
fontStyle = FontStyle.Bold
|
||||
};
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
// Initialize styles if needed
|
||||
if (boldFoldoutStyle == null)
|
||||
{
|
||||
boldFoldoutStyle = new GUIStyle(EditorStyles.foldout)
|
||||
{
|
||||
fontStyle = FontStyle.Bold
|
||||
};
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField("Prefab Variant Generator", EditorStyles.boldLabel);
|
||||
EditorGUILayout.HelpBox("Create multiple prefab variants with different sprites assigned to renderers.", MessageType.Info);
|
||||
|
||||
mainScrollPosition = EditorGUILayout.BeginScrollView(mainScrollPosition);
|
||||
|
||||
// Source Prefab Selection
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Step 1: Select Source Prefab", EditorStyles.boldLabel);
|
||||
|
||||
// Store previous selection to detect changes
|
||||
GameObject newSourcePrefab = (GameObject)EditorGUILayout.ObjectField("Source Prefab", sourcePrefab, typeof(GameObject), false);
|
||||
|
||||
// Check if prefab selection changed
|
||||
if (newSourcePrefab != previousSourcePrefab)
|
||||
{
|
||||
sourcePrefab = newSourcePrefab;
|
||||
previousSourcePrefab = newSourcePrefab;
|
||||
|
||||
// Auto-set save folder to match source prefab's directory if a valid prefab is selected
|
||||
if (sourcePrefab != null && !userChangedSavePath)
|
||||
{
|
||||
string prefabPath = AssetDatabase.GetAssetPath(sourcePrefab);
|
||||
if (!string.IsNullOrEmpty(prefabPath))
|
||||
{
|
||||
variantSaveFolder = Path.GetDirectoryName(prefabPath).Replace("\\", "/");
|
||||
}
|
||||
}
|
||||
|
||||
// Find sprite renderers in the prefab
|
||||
FindRenderersInPrefab();
|
||||
|
||||
// Clear default help once a prefab is selected
|
||||
if (sourcePrefab != null)
|
||||
{
|
||||
showDefaultHelp = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Warn if not a prefab
|
||||
if (sourcePrefab != null && !PrefabUtility.IsPartOfPrefabAsset(sourcePrefab) && !PrefabUtility.IsPartOfPrefabInstance(sourcePrefab))
|
||||
{
|
||||
EditorGUILayout.HelpBox("Please select a prefab asset.", MessageType.Warning);
|
||||
}
|
||||
|
||||
// Display default help if no prefab selected
|
||||
if (showDefaultHelp && sourcePrefab == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox(
|
||||
"This tool lets you create prefab variants with different sprites.\n\n" +
|
||||
"1. Select a source prefab\n" +
|
||||
"2. Assign sprites to each detected sprite renderer\n" +
|
||||
"3. Generate all combinations as prefab variants",
|
||||
MessageType.Info
|
||||
);
|
||||
}
|
||||
|
||||
// Only show the rest if a valid prefab is selected
|
||||
if (sourcePrefab != null)
|
||||
{
|
||||
// Renderer sections
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Step 2: Configure Sprite Renderers", EditorStyles.boldLabel);
|
||||
|
||||
if (detectedRenderers.Count == 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No sprite renderers found in prefab. A new renderer will be created.", MessageType.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox($"{detectedRenderers.Count} sprite renderer{(detectedRenderers.Count > 1 ? "s" : "")} found in prefab.", MessageType.Info);
|
||||
}
|
||||
|
||||
// Display each renderer configuration
|
||||
for (int i = 0; i < detectedRenderers.Count; i++)
|
||||
{
|
||||
DrawRendererSection(detectedRenderers[i], i);
|
||||
}
|
||||
|
||||
// Update estimated variant count
|
||||
UpdateVariantCount();
|
||||
|
||||
// Output settings
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Step 3: Output Settings", EditorStyles.boldLabel);
|
||||
|
||||
// Save folder
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Save Folder");
|
||||
EditorGUILayout.SelectableLabel(variantSaveFolder, EditorStyles.textField, GUILayout.Height(EditorGUIUtility.singleLineHeight));
|
||||
if (GUILayout.Button("Select...", GUILayout.Width(80)))
|
||||
{
|
||||
string newFolder = PrefabEditorUtility.SelectFolder(variantSaveFolder, "Prefabs/Variants");
|
||||
if (newFolder != variantSaveFolder)
|
||||
{
|
||||
variantSaveFolder = newFolder;
|
||||
userChangedSavePath = true; // Mark that user manually changed the path
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Add a reset button if user changed the path and a valid prefab is selected
|
||||
if (userChangedSavePath && sourcePrefab != null)
|
||||
{
|
||||
string prefabPath = AssetDatabase.GetAssetPath(sourcePrefab);
|
||||
if (!string.IsNullOrEmpty(prefabPath))
|
||||
{
|
||||
if (GUILayout.Button("Reset Path to Prefab Directory"))
|
||||
{
|
||||
variantSaveFolder = Path.GetDirectoryName(prefabPath).Replace("\\", "/");
|
||||
userChangedSavePath = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Naming pattern field
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.PrefixLabel("Naming Pattern");
|
||||
namingPattern = EditorGUILayout.TextField(namingPattern);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Help text for naming pattern
|
||||
StringBuilder helpText = new StringBuilder("Naming placeholders:\n");
|
||||
helpText.AppendLine("{0} = Prefab name");
|
||||
for (int i = 0; i < detectedRenderers.Count; i++)
|
||||
{
|
||||
helpText.AppendLine($"{{{i+1}}} = {detectedRenderers[i].Name} sprite name");
|
||||
}
|
||||
EditorGUILayout.HelpBox(helpText.ToString(), MessageType.Info);
|
||||
|
||||
// Variant count display
|
||||
string variantCountText = $"Will generate {estimatedVariantCount} variant{(estimatedVariantCount != 1 ? "s" : "")}";
|
||||
if (estimatedVariantCount > maxSafeVariantCount)
|
||||
{
|
||||
EditorGUILayout.HelpBox($"Warning: {variantCountText}. This might take some time.", MessageType.Warning);
|
||||
}
|
||||
else if (estimatedVariantCount > 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox(variantCountText, MessageType.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("Please assign at least one sprite to each enabled renderer to generate variants.", MessageType.Warning);
|
||||
}
|
||||
|
||||
// Generate button
|
||||
EditorGUILayout.Space();
|
||||
GUI.enabled = estimatedVariantCount > 0;
|
||||
if (GUILayout.Button("Generate Prefab Variants", GUILayout.Height(30)))
|
||||
{
|
||||
// Show warning for large numbers of variants
|
||||
if (estimatedVariantCount > maxSafeVariantCount)
|
||||
{
|
||||
bool proceed = EditorUtility.DisplayDialog(
|
||||
"Generate Many Variants?",
|
||||
$"You are about to generate {estimatedVariantCount} prefab variants. This might take some time and use significant disk space. Continue?",
|
||||
"Generate",
|
||||
"Cancel"
|
||||
);
|
||||
|
||||
if (!proceed) return;
|
||||
}
|
||||
|
||||
GeneratePrefabVariants();
|
||||
}
|
||||
GUI.enabled = true;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawRendererSection(RendererConfig config, int index)
|
||||
{
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
// Expand/collapse button
|
||||
config.Expanded = EditorGUILayout.Foldout(config.Expanded, "", boldFoldoutStyle);
|
||||
|
||||
// Enable/disable toggle
|
||||
bool newEnabled = EditorGUILayout.Toggle(config.Enabled, GUILayout.Width(20));
|
||||
if (newEnabled != config.Enabled)
|
||||
{
|
||||
config.Enabled = newEnabled;
|
||||
UpdateVariantCount();
|
||||
}
|
||||
|
||||
// Renderer name/title
|
||||
EditorGUILayout.LabelField(config.Name, EditorStyles.boldLabel);
|
||||
|
||||
// Current sprite preview if available
|
||||
if (config.CurrentSprite != null)
|
||||
{
|
||||
GUILayout.Box(
|
||||
AssetPreview.GetAssetPreview(config.CurrentSprite),
|
||||
GUILayout.Width(40),
|
||||
GUILayout.Height(40)
|
||||
);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Only show contents if expanded
|
||||
if (config.Expanded)
|
||||
{
|
||||
// Path display
|
||||
if (!string.IsNullOrEmpty(config.Path))
|
||||
{
|
||||
EditorGUILayout.LabelField($"Path: {config.Path}", EditorStyles.miniLabel);
|
||||
}
|
||||
|
||||
EditorGUI.BeginDisabledGroup(!config.Enabled);
|
||||
|
||||
// Sprite selection controls
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
// Drag and drop area for sprites
|
||||
EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Height(60));
|
||||
EditorGUILayout.LabelField("Drag and drop sprites here", EditorStyles.centeredGreyMiniLabel);
|
||||
|
||||
Rect dropArea = GUILayoutUtility.GetRect(0, 40, GUILayout.ExpandWidth(true));
|
||||
HandleDragAndDrop(dropArea, config);
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
if (GUILayout.Button("Add Selected", GUILayout.Width(100), GUILayout.Height(60)))
|
||||
{
|
||||
AddSelectedSpritesToConfig(config);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (GUILayout.Button("Clear Sprites"))
|
||||
{
|
||||
config.AssignedSprites.Clear();
|
||||
UpdateVariantCount();
|
||||
}
|
||||
|
||||
// Display selected sprites
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField($"Selected Sprites ({config.AssignedSprites.Count}):", EditorStyles.miniBoldLabel);
|
||||
|
||||
// Sprite list
|
||||
config.ScrollPosition = EditorGUILayout.BeginScrollView(config.ScrollPosition, GUILayout.Height(120));
|
||||
for (int i = config.AssignedSprites.Count - 1; i >= 0; i--)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
config.AssignedSprites[i] = (Sprite)EditorGUILayout.ObjectField(
|
||||
config.AssignedSprites[i],
|
||||
typeof(Sprite),
|
||||
false,
|
||||
GUILayout.ExpandWidth(true)
|
||||
);
|
||||
|
||||
// Preview sprite
|
||||
if (config.AssignedSprites[i] != null)
|
||||
{
|
||||
GUILayout.Box(
|
||||
AssetPreview.GetAssetPreview(config.AssignedSprites[i]),
|
||||
GUILayout.Width(40),
|
||||
GUILayout.Height(40)
|
||||
);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Remove", GUILayout.Width(60)))
|
||||
{
|
||||
config.AssignedSprites.RemoveAt(i);
|
||||
UpdateVariantCount();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void HandleDragAndDrop(Rect dropArea, RendererConfig config)
|
||||
{
|
||||
Event evt = Event.current;
|
||||
switch (evt.type)
|
||||
{
|
||||
case EventType.DragUpdated:
|
||||
case EventType.DragPerform:
|
||||
if (!dropArea.Contains(evt.mousePosition))
|
||||
break;
|
||||
|
||||
DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
|
||||
|
||||
if (evt.type == EventType.DragPerform)
|
||||
{
|
||||
DragAndDrop.AcceptDrag();
|
||||
bool added = false;
|
||||
|
||||
foreach (var draggedObject in DragAndDrop.objectReferences)
|
||||
{
|
||||
if (draggedObject is Sprite sprite)
|
||||
{
|
||||
if (!config.AssignedSprites.Contains(sprite))
|
||||
{
|
||||
config.AssignedSprites.Add(sprite);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
else if (draggedObject is Texture2D texture)
|
||||
{
|
||||
// Try to get sprites from texture
|
||||
string texturePath = AssetDatabase.GetAssetPath(texture);
|
||||
var sprites = AssetDatabase.LoadAllAssetsAtPath(texturePath)
|
||||
.OfType<Sprite>()
|
||||
.ToArray();
|
||||
|
||||
foreach (var s in sprites)
|
||||
{
|
||||
if (!config.AssignedSprites.Contains(s))
|
||||
{
|
||||
config.AssignedSprites.Add(s);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (added)
|
||||
{
|
||||
UpdateVariantCount();
|
||||
}
|
||||
|
||||
evt.Use();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddSelectedSpritesToConfig(RendererConfig config)
|
||||
{
|
||||
var selectedObjects = Selection.objects;
|
||||
bool added = false;
|
||||
|
||||
foreach (var obj in selectedObjects)
|
||||
{
|
||||
if (obj is Sprite sprite)
|
||||
{
|
||||
if (!config.AssignedSprites.Contains(sprite))
|
||||
{
|
||||
config.AssignedSprites.Add(sprite);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
else if (obj is Texture2D texture)
|
||||
{
|
||||
// Try to get sprites from texture
|
||||
string texturePath = AssetDatabase.GetAssetPath(texture);
|
||||
var sprites = AssetDatabase.LoadAllAssetsAtPath(texturePath)
|
||||
.OfType<Sprite>()
|
||||
.ToArray();
|
||||
|
||||
foreach (var s in sprites)
|
||||
{
|
||||
if (!config.AssignedSprites.Contains(s))
|
||||
{
|
||||
config.AssignedSprites.Add(s);
|
||||
added = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (added)
|
||||
{
|
||||
UpdateVariantCount();
|
||||
}
|
||||
}
|
||||
|
||||
private void FindRenderersInPrefab()
|
||||
{
|
||||
detectedRenderers.Clear();
|
||||
|
||||
if (sourcePrefab == null) return;
|
||||
|
||||
// Get all renderers in prefab (including children)
|
||||
GameObject instance = null;
|
||||
|
||||
try
|
||||
{
|
||||
instance = (GameObject)PrefabUtility.InstantiatePrefab(sourcePrefab);
|
||||
SpriteRenderer[] renderers = instance.GetComponentsInChildren<SpriteRenderer>(true);
|
||||
|
||||
for (int i = 0; i < renderers.Length; i++)
|
||||
{
|
||||
var renderer = renderers[i];
|
||||
string path = GetRelativePath(instance.transform, renderer.transform);
|
||||
string name = renderer.gameObject.name;
|
||||
|
||||
// For root object, use "Main"
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
name = "Main";
|
||||
}
|
||||
// For objects with the same name, add index
|
||||
else if (renderers.Count(r => r.gameObject.name == renderer.gameObject.name) > 1)
|
||||
{
|
||||
name = $"{name} ({i+1})";
|
||||
}
|
||||
|
||||
detectedRenderers.Add(new RendererConfig
|
||||
{
|
||||
Path = path,
|
||||
Name = name,
|
||||
Renderer = renderer,
|
||||
CurrentSprite = renderer.sprite,
|
||||
AssignedSprites = renderer.sprite != null ?
|
||||
new List<Sprite> { renderer.sprite } :
|
||||
new List<Sprite>()
|
||||
});
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (instance != null)
|
||||
DestroyImmediate(instance);
|
||||
}
|
||||
|
||||
// If no renderers found, create a default entry
|
||||
if (detectedRenderers.Count == 0)
|
||||
{
|
||||
detectedRenderers.Add(new RendererConfig
|
||||
{
|
||||
Path = "",
|
||||
Name = "Main",
|
||||
Renderer = null,
|
||||
CurrentSprite = null,
|
||||
AssignedSprites = new List<Sprite>()
|
||||
});
|
||||
}
|
||||
|
||||
UpdateVariantCount();
|
||||
}
|
||||
|
||||
private string GetRelativePath(Transform root, Transform target)
|
||||
{
|
||||
if (target == root) return "";
|
||||
|
||||
string path = target.name;
|
||||
Transform parent = target.parent;
|
||||
|
||||
while (parent != null && parent != root)
|
||||
{
|
||||
path = parent.name + "/" + path;
|
||||
parent = parent.parent;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
private void UpdateVariantCount()
|
||||
{
|
||||
// Calculate estimated variants
|
||||
estimatedVariantCount = 0;
|
||||
|
||||
// Get only enabled renderers with at least one sprite
|
||||
var enabledConfigs = detectedRenderers
|
||||
.Where(r => r.Enabled && r.AssignedSprites.Count > 0)
|
||||
.ToList();
|
||||
|
||||
if (enabledConfigs.Count > 0)
|
||||
{
|
||||
// Start with count of first renderer's sprites
|
||||
estimatedVariantCount = enabledConfigs[0].AssignedSprites.Count;
|
||||
|
||||
// Multiply by subsequent renderers' sprite counts
|
||||
for (int i = 1; i < enabledConfigs.Count; i++)
|
||||
{
|
||||
estimatedVariantCount *= enabledConfigs[i].AssignedSprites.Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<List<Sprite>> GenerateAllCombinations()
|
||||
{
|
||||
var enabledConfigs = detectedRenderers
|
||||
.Where(r => r.Enabled && r.AssignedSprites.Count > 0)
|
||||
.ToList();
|
||||
|
||||
if (enabledConfigs.Count == 0)
|
||||
return new List<List<Sprite>>();
|
||||
|
||||
// Initialize with first renderer's sprites
|
||||
var combinations = enabledConfigs[0].AssignedSprites
|
||||
.Select(s => new List<Sprite> { s })
|
||||
.ToList();
|
||||
|
||||
// Add each subsequent renderer's sprites
|
||||
for (int i = 1; i < enabledConfigs.Count; i++)
|
||||
{
|
||||
var newCombinations = new List<List<Sprite>>();
|
||||
foreach (var combo in combinations)
|
||||
{
|
||||
foreach (var sprite in enabledConfigs[i].AssignedSprites)
|
||||
{
|
||||
var newCombo = new List<Sprite>(combo) { sprite };
|
||||
newCombinations.Add(newCombo);
|
||||
}
|
||||
}
|
||||
combinations = newCombinations;
|
||||
}
|
||||
|
||||
return combinations;
|
||||
}
|
||||
|
||||
private void GeneratePrefabVariants()
|
||||
{
|
||||
if (sourcePrefab == null)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Error", "Please select a source prefab.", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get enabled renderer configurations
|
||||
var enabledConfigs = detectedRenderers
|
||||
.Where(r => r.Enabled && r.AssignedSprites.Count > 0)
|
||||
.ToList();
|
||||
|
||||
if (enabledConfigs.Count == 0)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Error", "Please assign at least one sprite to a renderer.", "OK");
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure the save folder exists
|
||||
EnsureFolderExists(variantSaveFolder);
|
||||
|
||||
// Generate all sprite combinations
|
||||
var combinations = GenerateAllCombinations();
|
||||
|
||||
string sourcePrefabPath = AssetDatabase.GetAssetPath(sourcePrefab);
|
||||
string prefabName = Path.GetFileNameWithoutExtension(sourcePrefabPath);
|
||||
int successCount = 0;
|
||||
|
||||
// Show progress bar
|
||||
EditorUtility.DisplayProgressBar("Generating Prefab Variants", "Preparing...", 0f);
|
||||
|
||||
try
|
||||
{
|
||||
// For each combination, create a prefab variant
|
||||
for (int i = 0; i < combinations.Count; i++)
|
||||
{
|
||||
// Update progress
|
||||
if (i % 5 == 0 || i == combinations.Count - 1)
|
||||
{
|
||||
float progress = (float)i / combinations.Count;
|
||||
if (EditorUtility.DisplayCancelableProgressBar(
|
||||
"Generating Prefab Variants",
|
||||
$"Creating variant {i+1} of {combinations.Count}",
|
||||
progress))
|
||||
{
|
||||
// User canceled
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var combination = combinations[i];
|
||||
|
||||
// Generate variant name
|
||||
string variantName = prefabName;
|
||||
string[] spriteNames = new string[combination.Count];
|
||||
|
||||
for (int j = 0; j < combination.Count; j++)
|
||||
{
|
||||
spriteNames[j] = combination[j].name;
|
||||
}
|
||||
|
||||
// Format with the naming pattern
|
||||
object[] formatArgs = new object[spriteNames.Length + 1];
|
||||
formatArgs[0] = prefabName;
|
||||
for (int j = 0; j < spriteNames.Length; j++)
|
||||
{
|
||||
formatArgs[j + 1] = spriteNames[j];
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
variantName = string.Format(namingPattern, formatArgs);
|
||||
}
|
||||
catch (System.FormatException)
|
||||
{
|
||||
// Fallback if format fails
|
||||
variantName = $"{prefabName}_{string.Join("_", spriteNames)}";
|
||||
}
|
||||
|
||||
variantName = PrefabEditorUtility.SanitizeFileName(variantName);
|
||||
string variantPath = Path.Combine(variantSaveFolder, variantName + ".prefab").Replace("\\", "/");
|
||||
|
||||
// Create the prefab variant
|
||||
GameObject prefabInstance = (GameObject)PrefabUtility.InstantiatePrefab(sourcePrefab);
|
||||
|
||||
try
|
||||
{
|
||||
// Apply sprites to renderers
|
||||
for (int j = 0; j < enabledConfigs.Count; j++)
|
||||
{
|
||||
SpriteRenderer renderer = null;
|
||||
|
||||
// Find the corresponding renderer in the instance
|
||||
if (string.IsNullOrEmpty(enabledConfigs[j].Path))
|
||||
{
|
||||
// Root object
|
||||
renderer = prefabInstance.GetComponent<SpriteRenderer>();
|
||||
if (renderer == null)
|
||||
{
|
||||
renderer = prefabInstance.AddComponent<SpriteRenderer>();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Child object
|
||||
Transform child = prefabInstance.transform.Find(enabledConfigs[j].Path);
|
||||
if (child != null)
|
||||
{
|
||||
renderer = child.GetComponent<SpriteRenderer>();
|
||||
}
|
||||
}
|
||||
|
||||
// Apply sprite if renderer was found
|
||||
if (renderer != null)
|
||||
{
|
||||
renderer.sprite = combination[j];
|
||||
}
|
||||
}
|
||||
|
||||
// Create the prefab variant
|
||||
GameObject prefabVariant = PrefabUtility.SaveAsPrefabAsset(prefabInstance, variantPath);
|
||||
|
||||
if (prefabVariant != null)
|
||||
{
|
||||
successCount++;
|
||||
}
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError($"Error creating prefab variant: {e.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Clean up the instance
|
||||
DestroyImmediate(prefabInstance);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
if (successCount > 0)
|
||||
{
|
||||
EditorUtility.DisplayDialog(
|
||||
"Prefab Variants Created",
|
||||
$"Successfully created {successCount} prefab variants in {variantSaveFolder}.",
|
||||
"OK"
|
||||
);
|
||||
|
||||
// Open the folder in Project view
|
||||
var folderObject = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(variantSaveFolder);
|
||||
if (folderObject != null)
|
||||
{
|
||||
Selection.activeObject = folderObject;
|
||||
EditorGUIUtility.PingObject(folderObject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorUtility.DisplayDialog(
|
||||
"Prefab Variants",
|
||||
"No prefab variants were created. Please check the console for errors.",
|
||||
"OK"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsureFolderExists(string folderPath)
|
||||
{
|
||||
if (!AssetDatabase.IsValidFolder(folderPath))
|
||||
{
|
||||
string[] folderParts = folderPath.Split('/');
|
||||
string currentPath = folderParts[0];
|
||||
|
||||
for (int i = 1; i < folderParts.Length; i++)
|
||||
{
|
||||
string folderName = folderParts[i];
|
||||
string newPath = Path.Combine(currentPath, folderName);
|
||||
|
||||
if (!AssetDatabase.IsValidFolder(newPath))
|
||||
{
|
||||
AssetDatabase.CreateFolder(currentPath, folderName);
|
||||
}
|
||||
|
||||
currentPath = newPath;
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/PrefabVariantGeneratorWindow.cs.meta
Normal file
3
Assets/Editor/PrefabVariantGeneratorWindow.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b49d63944914b3b87e5f6112aee72ca
|
||||
timeCreated: 1758278821
|
||||
42
Assets/Editor/TrenchTileSpawnerEditor.cs
Normal file
42
Assets/Editor/TrenchTileSpawnerEditor.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Minigames.DivingForPictures;
|
||||
|
||||
/// <summary>
|
||||
/// Custom editor for TrenchTileSpawner that adds a runtime button to test the StartSurfacing function
|
||||
/// </summary>
|
||||
[CustomEditor(typeof(TrenchTileSpawner))]
|
||||
public class TrenchTileSpawnerEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
// Draw the default inspector
|
||||
DrawDefaultInspector();
|
||||
|
||||
// Get the target TrenchTileSpawner
|
||||
TrenchTileSpawner spawner = (TrenchTileSpawner)target;
|
||||
|
||||
// Add space between default inspector and custom button
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// Separator line
|
||||
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||
|
||||
// Add a label for the runtime testing section
|
||||
EditorGUILayout.LabelField("Runtime Testing", EditorStyles.boldLabel);
|
||||
|
||||
// Only enable the button during play mode
|
||||
EditorGUI.BeginDisabledGroup(!Application.isPlaying);
|
||||
|
||||
// Add the button to call StartSurfacing
|
||||
if (GUILayout.Button("Start Surfacing", GUILayout.Height(30)))
|
||||
{
|
||||
spawner.StartSurfacing();
|
||||
}
|
||||
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
// Add explanatory text
|
||||
EditorGUILayout.HelpBox("This button will reverse the direction of the trench movement, making the player surface instead of descend. Only works in Play Mode.", MessageType.Info);
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/TrenchTileSpawnerEditor.cs.meta
Normal file
3
Assets/Editor/TrenchTileSpawnerEditor.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fb1a138e45d4720ba5c95da894b4491
|
||||
timeCreated: 1758531024
|
||||
3
Assets/Editor/Utilities.meta
Normal file
3
Assets/Editor/Utilities.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b28cee1553b4a15aa1c3be950983fee
|
||||
timeCreated: 1758016486
|
||||
227
Assets/Editor/Utilities/BatchComponentAdder.cs
Normal file
227
Assets/Editor/Utilities/BatchComponentAdder.cs
Normal file
@@ -0,0 +1,227 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Editor.Utilities
|
||||
{
|
||||
public class BatchComponentAdder : EditorWindow
|
||||
{
|
||||
private Vector2 scrollPosition;
|
||||
private List<GameObject> selectedPrefabs = new List<GameObject>();
|
||||
private string searchText = "";
|
||||
private List<Type> availableComponentTypes = new List<Type>();
|
||||
private List<Type> filteredComponentTypes = new List<Type>();
|
||||
private int selectedComponentIndex = -1;
|
||||
private bool showScriptsOnly = true;
|
||||
private bool showBuiltInComponents = false;
|
||||
|
||||
[MenuItem("Tools/Batch Component Adder")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
GetWindow<BatchComponentAdder>("Batch Component Adder");
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// Get all component types when the window is opened
|
||||
RefreshComponentTypes();
|
||||
}
|
||||
|
||||
private void RefreshComponentTypes()
|
||||
{
|
||||
// Get all types that derive from Component
|
||||
availableComponentTypes = AppDomain.CurrentDomain.GetAssemblies()
|
||||
.SelectMany(assembly => assembly.GetTypes())
|
||||
.Where(type => type.IsSubclassOf(typeof(Component)) && !type.IsAbstract)
|
||||
.OrderBy(type => type.Name)
|
||||
.ToList();
|
||||
|
||||
// Apply initial filtering
|
||||
FilterComponentTypes();
|
||||
}
|
||||
|
||||
private void FilterComponentTypes()
|
||||
{
|
||||
filteredComponentTypes = availableComponentTypes
|
||||
.Where(type => {
|
||||
if (!showBuiltInComponents && type.Namespace != null && type.Namespace.StartsWith("UnityEngine"))
|
||||
return false;
|
||||
|
||||
if (showScriptsOnly && type.Namespace != null && type.Namespace.StartsWith("UnityEngine"))
|
||||
return false;
|
||||
|
||||
if (!string.IsNullOrEmpty(searchText))
|
||||
return type.Name.ToLower().Contains(searchText.ToLower());
|
||||
|
||||
return true;
|
||||
})
|
||||
.ToList();
|
||||
|
||||
// Reset selection if it's no longer valid
|
||||
if (selectedComponentIndex >= filteredComponentTypes.Count)
|
||||
selectedComponentIndex = -1;
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.BeginVertical();
|
||||
|
||||
EditorGUILayout.LabelField("Batch Component Adder", EditorStyles.boldLabel);
|
||||
EditorGUILayout.HelpBox("Select multiple prefabs, choose a component type, and add it to the root of all selected prefabs.", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Prefab selection section
|
||||
EditorGUILayout.LabelField("Selected Prefabs", EditorStyles.boldLabel);
|
||||
|
||||
if (GUILayout.Button("Add Selected Assets"))
|
||||
{
|
||||
AddSelectedAssets();
|
||||
}
|
||||
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, GUILayout.Height(150));
|
||||
|
||||
for (int i = 0; i < selectedPrefabs.Count; i++)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
selectedPrefabs[i] = (GameObject)EditorGUILayout.ObjectField(selectedPrefabs[i], typeof(GameObject), false);
|
||||
|
||||
if (GUILayout.Button("X", GUILayout.Width(20)))
|
||||
{
|
||||
selectedPrefabs.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
if (GUILayout.Button("Clear All"))
|
||||
{
|
||||
selectedPrefabs.Clear();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Component selection section
|
||||
EditorGUILayout.LabelField("Component to Add", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
showScriptsOnly = EditorGUILayout.Toggle("Scripts Only", showScriptsOnly);
|
||||
showBuiltInComponents = EditorGUILayout.Toggle("Show Built-in Components", showBuiltInComponents);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
string newSearchText = EditorGUILayout.TextField("Search", searchText);
|
||||
if (newSearchText != searchText)
|
||||
{
|
||||
searchText = newSearchText;
|
||||
FilterComponentTypes();
|
||||
}
|
||||
|
||||
string[] componentNames = filteredComponentTypes.Select(t => t.Name).ToArray();
|
||||
|
||||
selectedComponentIndex = EditorGUILayout.Popup("Component Type", selectedComponentIndex, componentNames);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Validate and add the component
|
||||
GUI.enabled = selectedPrefabs.Count > 0 && selectedComponentIndex >= 0 && selectedComponentIndex < filteredComponentTypes.Count;
|
||||
|
||||
if (GUILayout.Button("Add Component to Prefabs"))
|
||||
{
|
||||
AddComponentToPrefabs();
|
||||
}
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
private void AddSelectedAssets()
|
||||
{
|
||||
UnityEngine.Object[] selectedObjects = Selection.objects;
|
||||
|
||||
foreach (var obj in selectedObjects)
|
||||
{
|
||||
if (obj is GameObject go)
|
||||
{
|
||||
string path = AssetDatabase.GetAssetPath(go);
|
||||
if (!string.IsNullOrEmpty(path) && path.EndsWith(".prefab"))
|
||||
{
|
||||
if (!selectedPrefabs.Contains(go))
|
||||
{
|
||||
selectedPrefabs.Add(go);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddComponentToPrefabs()
|
||||
{
|
||||
if (selectedComponentIndex < 0 || selectedComponentIndex >= filteredComponentTypes.Count)
|
||||
return;
|
||||
|
||||
Type componentType = filteredComponentTypes[selectedComponentIndex];
|
||||
int successCount = 0;
|
||||
List<string> failedPrefabs = new List<string>();
|
||||
|
||||
// For undo operations
|
||||
Undo.RecordObjects(selectedPrefabs.ToArray(), "Add Component To Prefabs");
|
||||
|
||||
foreach (GameObject prefab in selectedPrefabs)
|
||||
{
|
||||
// Skip null entries
|
||||
if (prefab == null) continue;
|
||||
|
||||
try
|
||||
{
|
||||
// Open the prefab for editing
|
||||
string prefabPath = AssetDatabase.GetAssetPath(prefab);
|
||||
GameObject prefabRoot = PrefabUtility.LoadPrefabContents(prefabPath);
|
||||
|
||||
// Check if the component already exists
|
||||
if (prefabRoot.GetComponent(componentType) == null)
|
||||
{
|
||||
// Add the component
|
||||
prefabRoot.AddComponent(componentType);
|
||||
|
||||
// Save the prefab
|
||||
PrefabUtility.SaveAsPrefabAsset(prefabRoot, prefabPath);
|
||||
successCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
failedPrefabs.Add($"{prefab.name} (already has component)");
|
||||
}
|
||||
|
||||
// Unload the prefab
|
||||
PrefabUtility.UnloadPrefabContents(prefabRoot);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"Error adding component to {prefab.name}: {e.Message}");
|
||||
failedPrefabs.Add($"{prefab.name} (error)");
|
||||
}
|
||||
}
|
||||
|
||||
// Show results
|
||||
if (successCount > 0)
|
||||
{
|
||||
Debug.Log($"Successfully added {componentType.Name} to {successCount} prefabs.");
|
||||
}
|
||||
|
||||
if (failedPrefabs.Count > 0)
|
||||
{
|
||||
Debug.LogWarning($"Failed to add component to {failedPrefabs.Count} prefabs: {string.Join(", ", failedPrefabs)}");
|
||||
}
|
||||
|
||||
// Refresh the asset database to show changes
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/Utilities/BatchComponentAdder.cs.meta
Normal file
3
Assets/Editor/Utilities/BatchComponentAdder.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34bcaf56206d4ec29cfa108c96622c37
|
||||
timeCreated: 1758027437
|
||||
217
Assets/Editor/Utilities/ComponentTransferWindow.cs
Normal file
217
Assets/Editor/Utilities/ComponentTransferWindow.cs
Normal file
@@ -0,0 +1,217 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Editor.Utilities
|
||||
{
|
||||
public class ComponentTransferWindow : EditorWindow
|
||||
{
|
||||
private GameObject sourceGameObject;
|
||||
private GameObject targetGameObject;
|
||||
private Vector2 scrollPosition;
|
||||
private Dictionary<Component, bool> componentSelections = new Dictionary<Component, bool>();
|
||||
private bool selectAll = false;
|
||||
|
||||
[MenuItem("Tools/Component Transfer Tool")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
ComponentTransferWindow window = GetWindow<ComponentTransferWindow>("Component Transfer");
|
||||
window.minSize = new Vector2(400, 300);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUILayout.Label("Component Transfer Tool", EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
DrawGameObjectSelectors();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (sourceGameObject != null)
|
||||
{
|
||||
DrawComponentSelectionArea();
|
||||
EditorGUILayout.Space();
|
||||
|
||||
DrawOperationButtons();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawGameObjectSelectors()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.BeginVertical();
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
GameObject newSource = EditorGUILayout.ObjectField("Source GameObject", sourceGameObject, typeof(GameObject), true) as GameObject;
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
if (newSource != sourceGameObject)
|
||||
{
|
||||
sourceGameObject = newSource;
|
||||
RefreshComponentList();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.BeginVertical();
|
||||
|
||||
targetGameObject = EditorGUILayout.ObjectField("Target GameObject", targetGameObject, typeof(GameObject), true) as GameObject;
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Error validation
|
||||
if (sourceGameObject == targetGameObject && sourceGameObject != null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Source and target cannot be the same GameObject.", MessageType.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawComponentSelectionArea()
|
||||
{
|
||||
if (componentSelections.Count == 0)
|
||||
{
|
||||
EditorGUILayout.LabelField("No components found on source GameObject.");
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField("Select Components to Transfer:", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool newSelectAll = EditorGUILayout.ToggleLeft("Select All", selectAll);
|
||||
if (EditorGUI.EndChangeCheck() && newSelectAll != selectAll)
|
||||
{
|
||||
selectAll = newSelectAll;
|
||||
foreach (var key in componentSelections.Keys.ToArray())
|
||||
{
|
||||
componentSelections[key] = selectAll;
|
||||
}
|
||||
}
|
||||
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
|
||||
|
||||
foreach (var kvp in componentSelections.ToArray())
|
||||
{
|
||||
Component component = kvp.Key;
|
||||
if (component != null)
|
||||
{
|
||||
string componentName = component.GetType().Name;
|
||||
componentSelections[component] = EditorGUILayout.ToggleLeft(componentName, componentSelections[component]);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawOperationButtons()
|
||||
{
|
||||
bool isValid = sourceGameObject != null && targetGameObject != null && sourceGameObject != targetGameObject;
|
||||
bool hasSelection = HasSelectedComponents();
|
||||
|
||||
EditorGUI.BeginDisabledGroup(!isValid || !hasSelection);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button("Copy Components"))
|
||||
{
|
||||
CopyComponents(false);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Move Components"))
|
||||
{
|
||||
CopyComponents(true);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUI.EndDisabledGroup();
|
||||
}
|
||||
|
||||
private void RefreshComponentList()
|
||||
{
|
||||
componentSelections.Clear();
|
||||
|
||||
if (sourceGameObject != null)
|
||||
{
|
||||
Component[] components = sourceGameObject.GetComponents<Component>();
|
||||
|
||||
foreach (Component component in components)
|
||||
{
|
||||
// Skip Transform component as it's required and should not be transferred
|
||||
if (component is Transform)
|
||||
continue;
|
||||
|
||||
componentSelections.Add(component, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasSelectedComponents()
|
||||
{
|
||||
foreach (bool selected in componentSelections.Values)
|
||||
{
|
||||
if (selected)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void CopyComponents(bool moveInsteadOfCopy)
|
||||
{
|
||||
if (sourceGameObject == null || targetGameObject == null)
|
||||
return;
|
||||
|
||||
Undo.RegisterCompleteObjectUndo(targetGameObject, moveInsteadOfCopy ? "Move Components" : "Copy Components");
|
||||
if (moveInsteadOfCopy)
|
||||
{
|
||||
Undo.RegisterCompleteObjectUndo(sourceGameObject, "Move Components (Source)");
|
||||
}
|
||||
|
||||
// Store references to components that need to be destroyed after copying
|
||||
List<Component> componentsToDestroy = new List<Component>();
|
||||
|
||||
// Copy each selected component
|
||||
foreach (var kvp in componentSelections)
|
||||
{
|
||||
if (kvp.Value) // If component is selected
|
||||
{
|
||||
Component sourceComponent = kvp.Key;
|
||||
|
||||
if (sourceComponent != null)
|
||||
{
|
||||
// Skip Transform component as it's required
|
||||
if (sourceComponent is Transform)
|
||||
continue;
|
||||
|
||||
// Add the component of the same type to the target
|
||||
ComponentUtility.CopyComponent(sourceComponent);
|
||||
ComponentUtility.PasteComponentAsNew(targetGameObject);
|
||||
|
||||
// If we're moving components, mark this for destruction
|
||||
if (moveInsteadOfCopy)
|
||||
{
|
||||
componentsToDestroy.Add(sourceComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Destroy components on source if needed (after copying all components)
|
||||
if (moveInsteadOfCopy)
|
||||
{
|
||||
foreach (Component component in componentsToDestroy)
|
||||
{
|
||||
Undo.DestroyObjectImmediate(component);
|
||||
}
|
||||
}
|
||||
|
||||
RefreshComponentList();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Editor/Utilities/ComponentTransferWindow.cs.meta
Normal file
11
Assets/Editor/Utilities/ComponentTransferWindow.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dae5cb1c71f74a4eb8c8c0a77fe2e3f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
432
Assets/Editor/Utilities/PoolMonitorWindow.cs
Normal file
432
Assets/Editor/Utilities/PoolMonitorWindow.cs
Normal file
@@ -0,0 +1,432 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
using Pooling;
|
||||
|
||||
namespace Editor.Utilities
|
||||
{
|
||||
public class PoolMonitorWindow : EditorWindow
|
||||
{
|
||||
private Vector2 scrollPosition;
|
||||
private bool autoRefresh = true;
|
||||
private float refreshInterval = 1.0f;
|
||||
private float lastRefreshTime;
|
||||
private bool showSinglePrefabPools = true;
|
||||
private bool showMultiPrefabPools = true;
|
||||
|
||||
[MenuItem("Tools/Pool Monitor")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
GetWindow<PoolMonitorWindow>("Pool Monitor");
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
EditorGUILayout.BeginVertical();
|
||||
|
||||
EditorGUILayout.LabelField("Object Pool Monitor", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
autoRefresh = EditorGUILayout.Toggle("Auto Refresh", autoRefresh);
|
||||
if (autoRefresh)
|
||||
{
|
||||
refreshInterval = EditorGUILayout.Slider("Refresh Interval", refreshInterval, 0.1f, 5f);
|
||||
}
|
||||
if (GUILayout.Button("Refresh Now"))
|
||||
{
|
||||
RefreshPoolInfo();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Display toggles for showing different pool types
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
showSinglePrefabPools = EditorGUILayout.ToggleLeft("Show Single Prefab Pools", showSinglePrefabPools, GUILayout.Width(200));
|
||||
showMultiPrefabPools = EditorGUILayout.ToggleLeft("Show Multi-Prefab Pools", showMultiPrefabPools, GUILayout.Width(200));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
DisplayPoolInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("Enter play mode to see pool statistics.", MessageType.Info);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (autoRefresh && Application.isPlaying)
|
||||
{
|
||||
float currentTime = (float)EditorApplication.timeSinceStartup;
|
||||
if (currentTime - lastRefreshTime > refreshInterval)
|
||||
{
|
||||
lastRefreshTime = currentTime;
|
||||
RefreshPoolInfo();
|
||||
Repaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RefreshPoolInfo()
|
||||
{
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
// Find all pool types and call LogPoolStats
|
||||
if (showSinglePrefabPools)
|
||||
{
|
||||
// Find all types that derive from BaseObjectPool<T>
|
||||
foreach (var pool in FindObjectsOfBaseType(typeof(Component), typeof(BaseObjectPool<>)))
|
||||
{
|
||||
if (pool != null && pool.gameObject.activeInHierarchy)
|
||||
{
|
||||
var logMethod = pool.GetType().GetMethod("LogPoolStats");
|
||||
if (logMethod != null)
|
||||
{
|
||||
logMethod.Invoke(pool, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showMultiPrefabPools)
|
||||
{
|
||||
// Find all types that derive from MultiPrefabPool<T>
|
||||
foreach (var pool in FindObjectsOfBaseType(typeof(Component), typeof(MultiPrefabPool<>)))
|
||||
{
|
||||
if (pool != null && pool.gameObject.activeInHierarchy)
|
||||
{
|
||||
var logMethod = pool.GetType().GetMethod("LogPoolStats");
|
||||
if (logMethod != null)
|
||||
{
|
||||
logMethod.Invoke(pool, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayPoolInfo()
|
||||
{
|
||||
EditorGUILayout.LabelField("Scene Statistics:", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField($"Total GameObjects: {UnityEngine.Object.FindObjectsByType<GameObject>(FindObjectsSortMode.None).Length}");
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
if (showSinglePrefabPools)
|
||||
{
|
||||
DisplaySinglePrefabPoolInfo();
|
||||
}
|
||||
|
||||
if (showMultiPrefabPools)
|
||||
{
|
||||
DisplayMultiPrefabPoolInfo();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplaySinglePrefabPoolInfo()
|
||||
{
|
||||
// Find all types that derive from BaseObjectPool<T>
|
||||
Component[] pools = FindObjectsOfBaseType(typeof(Component), typeof(BaseObjectPool<>));
|
||||
|
||||
if (pools.Length == 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No single prefab pools found in the scene.", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField("Single Prefab Pools", EditorStyles.boldLabel);
|
||||
foreach (var poolComponent in pools)
|
||||
{
|
||||
EditorGUILayout.LabelField($"Pool: {poolComponent.name} ({poolComponent.GetType().Name})", EditorStyles.boldLabel);
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
// Get private field values using reflection
|
||||
Type poolType = poolComponent.GetType();
|
||||
FieldInfo pooledObjectsField = poolType.GetField("pooledObjects",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
FieldInfo totalCreatedField = poolType.GetField("totalCreated",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
FieldInfo totalReturnedField = poolType.GetField("totalReturned",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
PropertyInfo maxPoolSizeProp = poolType.GetProperty("maxPoolSize") ??
|
||||
poolType.GetField("maxPoolSize")?.DeclaringType.GetProperty("maxPoolSize");
|
||||
|
||||
PropertyInfo initialPoolSizeProp = poolType.GetProperty("initialPoolSize") ??
|
||||
poolType.GetField("initialPoolSize")?.DeclaringType.GetProperty("initialPoolSize");
|
||||
|
||||
if (pooledObjectsField != null)
|
||||
{
|
||||
object pooledObjects = pooledObjectsField.GetValue(poolComponent);
|
||||
int count = 0;
|
||||
|
||||
// Handle Stack<T>
|
||||
if (pooledObjects is System.Collections.ICollection collection)
|
||||
{
|
||||
count = collection.Count;
|
||||
}
|
||||
|
||||
int maxSize = 0;
|
||||
if (maxPoolSizeProp != null)
|
||||
{
|
||||
maxSize = (int)maxPoolSizeProp.GetValue(poolComponent);
|
||||
}
|
||||
else
|
||||
{
|
||||
FieldInfo maxPoolSizeField = poolType.GetField("maxPoolSize",
|
||||
BindingFlags.Public | BindingFlags.Instance);
|
||||
if (maxPoolSizeField != null)
|
||||
{
|
||||
maxSize = (int)maxPoolSizeField.GetValue(poolComponent);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Pooled Objects: {count}/{maxSize}");
|
||||
|
||||
int initialSize = 0;
|
||||
if (initialPoolSizeProp != null)
|
||||
{
|
||||
initialSize = (int)initialPoolSizeProp.GetValue(poolComponent);
|
||||
}
|
||||
else
|
||||
{
|
||||
FieldInfo initialPoolSizeField = poolType.GetField("initialPoolSize",
|
||||
BindingFlags.Public | BindingFlags.Instance);
|
||||
if (initialPoolSizeField != null)
|
||||
{
|
||||
initialSize = (int)initialPoolSizeField.GetValue(poolComponent);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Initial Pool Size: {initialSize}");
|
||||
|
||||
if (totalCreatedField != null && totalReturnedField != null)
|
||||
{
|
||||
int created = (int)totalCreatedField.GetValue(poolComponent);
|
||||
int returned = (int)totalReturnedField.GetValue(poolComponent);
|
||||
EditorGUILayout.LabelField($"Created: {created}, Returned: {returned}");
|
||||
}
|
||||
}
|
||||
|
||||
// Try to find active objects of the pool's type
|
||||
if (poolType.BaseType.IsGenericType)
|
||||
{
|
||||
Type elementType = poolType.BaseType.GetGenericArguments()[0];
|
||||
|
||||
// More accurately count only active objects in the current scene
|
||||
int activeCount = 0;
|
||||
|
||||
// First, try to get a more accurate count from the current scene
|
||||
foreach (var obj in UnityEngine.Object.FindObjectsByType(elementType, FindObjectsSortMode.None))
|
||||
{
|
||||
var comp = obj as Component;
|
||||
if (comp != null && comp.gameObject.activeInHierarchy)
|
||||
{
|
||||
activeCount++;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Active Objects (Current Scene): {activeCount}");
|
||||
|
||||
// Add a note about pooling status
|
||||
if (activeCount > 0)
|
||||
{
|
||||
int pooledCount = 0;
|
||||
if (pooledObjectsField != null)
|
||||
{
|
||||
object pooledObjects = pooledObjectsField.GetValue(poolComponent);
|
||||
if (pooledObjects is ICollection collection)
|
||||
{
|
||||
pooledCount = collection.Count;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Pooling Efficiency: {pooledCount} ready in pool, {activeCount} active");
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayMultiPrefabPoolInfo()
|
||||
{
|
||||
// Find all types that derive from MultiPrefabPool<T>
|
||||
Component[] pools = FindObjectsOfBaseType(typeof(Component), typeof(MultiPrefabPool<>));
|
||||
|
||||
if (pools.Length == 0)
|
||||
{
|
||||
EditorGUILayout.HelpBox("No multi-prefab pools found in the scene.", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField("Multi-Prefab Pools", EditorStyles.boldLabel);
|
||||
foreach (var poolComponent in pools)
|
||||
{
|
||||
EditorGUILayout.LabelField($"Pool: {poolComponent.name} ({poolComponent.GetType().Name})", EditorStyles.boldLabel);
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
// Get private field values using reflection
|
||||
Type poolType = poolComponent.GetType();
|
||||
FieldInfo totalPooledCountField = poolType.GetField("totalPooledCount",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
FieldInfo pooledObjectsField = poolType.GetField("pooledObjects",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
FieldInfo prefabUsageField = poolType.GetField("prefabUsageCount",
|
||||
BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
PropertyInfo totalMaxPoolSizeProp = poolType.GetProperty("totalMaxPoolSize") ??
|
||||
poolType.GetField("totalMaxPoolSize")?.DeclaringType.GetProperty("totalMaxPoolSize");
|
||||
|
||||
if (totalPooledCountField != null && totalMaxPoolSizeProp != null)
|
||||
{
|
||||
int totalCount = (int)totalPooledCountField.GetValue(poolComponent);
|
||||
int maxSize = 0;
|
||||
|
||||
if (totalMaxPoolSizeProp != null)
|
||||
{
|
||||
maxSize = (int)totalMaxPoolSizeProp.GetValue(poolComponent);
|
||||
}
|
||||
else
|
||||
{
|
||||
FieldInfo totalMaxPoolSizeField = poolType.GetField("totalMaxPoolSize",
|
||||
BindingFlags.Public | BindingFlags.Instance);
|
||||
if (totalMaxPoolSizeField != null)
|
||||
{
|
||||
maxSize = (int)totalMaxPoolSizeField.GetValue(poolComponent);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Total Pooled Objects: {totalCount}/{maxSize}");
|
||||
}
|
||||
|
||||
if (pooledObjectsField != null && prefabUsageField != null)
|
||||
{
|
||||
// This is more complex because we don't know the exact generic types
|
||||
// Just show basic information
|
||||
object pooledTiles = pooledObjectsField.GetValue(poolComponent);
|
||||
object usageCounts = prefabUsageField.GetValue(poolComponent);
|
||||
|
||||
if (pooledTiles != null && pooledTiles is IDictionary poolDict)
|
||||
{
|
||||
EditorGUILayout.LabelField("Prefab Details:", EditorStyles.boldLabel);
|
||||
EditorGUI.indentLevel++;
|
||||
|
||||
foreach (DictionaryEntry entry in poolDict)
|
||||
{
|
||||
int prefabIndex = Convert.ToInt32(entry.Key);
|
||||
object value = entry.Value;
|
||||
int count = 0;
|
||||
|
||||
// Handle Stack<T>
|
||||
if (value is ICollection collection)
|
||||
{
|
||||
count = collection.Count;
|
||||
}
|
||||
|
||||
int usageCount = 0;
|
||||
if (usageCounts is IDictionary usageDict)
|
||||
{
|
||||
if (usageDict.Contains(entry.Key))
|
||||
{
|
||||
usageCount = Convert.ToInt32(usageDict[entry.Key]);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Prefab {prefabIndex}: {count} pooled, {usageCount} usages");
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
}
|
||||
|
||||
// Try to find active objects of the pool's type
|
||||
if (poolType.BaseType.IsGenericType)
|
||||
{
|
||||
Type elementType = poolType.BaseType.GetGenericArguments()[0];
|
||||
int activeCount = 0;
|
||||
|
||||
// Count active objects of the specific pool's component type
|
||||
foreach (var obj in UnityEngine.Object.FindObjectsByType(elementType, FindObjectsSortMode.None))
|
||||
{
|
||||
var comp = obj as Component;
|
||||
if (comp != null && comp.gameObject.activeInHierarchy)
|
||||
{
|
||||
activeCount++;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField($"Active Objects (Current Scene): {activeCount}");
|
||||
|
||||
// Add a note about pooling status
|
||||
if (activeCount > 0 && totalPooledCountField != null)
|
||||
{
|
||||
int pooledCount = (int)totalPooledCountField.GetValue(poolComponent);
|
||||
EditorGUILayout.LabelField($"Pooling Efficiency: {pooledCount} ready in pool, {activeCount} active");
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds all objects that derive from a generic base type
|
||||
/// </summary>
|
||||
private Component[] FindObjectsOfBaseType(Type baseComponentType, Type genericBaseType)
|
||||
{
|
||||
List<Component> results = new List<Component>();
|
||||
|
||||
// Find all components in the scene
|
||||
Component[] allComponents = UnityEngine.Object.FindObjectsByType<Component>(FindObjectsSortMode.None);
|
||||
|
||||
foreach (var component in allComponents)
|
||||
{
|
||||
Type componentType = component.GetType();
|
||||
|
||||
// Check if this type derives from the generic base type
|
||||
while (componentType != null && componentType != typeof(object))
|
||||
{
|
||||
if (componentType.IsGenericType &&
|
||||
componentType.GetGenericTypeDefinition() == genericBaseType)
|
||||
{
|
||||
results.Add(component);
|
||||
break;
|
||||
}
|
||||
|
||||
// Also check for non-generic derived types
|
||||
if (componentType.BaseType != null &&
|
||||
componentType.BaseType.IsGenericType &&
|
||||
componentType.BaseType.GetGenericTypeDefinition() == genericBaseType)
|
||||
{
|
||||
results.Add(component);
|
||||
break;
|
||||
}
|
||||
|
||||
componentType = componentType.BaseType;
|
||||
}
|
||||
}
|
||||
|
||||
return results.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/Utilities/PoolMonitorWindow.cs.meta
Normal file
3
Assets/Editor/Utilities/PoolMonitorWindow.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17d6e42e7ca549b8b209f0714c8d106b
|
||||
timeCreated: 1758016486
|
||||
911
Assets/Editor/Utilities/SpriteColliderGenerator.cs
Normal file
911
Assets/Editor/Utilities/SpriteColliderGenerator.cs
Normal file
@@ -0,0 +1,911 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Editor.Utilities
|
||||
{
|
||||
public class SpriteColliderGenerator : EditorWindow
|
||||
{
|
||||
private Vector2 scrollPosition;
|
||||
|
||||
[Tooltip("List of GameObjects with SpriteRenderers to generate colliders for")]
|
||||
private List<GameObject> selectedObjects = new List<GameObject>();
|
||||
|
||||
[Tooltip("Controls how much to simplify the collider shape (lower values create more complex colliders)")]
|
||||
private float simplificationTolerance = 0.05f;
|
||||
|
||||
[Tooltip("When enabled, removes any existing PolygonCollider2D components before adding new ones")]
|
||||
private bool replaceExistingColliders = true;
|
||||
|
||||
[Tooltip("When enabled, applies colliders to all child objects with SpriteRenderers")]
|
||||
private bool applyToChildren = false;
|
||||
|
||||
[Tooltip("When enabled, allows scaling the collider outward or inward from the sprite center")]
|
||||
private bool offsetFromCenter = false;
|
||||
|
||||
[Tooltip("Distance to offset the collider from the sprite outline (positive values expand, negative values contract)")]
|
||||
private float offsetDistance = 0f;
|
||||
|
||||
[Tooltip("When enabled, creates trigger colliders instead of solid colliders")]
|
||||
private bool generateTriggerColliders = false;
|
||||
|
||||
[Tooltip("Threshold for transparency detection (pixels with alpha below this value are considered transparent)")]
|
||||
private int alphaCutoff = 128; // Used when generating colliders (0-255)
|
||||
|
||||
[Tooltip("Controls the level of detail for the generated collider (affects vertex count)")]
|
||||
private int detailLevel = 2; // 1 = low, 2 = medium, 3 = high
|
||||
|
||||
[Tooltip("When enabled, shows a preview of the colliders in the scene view before generating them")]
|
||||
private bool previewColliders = true;
|
||||
|
||||
[Tooltip("Color used for previewing colliders in the scene view")]
|
||||
private Color previewColor = new Color(0.2f, 1f, 0.3f, 0.5f);
|
||||
|
||||
[Tooltip("Layer to assign to GameObjects when colliders are generated")]
|
||||
private int targetLayer = 0;
|
||||
|
||||
private List<Mesh> previewMeshes = new List<Mesh>();
|
||||
|
||||
[MenuItem("Tools/Sprite Collider Generator")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
GetWindow<SpriteColliderGenerator>("Sprite Collider Generator");
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
// Subscribe to scene change events to clear invalid object references
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneOpened += OnSceneOpened;
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneClosed += OnSceneClosed;
|
||||
|
||||
// Also subscribe to playmode changes as they can invalidate references
|
||||
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
|
||||
|
||||
// Subscribe to prefab stage changes (Unity 2018.3+)
|
||||
UnityEditor.SceneManagement.PrefabStage.prefabStageOpened += OnPrefabStageOpened;
|
||||
UnityEditor.SceneManagement.PrefabStage.prefabStageClosing += OnPrefabStageClosing;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
// Unsubscribe from events
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneOpened -= OnSceneOpened;
|
||||
UnityEditor.SceneManagement.EditorSceneManager.sceneClosed -= OnSceneClosed;
|
||||
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
|
||||
UnityEditor.SceneManagement.PrefabStage.prefabStageOpened -= OnPrefabStageOpened;
|
||||
UnityEditor.SceneManagement.PrefabStage.prefabStageClosing -= OnPrefabStageClosing;
|
||||
|
||||
// Clean up any preview meshes when window is closed
|
||||
foreach (var mesh in previewMeshes)
|
||||
{
|
||||
if (mesh != null)
|
||||
{
|
||||
DestroyImmediate(mesh);
|
||||
}
|
||||
}
|
||||
previewMeshes.Clear();
|
||||
}
|
||||
|
||||
private void OnSceneOpened(UnityEngine.SceneManagement.Scene scene, UnityEditor.SceneManagement.OpenSceneMode mode)
|
||||
{
|
||||
// Clear selected objects when a scene is opened
|
||||
ClearInvalidReferences();
|
||||
}
|
||||
|
||||
private void OnSceneClosed(UnityEngine.SceneManagement.Scene scene)
|
||||
{
|
||||
// Clear selected objects when a scene is closed
|
||||
ClearInvalidReferences();
|
||||
}
|
||||
|
||||
private void OnPlayModeStateChanged(PlayModeStateChange state)
|
||||
{
|
||||
// Clear references when entering/exiting play mode as they become invalid
|
||||
if (state == PlayModeStateChange.ExitingEditMode || state == PlayModeStateChange.ExitingPlayMode)
|
||||
{
|
||||
ClearInvalidReferences();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPrefabStageOpened(UnityEditor.SceneManagement.PrefabStage stage)
|
||||
{
|
||||
// Clear selected objects when entering a prefab stage
|
||||
ClearInvalidReferences();
|
||||
}
|
||||
|
||||
private void OnPrefabStageClosing(UnityEditor.SceneManagement.PrefabStage stage)
|
||||
{
|
||||
// Clear selected objects when exiting a prefab stage
|
||||
ClearInvalidReferences();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears invalid GameObject references from the selected objects list
|
||||
/// </summary>
|
||||
private void ClearInvalidReferences()
|
||||
{
|
||||
if (selectedObjects.Count > 0)
|
||||
{
|
||||
selectedObjects.Clear();
|
||||
ClearPreviews(); // Also clear any preview meshes
|
||||
Repaint(); // Refresh the window UI
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.BeginVertical();
|
||||
|
||||
EditorGUILayout.LabelField("Sprite Collider Generator", EditorStyles.boldLabel);
|
||||
EditorGUILayout.HelpBox("Select GameObjects with SpriteRenderers and generate accurate PolygonCollider2D components based on the sprite outlines.", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Object selection section
|
||||
EditorGUILayout.LabelField("Selected Objects", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button(new GUIContent("Add Selected GameObjects", "Add GameObjects currently selected in the scene or project to the list for processing.")))
|
||||
{
|
||||
AddSelectedGameObjects();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, GUILayout.Height(150));
|
||||
|
||||
for (int i = 0; i < selectedObjects.Count; i++)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
selectedObjects[i] = (GameObject)EditorGUILayout.ObjectField(selectedObjects[i], typeof(GameObject), true);
|
||||
|
||||
if (GUILayout.Button("X", GUILayout.Width(20)))
|
||||
{
|
||||
selectedObjects.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
if (GUILayout.Button(new GUIContent("Clear All", "Remove all objects from the selection list.")))
|
||||
{
|
||||
selectedObjects.Clear();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Collider generation options
|
||||
EditorGUILayout.LabelField("Generation Options", EditorStyles.boldLabel);
|
||||
|
||||
// Detail level for collider generation (affects vertex count)
|
||||
string[] detailOptions = new string[] { "Low", "Medium", "High" };
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(new GUIContent("Detail Level:", "Controls the level of detail for the generated collider (affects vertex count)."), GUILayout.Width(180));
|
||||
detailLevel = EditorGUILayout.Popup(detailLevel - 1, detailOptions) + 1;
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Simplification tolerance (how much to simplify the collider)
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(new GUIContent("Simplification Tolerance:", "Controls how much to simplify the collider shape (lower values create more complex colliders)."), GUILayout.Width(180));
|
||||
simplificationTolerance = EditorGUILayout.Slider(simplificationTolerance, 0.01f, 0.2f);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Alpha cutoff for transparency
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(new GUIContent("Alpha Cutoff (0-255):", "Threshold for transparency detection (pixels with alpha below this value are considered transparent)."), GUILayout.Width(180));
|
||||
alphaCutoff = EditorGUILayout.IntSlider(alphaCutoff, 0, 255);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Additional options
|
||||
replaceExistingColliders = EditorGUILayout.Toggle(
|
||||
new GUIContent("Replace Existing Colliders", "When enabled, removes any existing PolygonCollider2D components before adding new ones."),
|
||||
replaceExistingColliders);
|
||||
|
||||
applyToChildren = EditorGUILayout.Toggle(
|
||||
new GUIContent("Apply To Children", "When enabled, applies colliders to all child objects with SpriteRenderers."),
|
||||
applyToChildren);
|
||||
|
||||
generateTriggerColliders = EditorGUILayout.Toggle(
|
||||
new GUIContent("Generate Trigger Colliders", "When enabled, creates trigger colliders instead of solid colliders."),
|
||||
generateTriggerColliders);
|
||||
|
||||
// Layer selection
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField(new GUIContent("Target Layer:", "Layer to assign to GameObjects when colliders are generated. Leave as 'Nothing' to keep current layer."), GUILayout.Width(180));
|
||||
targetLayer = EditorGUILayout.LayerField(targetLayer);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// Offset option
|
||||
offsetFromCenter = EditorGUILayout.Toggle(
|
||||
new GUIContent("Offset From Center", "When enabled, allows scaling the collider outward or inward from the sprite center."),
|
||||
offsetFromCenter);
|
||||
|
||||
if (offsetFromCenter)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
offsetDistance = EditorGUILayout.FloatField(
|
||||
new GUIContent("Offset Distance", "Distance to offset the collider from the sprite outline (positive values expand, negative values contract)."),
|
||||
offsetDistance);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
// Preview option
|
||||
previewColliders = EditorGUILayout.Toggle(
|
||||
new GUIContent("Preview Colliders", "When enabled, shows a preview of the colliders in the scene view before generating them."),
|
||||
previewColliders);
|
||||
|
||||
if (previewColliders)
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
previewColor = EditorGUILayout.ColorField(
|
||||
new GUIContent("Preview Color", "Color used for previewing colliders in the scene view."),
|
||||
previewColor);
|
||||
|
||||
// Create a horizontal layout for the preview buttons
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button(new GUIContent("Update Preview", "Refresh the preview display in the scene view.")))
|
||||
{
|
||||
GenerateColliderPreviews();
|
||||
}
|
||||
if (GUILayout.Button(new GUIContent("Clear Preview", "Remove all preview colliders from the scene view.")))
|
||||
{
|
||||
ClearPreviews();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
// Generate colliders button
|
||||
GUI.enabled = selectedObjects.Count > 0;
|
||||
|
||||
if (GUILayout.Button(new GUIContent("Generate Colliders", "Create polygon colliders for all selected sprites based on current settings.")))
|
||||
{
|
||||
GenerateColliders();
|
||||
}
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
// Force the scene view to repaint if we're showing previews
|
||||
if (previewColliders && Event.current.type == EventType.Repaint)
|
||||
{
|
||||
SceneView.RepaintAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddSelectedGameObjects()
|
||||
{
|
||||
foreach (GameObject obj in Selection.gameObjects)
|
||||
{
|
||||
if (!selectedObjects.Contains(obj))
|
||||
{
|
||||
// Only add if it has a SpriteRenderer or any of its children do
|
||||
if (obj.GetComponent<SpriteRenderer>() != null ||
|
||||
(applyToChildren && obj.GetComponentInChildren<SpriteRenderer>() != null))
|
||||
{
|
||||
selectedObjects.Add(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void GenerateColliderPreviews()
|
||||
{
|
||||
// Clean up existing preview meshes
|
||||
foreach (var mesh in previewMeshes)
|
||||
{
|
||||
if (mesh != null)
|
||||
{
|
||||
DestroyImmediate(mesh);
|
||||
}
|
||||
}
|
||||
previewMeshes.Clear();
|
||||
|
||||
if (!previewColliders || selectedObjects.Count == 0)
|
||||
return;
|
||||
|
||||
foreach (var obj in selectedObjects)
|
||||
{
|
||||
if (obj == null) continue;
|
||||
|
||||
var spriteRenderers = applyToChildren ?
|
||||
obj.GetComponentsInChildren<SpriteRenderer>() :
|
||||
new SpriteRenderer[] { obj.GetComponent<SpriteRenderer>() };
|
||||
|
||||
foreach (var renderer in spriteRenderers)
|
||||
{
|
||||
if (renderer == null || renderer.sprite == null)
|
||||
continue;
|
||||
|
||||
Sprite sprite = renderer.sprite;
|
||||
List<Vector2[]> paths = GetSpritePaths(sprite, simplificationTolerance);
|
||||
if (paths.Count == 0)
|
||||
continue;
|
||||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
// Create a preview mesh from the path
|
||||
Mesh previewMesh = CreateMeshFromPath(path, renderer.transform);
|
||||
if (previewMesh != null)
|
||||
previewMeshes.Add(previewMesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all preview meshes from the scene view
|
||||
/// </summary>
|
||||
private void ClearPreviews()
|
||||
{
|
||||
foreach (var mesh in previewMeshes)
|
||||
{
|
||||
if (mesh != null)
|
||||
{
|
||||
DestroyImmediate(mesh);
|
||||
}
|
||||
}
|
||||
previewMeshes.Clear();
|
||||
|
||||
// Force a repaint of the scene view
|
||||
SceneView.RepaintAll();
|
||||
}
|
||||
|
||||
private Mesh CreateMeshFromPath(Vector2[] path, Transform transform)
|
||||
{
|
||||
if (path.Length < 3)
|
||||
return null;
|
||||
|
||||
Mesh mesh = new Mesh();
|
||||
|
||||
// Convert the path to 3D vertices and apply the sprite's transform
|
||||
Vector3[] vertices = new Vector3[path.Length];
|
||||
for (int i = 0; i < path.Length; i++)
|
||||
{
|
||||
// Convert the local position to world space using the transform
|
||||
vertices[i] = transform.TransformPoint(new Vector3(path[i].x, path[i].y, 0));
|
||||
}
|
||||
|
||||
// Triangulate the polygon
|
||||
Triangulator triangulator = new Triangulator(path);
|
||||
int[] triangles = triangulator.Triangulate();
|
||||
|
||||
mesh.vertices = vertices;
|
||||
mesh.triangles = triangles;
|
||||
mesh.RecalculateNormals();
|
||||
|
||||
return mesh;
|
||||
}
|
||||
|
||||
private void GenerateColliders()
|
||||
{
|
||||
int successCount = 0;
|
||||
List<string> errors = new List<string>();
|
||||
|
||||
Undo.RecordObjects(selectedObjects.ToArray(), "Generate Sprite Colliders");
|
||||
|
||||
foreach (var obj in selectedObjects)
|
||||
{
|
||||
if (obj == null) continue;
|
||||
|
||||
try
|
||||
{
|
||||
var spriteRenderers = applyToChildren ?
|
||||
obj.GetComponentsInChildren<SpriteRenderer>() :
|
||||
new SpriteRenderer[] { obj.GetComponent<SpriteRenderer>() };
|
||||
|
||||
foreach (var renderer in spriteRenderers)
|
||||
{
|
||||
if (renderer == null || renderer.sprite == null)
|
||||
continue;
|
||||
|
||||
// Check if we're working with a prefab
|
||||
bool isPrefab = PrefabUtility.IsPartOfPrefabAsset(renderer.gameObject);
|
||||
GameObject targetObject = renderer.gameObject;
|
||||
|
||||
if (isPrefab)
|
||||
{
|
||||
// If it's a prefab, we need special handling
|
||||
string prefabPath = AssetDatabase.GetAssetPath(targetObject);
|
||||
targetObject = PrefabUtility.LoadPrefabContents(prefabPath);
|
||||
SpriteRenderer prefabRenderer = targetObject.GetComponent<SpriteRenderer>();
|
||||
|
||||
if (prefabRenderer == null || prefabRenderer.sprite == null)
|
||||
{
|
||||
PrefabUtility.UnloadPrefabContents(targetObject);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (GenerateColliderForRenderer(prefabRenderer))
|
||||
{
|
||||
// Save the changes to the prefab
|
||||
PrefabUtility.SaveAsPrefabAsset(targetObject, prefabPath);
|
||||
successCount++;
|
||||
}
|
||||
|
||||
PrefabUtility.UnloadPrefabContents(targetObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For scene objects, just generate the collider directly
|
||||
if (GenerateColliderForRenderer(renderer))
|
||||
{
|
||||
successCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
errors.Add($"{obj.name}: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up any preview meshes as we've now generated real colliders
|
||||
ClearPreviews();
|
||||
|
||||
if (successCount > 0)
|
||||
{
|
||||
Debug.Log($"Successfully generated colliders for {successCount} sprite(s).");
|
||||
}
|
||||
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
Debug.LogError($"Errors occurred while generating colliders:\n{string.Join("\n", errors)}");
|
||||
}
|
||||
}
|
||||
|
||||
private bool GenerateColliderForRenderer(SpriteRenderer renderer)
|
||||
{
|
||||
if (renderer == null || renderer.sprite == null)
|
||||
return false;
|
||||
|
||||
Sprite sprite = renderer.sprite;
|
||||
GameObject targetObject = renderer.gameObject;
|
||||
|
||||
// Remove existing colliders if specified
|
||||
if (replaceExistingColliders)
|
||||
{
|
||||
PolygonCollider2D[] existingColliders = targetObject.GetComponents<PolygonCollider2D>();
|
||||
foreach (var collider in existingColliders)
|
||||
{
|
||||
Undo.DestroyObjectImmediate(collider);
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new polygon collider
|
||||
PolygonCollider2D polygonCollider = Undo.AddComponent<PolygonCollider2D>(targetObject);
|
||||
if (polygonCollider == null)
|
||||
return false;
|
||||
|
||||
// Set as trigger if specified
|
||||
polygonCollider.isTrigger = generateTriggerColliders;
|
||||
|
||||
// Get paths from the sprite
|
||||
List<Vector2[]> paths = GetSpritePaths(sprite, simplificationTolerance);
|
||||
if (paths.Count == 0)
|
||||
return false;
|
||||
|
||||
// Apply offset if needed
|
||||
if (offsetFromCenter && offsetDistance != 0)
|
||||
{
|
||||
for (int i = 0; i < paths.Count; i++)
|
||||
{
|
||||
Vector2[] offsetPath = new Vector2[paths[i].Length];
|
||||
for (int j = 0; j < paths[i].Length; j++)
|
||||
{
|
||||
// Calculate direction from center (0,0) to the point
|
||||
Vector2 dir = paths[i][j].normalized;
|
||||
// Apply offset in that direction
|
||||
offsetPath[j] = paths[i][j] + dir * offsetDistance;
|
||||
}
|
||||
paths[i] = offsetPath;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the paths on the collider
|
||||
polygonCollider.pathCount = paths.Count;
|
||||
for (int i = 0; i < paths.Count; i++)
|
||||
{
|
||||
polygonCollider.SetPath(i, paths[i]);
|
||||
}
|
||||
|
||||
// Set the layer on the GameObject if a specific layer is selected
|
||||
SetTargetLayer(targetObject);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the target layer on the GameObject if a layer is selected
|
||||
/// </summary>
|
||||
/// <param name="targetObject">The GameObject to set the layer on</param>
|
||||
private void SetTargetLayer(GameObject targetObject)
|
||||
{
|
||||
if (targetLayer != 0)
|
||||
{
|
||||
Undo.RecordObject(targetObject, "Set GameObject Layer");
|
||||
targetObject.layer = targetLayer;
|
||||
}
|
||||
}
|
||||
|
||||
private List<Vector2[]> GetSpritePaths(Sprite sprite, float tolerance)
|
||||
{
|
||||
List<Vector2[]> result = new List<Vector2[]>();
|
||||
|
||||
if (sprite == null)
|
||||
return result;
|
||||
|
||||
// Get the raw physics shape data from the sprite
|
||||
int physicsShapeCount = sprite.GetPhysicsShapeCount();
|
||||
if (physicsShapeCount == 0)
|
||||
{
|
||||
// Use the sprite's bounds if no physics shape is defined
|
||||
Vector2[] boundingBoxPath = new Vector2[4];
|
||||
Bounds bounds = sprite.bounds;
|
||||
boundingBoxPath[0] = new Vector2(bounds.min.x, bounds.min.y);
|
||||
boundingBoxPath[1] = new Vector2(bounds.min.x, bounds.max.y);
|
||||
boundingBoxPath[2] = new Vector2(bounds.max.x, bounds.max.y);
|
||||
boundingBoxPath[3] = new Vector2(bounds.max.x, bounds.min.y);
|
||||
result.Add(boundingBoxPath);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Adjust the detail level based on the setting
|
||||
float actualTolerance = tolerance;
|
||||
switch (detailLevel)
|
||||
{
|
||||
case 1: // Low
|
||||
actualTolerance = tolerance * 2.0f;
|
||||
break;
|
||||
case 2: // Medium - default
|
||||
actualTolerance = tolerance;
|
||||
break;
|
||||
case 3: // High
|
||||
actualTolerance = tolerance * 0.5f;
|
||||
break;
|
||||
}
|
||||
|
||||
// Get all physics shapes from the sprite
|
||||
for (int i = 0; i < physicsShapeCount; i++)
|
||||
{
|
||||
List<Vector2> path = new List<Vector2>();
|
||||
sprite.GetPhysicsShape(i, path);
|
||||
|
||||
// Apply simplification if needed
|
||||
if (actualTolerance > 0.01f)
|
||||
{
|
||||
path = SimplifyPath(path, actualTolerance);
|
||||
}
|
||||
|
||||
if (path.Count >= 3) // Need at least 3 points for a valid polygon
|
||||
{
|
||||
result.Add(path.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<Vector2> SimplifyPath(List<Vector2> points, float tolerance)
|
||||
{
|
||||
if (points.Count <= 3)
|
||||
return points;
|
||||
|
||||
// Implementation of Ramer-Douglas-Peucker algorithm for simplifying a polygon
|
||||
List<Vector2> result = new List<Vector2>();
|
||||
List<int> markers = new List<int>(new int[points.Count]);
|
||||
markers[0] = 1;
|
||||
markers[points.Count - 1] = 1;
|
||||
|
||||
SimplifyDouglasPeucker(points, tolerance, markers, 0, points.Count - 1);
|
||||
|
||||
for (int i = 0; i < points.Count; i++)
|
||||
{
|
||||
if (markers[i] == 1)
|
||||
{
|
||||
result.Add(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void SimplifyDouglasPeucker(List<Vector2> points, float tolerance, List<int> markers, int start, int end)
|
||||
{
|
||||
if (end <= start + 1)
|
||||
return;
|
||||
|
||||
float maxDistance = 0;
|
||||
int maxIndex = start;
|
||||
|
||||
Vector2 startPoint = points[start];
|
||||
Vector2 endPoint = points[end];
|
||||
|
||||
// Find the point furthest from the line segment
|
||||
for (int i = start + 1; i < end; i++)
|
||||
{
|
||||
float distance = PerpendicularDistance(points[i], startPoint, endPoint);
|
||||
if (distance > maxDistance)
|
||||
{
|
||||
maxDistance = distance;
|
||||
maxIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
// If the furthest point is beyond tolerance, mark it for keeping and recurse
|
||||
if (maxDistance > tolerance)
|
||||
{
|
||||
markers[maxIndex] = 1;
|
||||
SimplifyDouglasPeucker(points, tolerance, markers, start, maxIndex);
|
||||
SimplifyDouglasPeucker(points, tolerance, markers, maxIndex, end);
|
||||
}
|
||||
}
|
||||
|
||||
private float PerpendicularDistance(Vector2 point, Vector2 lineStart, Vector2 lineEnd)
|
||||
{
|
||||
if (lineStart == lineEnd)
|
||||
return Vector2.Distance(point, lineStart);
|
||||
|
||||
float dx = lineEnd.x - lineStart.x;
|
||||
float dy = lineEnd.y - lineStart.y;
|
||||
|
||||
// Normalize
|
||||
float norm = Mathf.Sqrt(dx * dx + dy * dy);
|
||||
if (norm < float.Epsilon)
|
||||
return Vector2.Distance(point, lineStart);
|
||||
|
||||
dx /= norm;
|
||||
dy /= norm;
|
||||
|
||||
// Calculate perpendicular distance
|
||||
float px = point.x - lineStart.x;
|
||||
float py = point.y - lineStart.y;
|
||||
|
||||
float projectionLength = px * dx + py * dy;
|
||||
|
||||
Vector2 projection = new Vector2(
|
||||
lineStart.x + projectionLength * dx,
|
||||
lineStart.y + projectionLength * dy);
|
||||
|
||||
return Vector2.Distance(point, projection);
|
||||
}
|
||||
|
||||
// Scene view event handling for previewing colliders
|
||||
[InitializeOnLoadMethod]
|
||||
static void Initialize()
|
||||
{
|
||||
SceneView.duringSceneGui += OnSceneGUI;
|
||||
}
|
||||
|
||||
static void OnSceneGUI(SceneView sceneView)
|
||||
{
|
||||
// Find all open collider generator windows
|
||||
var windows = Resources.FindObjectsOfTypeAll<SpriteColliderGenerator>();
|
||||
foreach (var window in windows)
|
||||
{
|
||||
window.DrawColliderPreviews(sceneView);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawColliderPreviews(SceneView sceneView)
|
||||
{
|
||||
if (!previewColliders || previewMeshes.Count == 0)
|
||||
return;
|
||||
|
||||
// Draw all preview meshes with the selected color
|
||||
Material previewMaterial = new Material(Shader.Find("Hidden/Internal-Colored"));
|
||||
previewMaterial.SetPass(0);
|
||||
previewMaterial.SetColor("_Color", previewColor);
|
||||
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
GL.PushMatrix();
|
||||
GL.MultMatrix(Matrix4x4.identity);
|
||||
|
||||
// Enable blending for transparency
|
||||
GL.Begin(GL.TRIANGLES);
|
||||
GL.Color(previewColor);
|
||||
|
||||
foreach (var mesh in previewMeshes)
|
||||
{
|
||||
if (mesh != null)
|
||||
{
|
||||
// Draw each triangle in the mesh
|
||||
for (int i = 0; i < mesh.triangles.Length; i += 3)
|
||||
{
|
||||
Vector3 v0 = mesh.vertices[mesh.triangles[i]];
|
||||
Vector3 v1 = mesh.vertices[mesh.triangles[i + 1]];
|
||||
Vector3 v2 = mesh.vertices[mesh.triangles[i + 2]];
|
||||
|
||||
GL.Vertex(v0);
|
||||
GL.Vertex(v1);
|
||||
GL.Vertex(v2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL.End();
|
||||
GL.PopMatrix();
|
||||
|
||||
// Also draw the outline
|
||||
GL.PushMatrix();
|
||||
GL.MultMatrix(Matrix4x4.identity);
|
||||
GL.Begin(GL.LINES);
|
||||
|
||||
// Set a more visible outline color
|
||||
Color outlineColor = new Color(previewColor.r, previewColor.g, previewColor.b, 1f);
|
||||
GL.Color(outlineColor);
|
||||
|
||||
foreach (var mesh in previewMeshes)
|
||||
{
|
||||
if (mesh != null)
|
||||
{
|
||||
// Create a dictionary to track which edges we've drawn
|
||||
HashSet<string> drawnEdges = new HashSet<string>();
|
||||
|
||||
// Draw edges of each triangle
|
||||
for (int i = 0; i < mesh.triangles.Length; i += 3)
|
||||
{
|
||||
DrawEdgeIfNotDrawn(mesh.vertices[mesh.triangles[i]], mesh.vertices[mesh.triangles[i + 1]], drawnEdges);
|
||||
DrawEdgeIfNotDrawn(mesh.vertices[mesh.triangles[i + 1]], mesh.vertices[mesh.triangles[i + 2]], drawnEdges);
|
||||
DrawEdgeIfNotDrawn(mesh.vertices[mesh.triangles[i + 2]], mesh.vertices[mesh.triangles[i]], drawnEdges);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL.End();
|
||||
GL.PopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawEdgeIfNotDrawn(Vector3 v1, Vector3 v2, HashSet<string> drawnEdges)
|
||||
{
|
||||
// Create a unique key for this edge (order vertices to ensure uniqueness)
|
||||
string edgeKey;
|
||||
if (v1.x < v2.x || (v1.x == v2.x && v1.y < v2.y))
|
||||
edgeKey = $"{v1.x},{v1.y},{v1.z}_{v2.x},{v2.y},{v2.z}";
|
||||
else
|
||||
edgeKey = $"{v2.x},{v2.y},{v2.z}_{v1.x},{v1.y},{v1.z}";
|
||||
|
||||
// Only draw if we haven't drawn this edge yet
|
||||
if (!drawnEdges.Contains(edgeKey))
|
||||
{
|
||||
GL.Vertex(v1);
|
||||
GL.Vertex(v2);
|
||||
drawnEdges.Add(edgeKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Helper class for triangulating polygons
|
||||
public class Triangulator
|
||||
{
|
||||
private List<Vector2> m_points;
|
||||
|
||||
public Triangulator(Vector2[] points)
|
||||
{
|
||||
m_points = new List<Vector2>(points);
|
||||
}
|
||||
|
||||
public int[] Triangulate()
|
||||
{
|
||||
List<int> indices = new List<int>();
|
||||
|
||||
int n = m_points.Count;
|
||||
if (n < 3)
|
||||
return indices.ToArray();
|
||||
|
||||
int[] V = new int[n];
|
||||
if (Area() > 0)
|
||||
{
|
||||
for (int v = 0; v < n; v++)
|
||||
V[v] = v;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int v = 0; v < n; v++)
|
||||
V[v] = (n - 1) - v;
|
||||
}
|
||||
|
||||
int nv = n;
|
||||
int count = 2 * nv;
|
||||
for (int v = nv - 1; nv > 2; )
|
||||
{
|
||||
if ((count--) <= 0)
|
||||
return indices.ToArray();
|
||||
|
||||
int u = v;
|
||||
if (nv <= u)
|
||||
u = 0;
|
||||
v = u + 1;
|
||||
if (nv <= v)
|
||||
v = 0;
|
||||
int w = v + 1;
|
||||
if (nv <= w)
|
||||
w = 0;
|
||||
|
||||
if (Snip(u, v, w, nv, V))
|
||||
{
|
||||
int a, b, c, s, t;
|
||||
a = V[u];
|
||||
b = V[v];
|
||||
c = V[w];
|
||||
indices.Add(a);
|
||||
indices.Add(b);
|
||||
indices.Add(c);
|
||||
|
||||
for (s = v, t = v + 1; t < nv; s++, t++)
|
||||
V[s] = V[t];
|
||||
nv--;
|
||||
count = 2 * nv;
|
||||
}
|
||||
}
|
||||
|
||||
indices.Reverse();
|
||||
return indices.ToArray();
|
||||
}
|
||||
|
||||
private float Area()
|
||||
{
|
||||
int n = m_points.Count;
|
||||
float A = 0.0f;
|
||||
for (int p = n - 1, q = 0; q < n; p = q++)
|
||||
{
|
||||
Vector2 pval = m_points[p];
|
||||
Vector2 qval = m_points[q];
|
||||
A += pval.x * qval.y - qval.x * pval.y;
|
||||
}
|
||||
return (A * 0.5f);
|
||||
}
|
||||
|
||||
private bool Snip(int u, int v, int w, int n, int[] V)
|
||||
{
|
||||
int p;
|
||||
Vector2 A = m_points[V[u]];
|
||||
Vector2 B = m_points[V[v]];
|
||||
Vector2 C = m_points[V[w]];
|
||||
if (Mathf.Epsilon > (((B.x - A.x) * (C.y - A.y)) - ((B.y - A.y) * (C.x - A.x))))
|
||||
return false;
|
||||
for (p = 0; p < n; p++)
|
||||
{
|
||||
if ((p == u) || (p == v) || (p == w))
|
||||
continue;
|
||||
Vector2 P = m_points[V[p]];
|
||||
if (InsideTriangle(A, B, C, P))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool InsideTriangle(Vector2 A, Vector2 B, Vector2 C, Vector2 P)
|
||||
{
|
||||
float ax, ay, bx, by, cx, cy, apx, apy, bpx, bpy, cpx, cpy;
|
||||
float cCROSSap, bCROSScp, aCROSSbp;
|
||||
|
||||
ax = C.x - B.x; ay = C.y - B.y;
|
||||
bx = A.x - C.x; by = A.y - C.y;
|
||||
cx = B.x - A.x; cy = B.y - A.y;
|
||||
apx = P.x - A.x; apy = P.y - A.y;
|
||||
bpx = P.x - B.x; bpy = P.y - B.y;
|
||||
cpx = P.x - C.x; cpy = P.y - C.y;
|
||||
|
||||
aCROSSbp = ax * bpy - ay * bpx;
|
||||
cCROSSap = cx * apy - cy * apx;
|
||||
bCROSScp = bx * cpy - by * cpx;
|
||||
|
||||
return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Editor/Utilities/SpriteColliderGenerator.cs.meta
Normal file
3
Assets/Editor/Utilities/SpriteColliderGenerator.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 420526c0ea5943bb930e3e0913b9dee7
|
||||
timeCreated: 1758028488
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Pathfinding {
|
||||
using Pathfinding.RVO;
|
||||
@@ -260,6 +261,12 @@ namespace Pathfinding {
|
||||
reachedEndOfPath = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when the AI has reached its target.
|
||||
/// Subscribe to this to get notified when the agent reaches its destination.
|
||||
/// </summary>
|
||||
public event Action OnTargetReachedEvent;
|
||||
|
||||
/// <summary>
|
||||
/// The end of the path has been reached.
|
||||
/// If you want custom logic for when the AI has reached it's destination add it here. You can
|
||||
@@ -269,6 +276,7 @@ namespace Pathfinding {
|
||||
/// So when the agent is close to the destination this method will typically be called every <see cref="repathRate"/> seconds.
|
||||
/// </summary>
|
||||
public virtual void OnTargetReached () {
|
||||
OnTargetReachedEvent?.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
3
Assets/External/OptimizedRopesAndCables/OptimizedRope.asmdef
vendored
Normal file
3
Assets/External/OptimizedRopesAndCables/OptimizedRope.asmdef
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "OptimizedRope"
|
||||
}
|
||||
7
Assets/External/OptimizedRopesAndCables/OptimizedRope.asmdef.meta
vendored
Normal file
7
Assets/External/OptimizedRopesAndCables/OptimizedRope.asmdef.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7c43f01316c63c43a8b70a1dd6bdfac
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -75,8 +75,20 @@ namespace GogoGaga.OptimizedRopesAndCables
|
||||
|
||||
public bool IsPrefab => gameObject.scene.rootCount == 0;
|
||||
|
||||
private void Start()
|
||||
// Track initialization state
|
||||
private bool isInitialized = false;
|
||||
|
||||
/// <summary>
|
||||
/// Public method to explicitly initialize the rope.
|
||||
/// Call this after setting up endpoints if creating ropes at runtime.
|
||||
/// </summary>
|
||||
/// <returns>True if initialization was successful, false otherwise</returns>
|
||||
public bool Initialize()
|
||||
{
|
||||
// Skip if already initialized
|
||||
if (isInitialized)
|
||||
return true;
|
||||
|
||||
InitializeLineRenderer();
|
||||
if (AreEndPointsValid())
|
||||
{
|
||||
@@ -84,7 +96,17 @@ namespace GogoGaga.OptimizedRopesAndCables
|
||||
targetValue = currentValue;
|
||||
currentVelocity = Vector3.zero;
|
||||
SetSplinePoint(); // Ensure initial spline point is set correctly
|
||||
isInitialized = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Use the same initialization method to avoid code duplication
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
@@ -208,15 +230,62 @@ namespace GogoGaga.OptimizedRopesAndCables
|
||||
return point;
|
||||
}
|
||||
|
||||
public Vector3 GetPointAt(float t)
|
||||
/// <summary>
|
||||
/// Set the start point of the rope
|
||||
/// </summary>
|
||||
public void SetStartPoint(Transform newStartPoint, bool recalculateRope = false)
|
||||
{
|
||||
if (!AreEndPointsValid())
|
||||
{
|
||||
Debug.LogError("StartPoint or EndPoint is not assigned.", gameObject);
|
||||
return Vector3.zero;
|
||||
}
|
||||
startPoint = newStartPoint;
|
||||
if (recalculateRope)
|
||||
RecalculateRope();
|
||||
}
|
||||
|
||||
return GetRationalBezierPoint(startPoint.position, currentValue, endPoint.position, t, StartPointWeight, midPointWeight, EndPointWeight);
|
||||
/// <summary>
|
||||
/// Set the end point of the rope
|
||||
/// </summary>
|
||||
public void SetEndPoint(Transform newEndPoint, bool recalculateRope = false)
|
||||
{
|
||||
endPoint = newEndPoint;
|
||||
if (recalculateRope)
|
||||
RecalculateRope();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the mid point of the rope
|
||||
/// </summary>
|
||||
public void SetMidPoint(Transform newMidPoint, bool recalculateRope = false)
|
||||
{
|
||||
midPoint = newMidPoint;
|
||||
if (recalculateRope)
|
||||
RecalculateRope();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a point along the rope at the specified position (0-1)
|
||||
/// </summary>
|
||||
public Vector3 GetPointAt(float position)
|
||||
{
|
||||
position = Mathf.Clamp01(position);
|
||||
Vector3 mid = GetMidPoint();
|
||||
return GetRationalBezierPoint(startPoint.position, mid, endPoint.position, position, StartPointWeight, midPointWeight, EndPointWeight);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force recalculation of the rope
|
||||
/// </summary>
|
||||
public void RecalculateRope()
|
||||
{
|
||||
if (!isInitialized)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
if (AreEndPointsValid())
|
||||
{
|
||||
SetSplinePoint();
|
||||
SimulatePhysics();
|
||||
NotifyPointsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
@@ -262,61 +331,6 @@ namespace GogoGaga.OptimizedRopesAndCables
|
||||
// Gizmos.DrawSphere(midPos, 0.2f);
|
||||
}
|
||||
|
||||
// New API methods for setting start and end points
|
||||
// with instantAssign parameter to recalculate the rope immediately, without
|
||||
// animating the rope to the new position.
|
||||
// When newStartPoint or newEndPoint is null, the rope will be recalculated immediately
|
||||
|
||||
public void SetStartPoint(Transform newStartPoint, bool instantAssign = false)
|
||||
{
|
||||
startPoint = newStartPoint;
|
||||
prevStartPointPosition = startPoint == null ? Vector3.zero : startPoint.position;
|
||||
|
||||
if (instantAssign || newStartPoint == null)
|
||||
{
|
||||
RecalculateRope();
|
||||
}
|
||||
|
||||
NotifyPointsChanged();
|
||||
}
|
||||
public void SetMidPoint(Transform newMidPoint, bool instantAssign = false)
|
||||
{
|
||||
midPoint = newMidPoint;
|
||||
prevMidPointPosition = midPoint == null ? 0.5f : midPointPosition;
|
||||
|
||||
if (instantAssign || newMidPoint == null)
|
||||
{
|
||||
RecalculateRope();
|
||||
}
|
||||
NotifyPointsChanged();
|
||||
}
|
||||
|
||||
public void SetEndPoint(Transform newEndPoint, bool instantAssign = false)
|
||||
{
|
||||
endPoint = newEndPoint;
|
||||
prevEndPointPosition = endPoint == null ? Vector3.zero : endPoint.position;
|
||||
|
||||
if (instantAssign || newEndPoint == null)
|
||||
{
|
||||
RecalculateRope();
|
||||
}
|
||||
|
||||
NotifyPointsChanged();
|
||||
}
|
||||
|
||||
public void RecalculateRope()
|
||||
{
|
||||
if (!AreEndPointsValid())
|
||||
{
|
||||
lineRenderer.positionCount = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
currentValue = GetMidPoint();
|
||||
targetValue = currentValue;
|
||||
currentVelocity = Vector3.zero;
|
||||
SetSplinePoint();
|
||||
}
|
||||
|
||||
private void NotifyPointsChanged()
|
||||
{
|
||||
|
||||
8
Assets/Playables.meta
Normal file
8
Assets/Playables.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c0088270c13b3a4e8ce04a3f672887d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1248
Assets/Playables/SurfacingTimeline.playable
Normal file
1248
Assets/Playables/SurfacingTimeline.playable
Normal file
File diff suppressed because it is too large
Load Diff
8
Assets/Playables/SurfacingTimeline.playable.meta
Normal file
8
Assets/Playables/SurfacingTimeline.playable.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ecd3cfdb172df5439e4522c15c48f75
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,9 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7204028979372864050}
|
||||
- component: {fileID: 428866831124527047}
|
||||
- component: {fileID: 9146368976740011109}
|
||||
- component: {fileID: 2495203636023808437}
|
||||
m_Layer: 0
|
||||
m_Layer: 10
|
||||
m_Name: annelise_sprite
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -78,7 +77,7 @@ SpriteRenderer:
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_SortingOrder: 1
|
||||
m_Sprite: {fileID: -1179960714, guid: 99d4c3083e9c24142bc20deaeaf95720, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
@@ -90,43 +89,6 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!70 &9146368976740011109
|
||||
CapsuleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1501762630858354458}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 1.687}
|
||||
m_Size: {x: 2.59, y: 4.82}
|
||||
m_Direction: 0
|
||||
--- !u!95 &2495203636023808437
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
@@ -159,7 +121,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 163349679637932333}
|
||||
- component: {fileID: 3933955841584214629}
|
||||
m_Layer: 0
|
||||
m_Layer: 10
|
||||
m_Name: Flash
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -224,7 +186,7 @@ SpriteRenderer:
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_SortingOrder: 2
|
||||
m_Sprite: {fileID: 3625043607559282579, guid: 19fb86013d8c24d6cb8410c0aadf30fa, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
@@ -245,9 +207,13 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8523100300591212744}
|
||||
- component: {fileID: 7870441803139401704}
|
||||
- component: {fileID: 7703867214257508887}
|
||||
- component: {fileID: 4102529980491997365}
|
||||
- component: {fileID: 7273455074532059757}
|
||||
- component: {fileID: 63711523903468834}
|
||||
- component: {fileID: 9136625393187827797}
|
||||
- component: {fileID: 935652268781177375}
|
||||
- component: {fileID: 6455089331794006644}
|
||||
- component: {fileID: 5043618791380611472}
|
||||
- component: {fileID: 4538351495758615844}
|
||||
m_Layer: 10
|
||||
m_Name: AnneLise_Camera
|
||||
m_TagString: Untagged
|
||||
@@ -265,13 +231,130 @@ Transform:
|
||||
serializedVersion: 2
|
||||
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_LocalScale: {x: 1.2, y: 1.2, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 7204028979372864050}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7870441803139401704
|
||||
--- !u!114 &7273455074532059757
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0d1761ee6769c243b110122f5e17b73, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
moveSpeed: 30
|
||||
--- !u!114 &63711523903468834
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 373b52eb9bf8c40f785bb6947a1aee66, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 1
|
||||
drawGizmos: 1
|
||||
detailedGizmos: 0
|
||||
startEndModifier:
|
||||
addPoints: 0
|
||||
exactStartPoint: 3
|
||||
exactEndPoint: 3
|
||||
useRaycasting: 0
|
||||
mask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
useGraphRaycasting: 0
|
||||
traversableTags: -1
|
||||
tagPenalties: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
graphMask:
|
||||
value: -1
|
||||
--- !u!114 &9136625393187827797
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f6eb1402c17e84a9282a7f0f62eb584f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 5
|
||||
radius: 0.5
|
||||
height: 2
|
||||
canMove: 1
|
||||
maxSpeed: 30
|
||||
gravity: {x: 0, y: 0, z: 0}
|
||||
groundMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
centerOffsetCompatibility: NaN
|
||||
repathRateCompatibility: NaN
|
||||
canSearchCompability: 0
|
||||
orientation: 1
|
||||
enableRotation: 0
|
||||
autoRepath:
|
||||
mode: 2
|
||||
interval: 0.5
|
||||
sensitivity: 10
|
||||
maximumInterval: 2
|
||||
visualizeSensitivity: 0
|
||||
targetCompatibility: {fileID: 0}
|
||||
maxAcceleration: 1000
|
||||
rotationSpeed: 360
|
||||
slowdownDistance: 0.6
|
||||
pickNextWaypointDist: 2
|
||||
endReachedDistance: 0.2
|
||||
alwaysDrawGizmos: 0
|
||||
slowWhenNotFacingTarget: 1
|
||||
whenCloseToDestination: 0
|
||||
constrainInsideGraph: 0
|
||||
--- !u!114 &935652268781177375
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 55938fb1577dd4ad3af7e994048c86f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &6455089331794006644
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cb6a34d769a1e4ac7b0b30e433aa443c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 1
|
||||
smoothType: 0
|
||||
subdivisions: 2
|
||||
iterations: 2
|
||||
strength: 0.5
|
||||
uniformLength: 1
|
||||
maxSegmentLength: 2
|
||||
bezierTangentLength: 0.4
|
||||
offset: 0.2
|
||||
factor: 0.1
|
||||
--- !u!114 &5043618791380611472
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -283,13 +366,43 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 73d6494a73174ffabc6a7d3089d51e73, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!65 &7703867214257508887
|
||||
BoxCollider:
|
||||
isOneTime: 0
|
||||
cooldown: -1
|
||||
characterToInteract: 0
|
||||
interactionStarted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
interactionInterrupted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
characterArrived:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 7273455074532059757}
|
||||
m_TargetAssemblyTypeName: AnneLiseBehaviour, AppleHillsScripts
|
||||
m_MethodName: TrafalgarTouchedAnnaLise
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
interactionComplete:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!61 &4538351495758615844
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
@@ -298,64 +411,31 @@ BoxCollider:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4102529980491997365
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5172497182660285677}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 1.6}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 4, y: 5}
|
||||
m_EdgeRadius: 0
|
||||
|
||||
@@ -87,116 +87,6 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &3617455498829757156
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4388395494483065101}
|
||||
- component: {fileID: 4237100461469772044}
|
||||
- component: {fileID: 2472695135799577718}
|
||||
m_Layer: 0
|
||||
m_Name: FootballBird
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4388395494483065101
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3617455498829757156}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.8479085, y: -0.13594438, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.50000006, z: 0.50000006}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1924342418841580}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4237100461469772044
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3617455498829757156}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!95 &2472695135799577718
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3617455498829757156}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 0}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!1 &7249528695393012044
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -211,6 +101,7 @@ GameObject:
|
||||
- component: {fileID: 8818689886719637838}
|
||||
- component: {fileID: 8578055200319571631}
|
||||
- component: {fileID: 3487003259787903584}
|
||||
- component: {fileID: 2277261512137882881}
|
||||
m_Layer: 10
|
||||
m_Name: LureSpotA
|
||||
m_TagString: Untagged
|
||||
@@ -232,6 +123,7 @@ Transform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 7442421452951837692}
|
||||
- {fileID: 2784061204862661225}
|
||||
- {fileID: 5375394469162727687}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -441,8 +333,142 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 2226aecbed4b1f143a5a5c5be4236957, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerToPlaceDistance: 40
|
||||
playerToPlaceDistance: 35
|
||||
birdEyes: {fileID: 7602419655779381936}
|
||||
--- !u!114 &2277261512137882881
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7249528695393012044}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1101f6c4eb04423b89dc78dc7c9f1aae, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
stepData: {fileID: 11400000, guid: 0fb0ab2b55d93a24685e9f6651adcf30, type: 2}
|
||||
--- !u!1 &7675352645851726746
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2784061204862661225}
|
||||
m_Layer: 0
|
||||
m_Name: AnneLisePositionA
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2784061204862661225
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7675352645851726746}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -7.88, y: 0.78, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2045549771447434109}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &3727919522638045464
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1924342418841580}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: GotoSpot
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: AnneLiseBehaviour, AppleHillsScripts
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgument
|
||||
value:
|
||||
objectReference: {fileID: 7675352645851726746}
|
||||
- target: {fileID: 1597866798502552092, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.GameObject, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1784002662241348359, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: FootballBird
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
--- !u!4 &6063784346986324055 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7465517589433942351, guid: 9b2d5618c8cc81743b982c6cc8d95871, type: 3}
|
||||
m_PrefabInstance: {fileID: 3727919522638045464}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &7700829900874995671
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -529,11 +555,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 0.99999994
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.99999994
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
@@ -549,7 +575,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8828658103663197825, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5210033153524231666, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
@@ -558,7 +584,7 @@ PrefabInstance:
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 4388395494483065101}
|
||||
addedObject: {fileID: 6063784346986324055}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
--- !u!4 &1924342418841580 stripped
|
||||
|
||||
@@ -26,7 +26,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1985797937494910982}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.279, y: -0.097, z: 0}
|
||||
m_LocalPosition: {x: 1.22, y: 0.62, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -87,6 +87,93 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &5236930998804014616
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5654042452373662053}
|
||||
- component: {fileID: 5493660251969001565}
|
||||
m_Layer: 6
|
||||
m_Name: Wolter
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5654042452373662053
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5236930998804014616}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 3.8, y: -3.97, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1612320017392831473}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5493660251969001565
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5236930998804014616}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 1
|
||||
m_Sprite: {fileID: 7178426778054925818, guid: 28ba121120cdf5348aac373d9088c0de, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 2.82, y: 4.43}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &5835735262203788332
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -101,6 +188,7 @@ GameObject:
|
||||
- component: {fileID: 4289780218821574471}
|
||||
- component: {fileID: 3093816592344978065}
|
||||
- component: {fileID: 8758136668472096799}
|
||||
- component: {fileID: 488333850132012697}
|
||||
m_Layer: 10
|
||||
m_Name: LureSpotB
|
||||
m_TagString: Untagged
|
||||
@@ -122,6 +210,8 @@ Transform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 779234943217098985}
|
||||
- {fileID: 6009911529133800530}
|
||||
- {fileID: 3022736757165821944}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &6583028881099676536
|
||||
@@ -271,13 +361,49 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
onItemSlotRemoved:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 786704689256514639}
|
||||
m_TargetAssemblyTypeName: BirdEyesBehavior, AppleHillsScripts
|
||||
m_MethodName: NoItem
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
onCorrectItemSlotted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 786704689256514639}
|
||||
m_TargetAssemblyTypeName: BirdEyesBehavior, AppleHillsScripts
|
||||
m_MethodName: CorrectItem
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
onIncorrectItemSlotted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 786704689256514639}
|
||||
m_TargetAssemblyTypeName: BirdEyesBehavior, AppleHillsScripts
|
||||
m_MethodName: IncorrectItem
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
onForbiddenItemSlotted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
@@ -295,3 +421,270 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
stepData: {fileID: 11400000, guid: d0851a7610551104fa285c0748549d90, type: 2}
|
||||
--- !u!114 &488333850132012697
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5835735262203788332}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2226aecbed4b1f143a5a5c5be4236957, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerToPlaceDistance: 25
|
||||
birdEyes: {fileID: 786704689256514639}
|
||||
--- !u!1 &6865758097422051095
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1612320017392831473}
|
||||
- component: {fileID: 8300318837081889711}
|
||||
m_Layer: 6
|
||||
m_Name: BirdSpawned
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1612320017392831473
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6865758097422051095}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -6.6462555, y: 2.6127002, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5654042452373662053}
|
||||
- {fileID: 5990546859970263031}
|
||||
m_Father: {fileID: 3022736757165821944}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8300318837081889711
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6865758097422051095}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eaefd3d5a2a864ca5b5d9ec5f2a7040f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &8791175698629293423
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6009911529133800530}
|
||||
m_Layer: 10
|
||||
m_Name: AnneLisePositionB
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6009911529133800530
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8791175698629293423}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -6.41, y: 0.44, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6078012632802010276}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &699465474415911208
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 6078012632802010276}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1370564349707122423, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BirdEyesB
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.9062557
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 2.8123
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3532512445619884959, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -6.52
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 3.72
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9540502
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.299647
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -34.873
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 8828658103663197825, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1612320017392831473}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
--- !u!114 &786704689256514639 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 243176356944356711, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_PrefabInstance: {fileID: 699465474415911208}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 13d59d3c42170824b8f92557822d9bf0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &3022736757165821944 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_PrefabInstance: {fileID: 699465474415911208}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &4445337424770836952
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1612320017392831473}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1282228733406082151, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Headband
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 7.29
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -6.27
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5935055277585311711, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
--- !u!4 &5990546859970263031 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7967906181784854063, guid: fde0c702b7c4ea3439502cfb575ac77a, type: 3}
|
||||
m_PrefabInstance: {fileID: 4445337424770836952}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -25,8 +25,8 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 725521450222831012}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.667, z: 0}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.09, y: 0.54, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -109,7 +109,7 @@ Transform:
|
||||
m_GameObject: {fileID: 4316370833098727305}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.468, y: 1.315, z: 0}
|
||||
m_LocalPosition: {x: 0.53, y: 1.22, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -183,7 +183,9 @@ GameObject:
|
||||
- component: {fileID: 1857323601952658682}
|
||||
- component: {fileID: 519585874127847016}
|
||||
- component: {fileID: 106497079666291966}
|
||||
- component: {fileID: 6535246856440349519}
|
||||
- component: {fileID: 3169137887822749614}
|
||||
- component: {fileID: 8370367816617117734}
|
||||
m_Layer: 10
|
||||
m_Name: LureSpotC
|
||||
m_TagString: Untagged
|
||||
@@ -200,12 +202,14 @@ Transform:
|
||||
m_GameObject: {fileID: 7145022056631397938}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 13.14, y: 26.67, z: 0}
|
||||
m_LocalPosition: {x: 13.17, y: 26.6, z: 0}
|
||||
m_LocalScale: {x: 2, y: 2, z: 2}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 7964773102256504836}
|
||||
- {fileID: 1828079450404796388}
|
||||
- {fileID: 6458149385295467297}
|
||||
- {fileID: 4890763895574548764}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5015123355472106337
|
||||
@@ -257,12 +261,12 @@ SpriteRenderer:
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 5.75, y: 3.38}
|
||||
m_Size: {x: 5.75, y: 2.78}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!61 &1857323601952658682
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -297,17 +301,17 @@ BoxCollider2D:
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0.18595695}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 5.75, y: 3.38}
|
||||
newSize: {x: 5.75, y: 3.38}
|
||||
newSize: {x: 5.75, y: 2.78}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.75, y: 2.8364315}
|
||||
m_Size: {x: 5.75, y: 2.78}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!114 &519585874127847016
|
||||
MonoBehaviour:
|
||||
@@ -355,17 +359,67 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
onItemSlotRemoved:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 6973682693496150699}
|
||||
m_TargetAssemblyTypeName: BirdEyesBehavior, Assembly-CSharp
|
||||
m_MethodName: NoItem
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
onCorrectItemSlotted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 6973682693496150699}
|
||||
m_TargetAssemblyTypeName: BirdEyesBehavior, Assembly-CSharp
|
||||
m_MethodName: CorrectItem
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
onIncorrectItemSlotted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 6973682693496150699}
|
||||
m_TargetAssemblyTypeName: BirdEyesBehavior, Assembly-CSharp
|
||||
m_MethodName: IncorrectItem
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
onForbiddenItemSlotted:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
slottedItemRenderer: {fileID: 3806274462998212361}
|
||||
--- !u!114 &6535246856440349519
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7145022056631397938}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2226aecbed4b1f143a5a5c5be4236957, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerToPlaceDistance: 30
|
||||
birdEyes: {fileID: 6973682693496150699}
|
||||
--- !u!114 &3169137887822749614
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -379,3 +433,289 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
stepData: {fileID: 11400000, guid: 28848561ff31fe24ea9f8590dee0bf8f, type: 2}
|
||||
--- !u!114 &8370367816617117734
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7145022056631397938}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78f015ca3cba1d54382afba790601471, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
luredBird: {fileID: 0}
|
||||
annaLiseSpot: {fileID: 0}
|
||||
--- !u!1 &7627197106378853261
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6458149385295467297}
|
||||
m_Layer: 0
|
||||
m_Name: AnneLisePositionC
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6458149385295467297
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7627197106378853261}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -5.44, y: 0.96, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6583016841553003224}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &41304055486298169
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 666692440329091063}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1597866798502552092, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgument
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1597866798502552092, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1784002662241348359, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: HammerBird
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 1.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.57
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
--- !u!4 &7424295450283293046 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7465517589433942351, guid: e3d6494020df3a34f88a89f0ee9a3527, type: 3}
|
||||
m_PrefabInstance: {fileID: 41304055486298169}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &7176645356469469132
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 6583016841553003224}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1370564349707122423, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BirdEyesC
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 6.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 8.87
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3013218424693156287, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_FlipX
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3013218424693156287, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_SortingOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3532512445619884959, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -11.08
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.33
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.925592
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.3785226
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4477179922705334961, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -44.484
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -6.86
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -6.98
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8828658103663197825, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 5210033153524231666, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
- {fileID: 4408373410605328204, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 7424295450283293046}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
--- !u!4 &666692440329091063 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 7698905571408300091, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_PrefabInstance: {fileID: 7176645356469469132}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!4 &4890763895574548764 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 2326086342663433936, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_PrefabInstance: {fileID: 7176645356469469132}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &6973682693496150699 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 243176356944356711, guid: 185f4e1548ec9754893c0a17f2207c44, type: 3}
|
||||
m_PrefabInstance: {fileID: 7176645356469469132}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 13d59d3c42170824b8f92557822d9bf0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
|
||||
@@ -73,8 +73,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: 622133659
|
||||
m_SortingLayer: -1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 8944853044452083345, guid: 4ad95f797558b28478685ca60bd90ff4, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -134,4 +134,3 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
speed: 1
|
||||
wobbleSpeed: 1
|
||||
wobbleAmount: 0.1
|
||||
|
||||
@@ -14,23 +14,23 @@ PrefabInstance:
|
||||
objectReference: {fileID: 11400000, guid: ab57c8237aac144439a18d69f56d36c6, type: 2}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1.5
|
||||
value: 0.8000001
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1.5
|
||||
value: 0.8000001
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 0.5
|
||||
value: 0.26666668
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 54.83
|
||||
value: 1.25
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -35.53
|
||||
value: 0.57
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1730119453103664125, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
@@ -124,10 +124,38 @@ PrefabInstance:
|
||||
propertyPath: m_WasSpriteAssigned
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: isOneTime
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterToInteract
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.size
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: GotoSpot
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: AnneLiseBehaviour, AppleHillsScripts
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7616859841301711022, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
propertyPath: characterArrived.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
|
||||
value: UnityEngine.GameObject, UnityEngine
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents:
|
||||
- {fileID: 592045584872845087, guid: bf4b9d7045397f946b2125b1ad4a3fbd, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4743746373562280435
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7889589254526244618}
|
||||
- component: {fileID: 2565520060777160406}
|
||||
- component: {fileID: 586678365535466516}
|
||||
- component: {fileID: 3635110434097976059}
|
||||
m_Layer: 11
|
||||
m_Name: FloatingObstacle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7889589254526244618
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4743746373562280435}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.62358, y: 4.23222, z: 0}
|
||||
m_LocalScale: {x: 5, y: 5, z: 5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2565520060777160406
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4743746373562280435}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 32718083aef44be2a4318681fcdf5b2e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
prefabIndex: 0
|
||||
damage: 1
|
||||
moveSpeed: 2
|
||||
enableMovement: 1
|
||||
spawner: {fileID: 0}
|
||||
--- !u!212 &586678365535466516
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4743746373562280435}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Color: {r: 0.9150943, g: 0, b: 0, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 0.16, y: 0.16}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!61 &3635110434097976059
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4743746373562280435}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0.049999997, y: 0.049999997, z: 0.049999997, w: 0.049999997}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 0.16, y: 0.16}
|
||||
newSize: {x: 0.16, y: 0.16}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 0.16, y: 0.16}
|
||||
m_EdgeRadius: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 315a624eb99600444a51bb1d37c51742
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3481232588610935369
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4085125724917306679}
|
||||
- component: {fileID: 3621591697259925837}
|
||||
m_Layer: 0
|
||||
m_Name: MonsterSpawnPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4085125724917306679
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3481232588610935369}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.86637, y: -0.03259, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &3621591697259925837
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3481232588610935369}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5ddb6d3629fe4b46b1d7ae972a83539c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
gizmoRadius: 0.5
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da700d1636dcd9348bc52deaf44bdfb7
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
140
Assets/Prefabs/Minigames/DivingForPictures/QuarryMonster.prefab
Normal file
140
Assets/Prefabs/Minigames/DivingForPictures/QuarryMonster.prefab
Normal file
@@ -0,0 +1,140 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2015720985618639356
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6779310478082390115}
|
||||
- component: {fileID: 8447572436637192077}
|
||||
- component: {fileID: 4998672042618199381}
|
||||
- component: {fileID: 3714732064953161914}
|
||||
m_Layer: 12
|
||||
m_Name: QuarryMonster
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6779310478082390115
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2015720985618639356}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 2.46, y: -1.79, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &8447572436637192077
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2015720985618639356}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: -9125130289615156199, guid: 1021fffcba2a03d40ae5371555089a22, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 2.46, y: 3.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!58 &4998672042618199381
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2015720985618639356}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Radius: 3
|
||||
--- !u!114 &3714732064953161914
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2015720985618639356}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e1b1889b120f4259a9fa9b7e415ea58a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
detectionCollider: {fileID: 4998672042618199381}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7754d064d743d1b419acb859c2db6121
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,59 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &7921038058497292108
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2015720985618639356, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: QuarryMonster_monster_head1_1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.46
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.79
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd5c27c38c427524988b8932e7205d81
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &7839076539202245770
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2015720985618639356, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: QuarryMonster_monster_head2_0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.46
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.79
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8447572436637192077, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: -7812277834941893986, guid: e9ac6c3e349f9b247a0ea03665da57ce, type: 3}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c45910be7187144b8d2af12ff772353
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &4541086625678702007
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2015720985618639356, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: QuarryMonster_monster_head3_0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.46
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.79
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8447572436637192077, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: 4139348639081821586, guid: 1043ceca06eb2ac48b22c20d281278b0, type: 3}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0d4b6d8a3b9a2447b883a78c568826c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &1190377006705176201
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 2015720985618639356, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: QuarryMonster_monster_head4_0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.46
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.79
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6779310478082390115, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8447572436637192077, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
propertyPath: m_Sprite
|
||||
value:
|
||||
objectReference: {fileID: -3471612407960728276, guid: c85ce41979ed896429c62330c546d3ce, type: 3}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 7754d064d743d1b419acb859c2db6121, type: 3}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d23561cb618e86409a2b7ccbf08e37d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -10,7 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7111145574660306503}
|
||||
- component: {fileID: 3889795708575321074}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 8688779957837852254}
|
||||
m_Layer: 6
|
||||
m_Name: Left_Tile2_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.77, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -73,8 +74,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 7559449286846427561, guid: e3d18475ab86b1246912f497417465f8, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -87,6 +88,63 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &8688779957837852254
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.37, y: 5}
|
||||
newSize: {x: 2.37, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.575, y: -1.5}
|
||||
- {x: 0.185, y: -0.63}
|
||||
- {x: 1.145, y: 0.85999995}
|
||||
- {x: 1.185, y: 1.41}
|
||||
- {x: 0.835, y: 1.8499999}
|
||||
- {x: 0.635, y: 2.5}
|
||||
- {x: -1.185, y: 2.5}
|
||||
- {x: -1.185, y: -2.5}
|
||||
- {x: 0.635, y: -2.5}
|
||||
- {x: 0.625, y: -1.64}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2171518497100337372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -97,7 +155,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1003080013996268193}
|
||||
- component: {fileID: 4856205316150460481}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 8615330168962481848}
|
||||
m_Layer: 6
|
||||
m_Name: Right_Tile1_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -113,7 +172,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.95, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -160,8 +219,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -174,6 +233,67 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &8615330168962481848
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.65, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: -0.48499998, y: 2.5}
|
||||
- {x: -0.49499997, y: 2.19}
|
||||
- {x: 0.035, y: 1.66}
|
||||
- {x: -0.285, y: 0.90999997}
|
||||
- {x: -0.13499999, y: 0.45999998}
|
||||
- {x: -1.115, y: -0.03}
|
||||
- {x: -1.3249999, y: -0.35}
|
||||
- {x: -1.2049999, y: -0.84999996}
|
||||
- {x: -0.36499998, y: -1.0699999}
|
||||
- {x: -0.585, y: -1.27}
|
||||
- {x: -0.625, y: -1.65}
|
||||
- {x: -0.48499998, y: -2.5}
|
||||
- {x: 1.3249999, y: -2.5}
|
||||
- {x: 1.3249999, y: 2.5}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2956826569642009690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -183,6 +303,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925660644986369589}
|
||||
- component: {fileID: 2488201930835981397}
|
||||
m_Layer: 0
|
||||
m_Name: Tile1
|
||||
m_TagString: Untagged
|
||||
@@ -205,5 +326,144 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 7111145574660306503}
|
||||
- {fileID: 1003080013996268193}
|
||||
- {fileID: 7482385467620467196}
|
||||
- {fileID: 3904535660151308887}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2488201930835981397
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2956826569642009690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41def183b6714aca97663d74cc2d0678, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tileIndex: 0
|
||||
--- !u!1001 &1053554571951708000
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.24
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.71
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &3904535660151308887 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 1053554571951708000}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &6874619227254404299
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2.31
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.69
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &7482385467620467196 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 6874619227254404299}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -10,7 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7111145574660306503}
|
||||
- component: {fileID: 3889795708575321074}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 8698932925238153222}
|
||||
m_Layer: 6
|
||||
m_Name: Left_Tile2_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -3.093, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -73,8 +74,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 7559449286846427561, guid: e3d18475ab86b1246912f497417465f8, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -87,6 +88,63 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &8698932925238153222
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.37, y: 5}
|
||||
newSize: {x: 2.37, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.575, y: -1.5}
|
||||
- {x: 0.185, y: -0.63}
|
||||
- {x: 1.145, y: 0.85999995}
|
||||
- {x: 1.185, y: 1.41}
|
||||
- {x: 0.835, y: 1.8499999}
|
||||
- {x: 0.635, y: 2.5}
|
||||
- {x: -1.185, y: 2.5}
|
||||
- {x: -1.185, y: -2.5}
|
||||
- {x: 0.635, y: -2.5}
|
||||
- {x: 0.625, y: -1.64}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2171518497100337372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -97,7 +155,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1003080013996268193}
|
||||
- component: {fileID: 4856205316150460481}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 1368284191430742655}
|
||||
m_Layer: 6
|
||||
m_Name: Right_Tile1_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -113,7 +172,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.627, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -160,8 +219,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -174,6 +233,67 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &1368284191430742655
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.65, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: -0.48499998, y: 2.5}
|
||||
- {x: -0.49499997, y: 2.19}
|
||||
- {x: 0.035, y: 1.66}
|
||||
- {x: -0.285, y: 0.90999997}
|
||||
- {x: -0.13499999, y: 0.45999998}
|
||||
- {x: -1.115, y: -0.03}
|
||||
- {x: -1.3249999, y: -0.35}
|
||||
- {x: -1.2049999, y: -0.84999996}
|
||||
- {x: -0.36499998, y: -1.0699999}
|
||||
- {x: -0.585, y: -1.27}
|
||||
- {x: -0.625, y: -1.65}
|
||||
- {x: -0.48499998, y: -2.5}
|
||||
- {x: 1.3249999, y: -2.5}
|
||||
- {x: 1.3249999, y: 2.5}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2956826569642009690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -183,6 +303,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925660644986369589}
|
||||
- component: {fileID: 7876353970701168068}
|
||||
m_Layer: 0
|
||||
m_Name: Tile1_flipped
|
||||
m_TagString: Untagged
|
||||
@@ -205,5 +326,144 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 7111145574660306503}
|
||||
- {fileID: 1003080013996268193}
|
||||
- {fileID: 5183714158540249435}
|
||||
- {fileID: 4427395838151565125}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
|
||||
--- !u!114 &7876353970701168068
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2956826569642009690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41def183b6714aca97663d74cc2d0678, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tileIndex: 0
|
||||
--- !u!1001 &414345722529352306
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2.26
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.72
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &4427395838151565125 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 414345722529352306}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &9169619816711310444
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1.48
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &5183714158540249435 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 9169619816711310444}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -10,7 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7111145574660306503}
|
||||
- component: {fileID: 3889795708575321074}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 6919687589473331973}
|
||||
m_Layer: 6
|
||||
m_Name: Left_Tile2_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.64, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -73,8 +74,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -87,6 +88,72 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &6919687589473331973
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.37, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.635, y: -1.78}
|
||||
- {x: 0.585, y: -1.27}
|
||||
- {x: 0.36499998, y: -1.14}
|
||||
- {x: 0.415, y: -1.05}
|
||||
- {x: 1.2149999, y: -0.85999995}
|
||||
- {x: 1.3249999, y: -0.7}
|
||||
- {x: 1.3249999, y: -0.35}
|
||||
- {x: 1.145, y: -0.049999997}
|
||||
- {x: 0.13499999, y: 0.45999998}
|
||||
- {x: 0.275, y: 0.87}
|
||||
- {x: 0.265, y: 1.0699999}
|
||||
- {x: -0.044999998, y: 1.41}
|
||||
- {x: -0.035, y: 1.66}
|
||||
- {x: 0.48499998, y: 2.2}
|
||||
- {x: 0.49499997, y: 2.48}
|
||||
- {x: -1.3249999, y: 2.5}
|
||||
- {x: -1.3249999, y: -2.5}
|
||||
- {x: 0.505, y: -2.5}
|
||||
- {x: 0.555, y: -2.12}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2171518497100337372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -97,7 +164,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1003080013996268193}
|
||||
- component: {fileID: 4856205316150460481}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 1911291775322313535}
|
||||
m_Layer: 6
|
||||
m_Name: Right_Tile1_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -113,7 +181,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 3.08, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -160,8 +228,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 2764166773722941650, guid: f7ec8080b46b20f459d02e73b12f1694, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -174,6 +242,65 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &1911291775322313535
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.37, y: 5}
|
||||
newSize: {x: 2.65, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: -0.635, y: 2.5}
|
||||
- {x: -0.835, y: 1.8499999}
|
||||
- {x: -1.185, y: 1.42}
|
||||
- {x: -1.185, y: 1.06}
|
||||
- {x: -1.055, y: 0.69}
|
||||
- {x: -0.185, y: -0.65999997}
|
||||
- {x: -0.175, y: -0.78999996}
|
||||
- {x: -0.585, y: -1.49}
|
||||
- {x: -0.675, y: -2.08}
|
||||
- {x: -0.635, y: -2.5}
|
||||
- {x: 1.185, y: -2.5}
|
||||
- {x: 1.185, y: 2.5}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2956826569642009690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -183,6 +310,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925660644986369589}
|
||||
- component: {fileID: 2017387953723006367}
|
||||
m_Layer: 0
|
||||
m_Name: Tile2
|
||||
m_TagString: Untagged
|
||||
@@ -205,5 +333,144 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 7111145574660306503}
|
||||
- {fileID: 1003080013996268193}
|
||||
- {fileID: 779930052227149768}
|
||||
- {fileID: 6717719249848646349}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2017387953723006367
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2956826569642009690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41def183b6714aca97663d74cc2d0678, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tileIndex: 0
|
||||
--- !u!1001 &3630911149016824575
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.27
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -0.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &779930052227149768 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 3630911149016824575}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &7317058718762905594
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -1.98
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &6717719249848646349 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 7317058718762905594}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -10,7 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7111145574660306503}
|
||||
- component: {fileID: 3889795708575321074}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 3320970211105392876}
|
||||
m_Layer: 6
|
||||
m_Name: Left_Tile2_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.95, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -73,8 +74,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -87,6 +88,72 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &3320970211105392876
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.37, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.635, y: -1.78}
|
||||
- {x: 0.585, y: -1.27}
|
||||
- {x: 0.36499998, y: -1.14}
|
||||
- {x: 0.415, y: -1.05}
|
||||
- {x: 1.2149999, y: -0.85999995}
|
||||
- {x: 1.3249999, y: -0.7}
|
||||
- {x: 1.3249999, y: -0.35}
|
||||
- {x: 1.145, y: -0.049999997}
|
||||
- {x: 0.13499999, y: 0.45999998}
|
||||
- {x: 0.275, y: 0.87}
|
||||
- {x: 0.265, y: 1.0699999}
|
||||
- {x: -0.044999998, y: 1.41}
|
||||
- {x: -0.035, y: 1.66}
|
||||
- {x: 0.48499998, y: 2.2}
|
||||
- {x: 0.49499997, y: 2.48}
|
||||
- {x: -1.3249999, y: 2.5}
|
||||
- {x: -1.3249999, y: -2.5}
|
||||
- {x: 0.505, y: -2.5}
|
||||
- {x: 0.555, y: -2.12}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2171518497100337372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -97,7 +164,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1003080013996268193}
|
||||
- component: {fileID: 4856205316150460481}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 3931598674086383704}
|
||||
m_Layer: 6
|
||||
m_Name: Right_Tile1_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -113,7 +181,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.77, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -160,8 +228,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 2764166773722941650, guid: f7ec8080b46b20f459d02e73b12f1694, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -174,6 +242,65 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &3931598674086383704
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.37, y: 5}
|
||||
newSize: {x: 2.65, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: -0.635, y: 2.5}
|
||||
- {x: -0.835, y: 1.8499999}
|
||||
- {x: -1.185, y: 1.42}
|
||||
- {x: -1.185, y: 1.06}
|
||||
- {x: -1.055, y: 0.69}
|
||||
- {x: -0.185, y: -0.65999997}
|
||||
- {x: -0.175, y: -0.78999996}
|
||||
- {x: -0.585, y: -1.49}
|
||||
- {x: -0.675, y: -2.08}
|
||||
- {x: -0.635, y: -2.5}
|
||||
- {x: 1.185, y: -2.5}
|
||||
- {x: 1.185, y: 2.5}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2956826569642009690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -183,6 +310,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925660644986369589}
|
||||
- component: {fileID: 451715946189956124}
|
||||
m_Layer: 0
|
||||
m_Name: Tile2_flipped
|
||||
m_TagString: Untagged
|
||||
@@ -205,5 +333,144 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 7111145574660306503}
|
||||
- {fileID: 1003080013996268193}
|
||||
- {fileID: 3622650182130189122}
|
||||
- {fileID: 6128198891967149402}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
|
||||
--- !u!114 &451715946189956124
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2956826569642009690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41def183b6714aca97663d74cc2d0678, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tileIndex: 0
|
||||
--- !u!1001 &790228998383621749
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2.22
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &3622650182130189122 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 790228998383621749}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &7906900786878439533
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 1.77
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 2.28
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &6128198891967149402 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 7906900786878439533}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -10,7 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7111145574660306503}
|
||||
- component: {fileID: 3889795708575321074}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 1709932086434338450}
|
||||
m_Layer: 6
|
||||
m_Name: Left_Tile2_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.62, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -73,8 +74,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -87,6 +88,72 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &1709932086434338450
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.37, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.635, y: -1.78}
|
||||
- {x: 0.585, y: -1.27}
|
||||
- {x: 0.36499998, y: -1.14}
|
||||
- {x: 0.415, y: -1.05}
|
||||
- {x: 1.2149999, y: -0.85999995}
|
||||
- {x: 1.3249999, y: -0.7}
|
||||
- {x: 1.3249999, y: -0.35}
|
||||
- {x: 1.145, y: -0.049999997}
|
||||
- {x: 0.13499999, y: 0.45999998}
|
||||
- {x: 0.275, y: 0.87}
|
||||
- {x: 0.265, y: 1.0699999}
|
||||
- {x: -0.044999998, y: 1.41}
|
||||
- {x: -0.035, y: 1.66}
|
||||
- {x: 0.48499998, y: 2.2}
|
||||
- {x: 0.49499997, y: 2.48}
|
||||
- {x: -1.3249999, y: 2.5}
|
||||
- {x: -1.3249999, y: -2.5}
|
||||
- {x: 0.505, y: -2.5}
|
||||
- {x: 0.555, y: -2.12}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2171518497100337372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -97,7 +164,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1003080013996268193}
|
||||
- component: {fileID: 4856205316150460481}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 9036823987933958098}
|
||||
m_Layer: 6
|
||||
m_Name: Right_Tile1_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -113,7 +181,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.95, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -160,8 +228,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -174,6 +242,70 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &9036823987933958098
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.65, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: -0.48499998, y: 2.5}
|
||||
- {x: -0.49499997, y: 2.19}
|
||||
- {x: 0.035, y: 1.66}
|
||||
- {x: 0.035, y: 1.42}
|
||||
- {x: -0.24499999, y: 1.15}
|
||||
- {x: -0.285, y: 0.90999997}
|
||||
- {x: -0.13499999, y: 0.45999998}
|
||||
- {x: -1.115, y: -0.03}
|
||||
- {x: -1.3249999, y: -0.35}
|
||||
- {x: -1.3249999, y: -0.71}
|
||||
- {x: -1.2049999, y: -0.84999996}
|
||||
- {x: -0.36499998, y: -1.0699999}
|
||||
- {x: -0.585, y: -1.27}
|
||||
- {x: -0.625, y: -1.65}
|
||||
- {x: -0.48499998, y: -2.5}
|
||||
- {x: 1.3249999, y: -2.5}
|
||||
- {x: 1.3249999, y: 2.5}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2956826569642009690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -183,6 +315,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925660644986369589}
|
||||
- component: {fileID: 8822397971507360111}
|
||||
m_Layer: 0
|
||||
m_Name: Tile3
|
||||
m_TagString: Untagged
|
||||
@@ -205,5 +338,144 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 7111145574660306503}
|
||||
- {fileID: 1003080013996268193}
|
||||
- {fileID: 1007295630034795055}
|
||||
- {fileID: 1590951442778015581}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8822397971507360111
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2956826569642009690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41def183b6714aca97663d74cc2d0678, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tileIndex: 0
|
||||
--- !u!1001 &3361226680573907562
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -1.95
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.48
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &1590951442778015581 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 3361226680573907562}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &3840420642436902680
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.27
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -1.58
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &1007295630034795055 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 3840420642436902680}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
@@ -10,7 +10,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 7111145574660306503}
|
||||
- component: {fileID: 3889795708575321074}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 6967660003360049346}
|
||||
m_Layer: 6
|
||||
m_Name: Left_Tile2_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -26,7 +27,7 @@ Transform:
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -2.95, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -73,8 +74,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 2249565037559538771, guid: 836c1ae2997af4045b714ceaff665a6e, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -87,6 +88,72 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &6967660003360049346
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 864595161669782950}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.37, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 0.635, y: -1.78}
|
||||
- {x: 0.585, y: -1.27}
|
||||
- {x: 0.36499998, y: -1.14}
|
||||
- {x: 0.415, y: -1.05}
|
||||
- {x: 1.2149999, y: -0.85999995}
|
||||
- {x: 1.3249999, y: -0.7}
|
||||
- {x: 1.3249999, y: -0.35}
|
||||
- {x: 1.145, y: -0.049999997}
|
||||
- {x: 0.13499999, y: 0.45999998}
|
||||
- {x: 0.275, y: 0.87}
|
||||
- {x: 0.265, y: 1.0699999}
|
||||
- {x: -0.044999998, y: 1.41}
|
||||
- {x: -0.035, y: 1.66}
|
||||
- {x: 0.48499998, y: 2.2}
|
||||
- {x: 0.49499997, y: 2.48}
|
||||
- {x: -1.3249999, y: 2.5}
|
||||
- {x: -1.3249999, y: -2.5}
|
||||
- {x: 0.505, y: -2.5}
|
||||
- {x: 0.555, y: -2.12}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2171518497100337372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -97,7 +164,8 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 1003080013996268193}
|
||||
- component: {fileID: 4856205316150460481}
|
||||
m_Layer: 0
|
||||
- component: {fileID: 5503039050943823342}
|
||||
m_Layer: 6
|
||||
m_Name: Right_Tile1_0
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -113,7 +181,7 @@ Transform:
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 2.62, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 3.1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -160,8 +228,8 @@ SpriteRenderer:
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingLayerID: -1132846201
|
||||
m_SortingLayer: 1
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 3241551651087908563, guid: 8e7c95ebe5325df4395d97ea2ace65d7, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -174,6 +242,70 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &5503039050943823342
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2171518497100337372}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 2.65, y: 5}
|
||||
newSize: {x: 2.65, y: 5}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: -0.48499998, y: 2.5}
|
||||
- {x: -0.49499997, y: 2.19}
|
||||
- {x: 0.035, y: 1.66}
|
||||
- {x: 0.035, y: 1.42}
|
||||
- {x: -0.24499999, y: 1.15}
|
||||
- {x: -0.285, y: 0.90999997}
|
||||
- {x: -0.13499999, y: 0.45999998}
|
||||
- {x: -1.115, y: -0.03}
|
||||
- {x: -1.3249999, y: -0.35}
|
||||
- {x: -1.3249999, y: -0.71}
|
||||
- {x: -1.2049999, y: -0.84999996}
|
||||
- {x: -0.36499998, y: -1.0699999}
|
||||
- {x: -0.585, y: -1.27}
|
||||
- {x: -0.625, y: -1.65}
|
||||
- {x: -0.48499998, y: -2.5}
|
||||
- {x: 1.3249999, y: -2.5}
|
||||
- {x: 1.3249999, y: 2.5}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!1 &2956826569642009690
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -183,6 +315,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4925660644986369589}
|
||||
- component: {fileID: 2006557459409230470}
|
||||
m_Layer: 0
|
||||
m_Name: Tile3_flipped
|
||||
m_TagString: Untagged
|
||||
@@ -205,5 +338,144 @@ Transform:
|
||||
m_Children:
|
||||
- {fileID: 7111145574660306503}
|
||||
- {fileID: 1003080013996268193}
|
||||
- {fileID: 6011507792702974644}
|
||||
- {fileID: 8778559433790709003}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
|
||||
--- !u!114 &2006557459409230470
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2956826569642009690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 41def183b6714aca97663d74cc2d0678, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tileIndex: 0
|
||||
--- !u!1001 &4711606854742853692
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2.23
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.77
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &8778559433790709003 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 4711606854742853692}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &7772195149518225283
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4925660644986369589}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3481232588610935369, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MonsterSpawnPoint
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.33
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.77
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
--- !u!4 &6011507792702974644 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4085125724917306679, guid: da700d1636dcd9348bc52deaf44bdfb7, type: 3}
|
||||
m_PrefabInstance: {fileID: 7772195149518225283}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
8
Assets/Scenes/TestingStuff.meta
Normal file
8
Assets/Scenes/TestingStuff.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ec5cd68ba1e55542be2b625ef697ef2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
520
Assets/Scenes/TestingStuff/MichalTesting.unity
Normal file
520
Assets/Scenes/TestingStuff/MichalTesting.unity
Normal file
@@ -0,0 +1,520 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 10
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 13
|
||||
m_BakeOnSceneLoad: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &465048833
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 465048834}
|
||||
- component: {fileID: 465048836}
|
||||
- component: {fileID: 465048835}
|
||||
m_Layer: 0
|
||||
m_Name: Object3
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &465048834
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 465048833}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.3519, y: 2.38407, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &465048835
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 465048833}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!61 &465048836
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 465048833}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &1507068790
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1507068793}
|
||||
- component: {fileID: 1507068792}
|
||||
- component: {fileID: 1507068791}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &1507068791
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1507068790}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1507068792
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1507068790}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1507068793
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1507068790}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1851499346
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1851499349}
|
||||
m_Layer: 0
|
||||
m_Name: Object1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1851499349
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1851499346}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.3519, y: 2.38407, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2029728267
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2029728268}
|
||||
- component: {fileID: 2029728270}
|
||||
- component: {fileID: 2029728269}
|
||||
m_Layer: 0
|
||||
m_Name: Object2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2029728268
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2029728267}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0.3519, y: 2.38407, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &2029728269
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2029728267}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 0
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!61 &2029728270
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2029728267}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_ForceSendLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ForceReceiveLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ContactCaptureLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_CallbackLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_CompositeOperation: 0
|
||||
m_CompositeOrder: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1507068793}
|
||||
- {fileID: 1851499349}
|
||||
- {fileID: 2029728268}
|
||||
- {fileID: 465048834}
|
||||
7
Assets/Scenes/TestingStuff/MichalTesting.unity.meta
Normal file
7
Assets/Scenes/TestingStuff/MichalTesting.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7531a44c42459814e8fcf08c5cdcdad1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -7,7 +7,8 @@
|
||||
"AstarPathfindingProject",
|
||||
"Unity.ResourceManager",
|
||||
"Unity.InputSystem",
|
||||
"Unity.TextMeshPro"
|
||||
"Unity.TextMeshPro",
|
||||
"OptimizedRope"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -1,16 +1,167 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Pathfinding;
|
||||
|
||||
public class AnneLiseBehaviour : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
[SerializeField] public float moveSpeed;
|
||||
private Animator animator;
|
||||
private AIPath aiPath;
|
||||
private bool hasArrived = false;
|
||||
private LureSpot currentLureSpot;
|
||||
private SpriteRenderer spriteRenderer; // Cached reference
|
||||
private bool allowFacingByVelocity = true; // New flag
|
||||
private Coroutine walkingCoroutine;
|
||||
private bool annaLiseIsReady = false; // Flag to know if Anna Lise is ready to take the picture
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
animator = GetComponentInChildren<Animator>();
|
||||
aiPath = GetComponent<AIPath>();
|
||||
spriteRenderer = GetComponentInChildren<SpriteRenderer>(); // Cache the reference
|
||||
if (aiPath != null)
|
||||
{
|
||||
aiPath.maxSpeed = moveSpeed;
|
||||
aiPath.OnTargetReachedEvent += HandleArriveAtSpot;
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
private void OnDestroy()
|
||||
{
|
||||
|
||||
if (aiPath != null)
|
||||
{
|
||||
aiPath.OnTargetReachedEvent -= HandleArriveAtSpot;
|
||||
}
|
||||
}
|
||||
|
||||
public void TeleportJustOutOfView(Camera cam, float offset = 2f)
|
||||
{
|
||||
if (aiPath == null || cam == null || currentLureSpot == null || currentLureSpot.annaLiseSpot == null) return;
|
||||
|
||||
// Calculate direction from the target spot to Anna Lise's current position
|
||||
Vector3 from = currentLureSpot.annaLiseSpot.transform.position;
|
||||
Vector3 to = transform.position;
|
||||
Vector3 direction = (to - from).normalized;
|
||||
|
||||
// Project the target spot to screen space
|
||||
Vector3 targetScreen = cam.WorldToScreenPoint(from);
|
||||
|
||||
// Find the screen edge in the direction
|
||||
Vector2 dir2D = new Vector2(direction.x, direction.y);
|
||||
if (dir2D == Vector2.zero) dir2D = Vector2.right; // fallback
|
||||
dir2D.Normalize();
|
||||
|
||||
// Calculate intersection with screen bounds
|
||||
float tX = dir2D.x > 0 ? (Screen.width - targetScreen.x) / dir2D.x : (0 - targetScreen.x) / dir2D.x;
|
||||
float tY = dir2D.y > 0 ? (Screen.height - targetScreen.y) / dir2D.y : (0 - targetScreen.y) / dir2D.y;
|
||||
float t = Mathf.Min(Mathf.Abs(tX), Mathf.Abs(tY));
|
||||
Vector2 edgeScreen = new Vector2(targetScreen.x, targetScreen.y) + dir2D * t;
|
||||
edgeScreen += dir2D * offset; // Move outside the screen by offset
|
||||
|
||||
// Convert back to world position
|
||||
Vector3 teleportWorld = cam.ScreenToWorldPoint(new Vector3(edgeScreen.x, edgeScreen.y, cam.WorldToScreenPoint(from).z));
|
||||
teleportWorld.z = transform.position.z; // Keep original Z
|
||||
|
||||
aiPath.Teleport(teleportWorld, true);
|
||||
}
|
||||
|
||||
public void GotoSpot(GameObject lurespot)
|
||||
{
|
||||
currentLureSpot = lurespot.GetComponent<LureSpot>();
|
||||
// Teleport Anna Lise just out of view before moving
|
||||
TeleportJustOutOfView(Camera.main, 2f);
|
||||
|
||||
if (aiPath == null) return;
|
||||
|
||||
aiPath.destination = currentLureSpot.annaLiseSpot.transform.position;
|
||||
aiPath.canMove = true;
|
||||
aiPath.SearchPath();
|
||||
hasArrived = false;
|
||||
allowFacingByVelocity = true;
|
||||
if (walkingCoroutine != null)
|
||||
{
|
||||
StopCoroutine(walkingCoroutine);
|
||||
}
|
||||
walkingCoroutine = StartCoroutine(UpdateSpeedWhenWalking());
|
||||
}
|
||||
|
||||
private IEnumerator UpdateSpeedWhenWalking()
|
||||
{
|
||||
while (!hasArrived && aiPath != null && animator != null)
|
||||
{
|
||||
float currentSpeed = aiPath.velocity.magnitude;
|
||||
animator.SetFloat("speed", currentSpeed);
|
||||
|
||||
// Only allow facing by velocity if not arrived
|
||||
if (allowFacingByVelocity && currentSpeed > 0.01f && spriteRenderer != null)
|
||||
{
|
||||
Vector3 velocity = aiPath.velocity;
|
||||
if (velocity.x != 0)
|
||||
{
|
||||
Vector3 scale = spriteRenderer.transform.localScale;
|
||||
scale.x = Mathf.Abs(scale.x) * (velocity.x > 0 ? 1 : -1);
|
||||
spriteRenderer.transform.localScale = scale;
|
||||
}
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleArriveAtSpot()
|
||||
{
|
||||
if (hasArrived) return;
|
||||
hasArrived = true;
|
||||
allowFacingByVelocity = false; // Disable facing by velocity after arrival
|
||||
aiPath.canMove = false;
|
||||
if (walkingCoroutine != null)
|
||||
{
|
||||
StopCoroutine(walkingCoroutine);
|
||||
walkingCoroutine = null;
|
||||
}
|
||||
// Face the "luredBird" of the current lurespot, if available
|
||||
if (currentLureSpot != null)
|
||||
{
|
||||
if (currentLureSpot.luredBird != null)
|
||||
{
|
||||
FaceTarget(currentLureSpot.luredBird);
|
||||
annaLiseIsReady = true; // Now Anna Lise is ready to take the picture
|
||||
}
|
||||
}
|
||||
|
||||
if (animator != null && currentLureSpot.name != "LureSpotB")// Horrible way to not take the photo if its Wolter
|
||||
{
|
||||
animator.SetTrigger("TakePhoto");
|
||||
annaLiseIsReady = false; // Reset the flag after taking the photo
|
||||
}
|
||||
animator.SetFloat("speed", 0);
|
||||
}
|
||||
|
||||
public void FaceTarget(GameObject target)
|
||||
{
|
||||
if (target == null || spriteRenderer == null) return;
|
||||
|
||||
// Compare X positions to determine facing direction
|
||||
float direction = target.transform.position.x - transform.position.x;
|
||||
if (Mathf.Abs(direction) > 0.01f) // Avoid flipping if almost aligned
|
||||
{
|
||||
Vector3 scale = spriteRenderer.transform.localScale;
|
||||
scale.x = Mathf.Abs(scale.x) * (direction > 0 ? 1 : -1);
|
||||
spriteRenderer.transform.localScale = scale;
|
||||
}
|
||||
}
|
||||
public void TrafalgarTouchedAnnaLise()
|
||||
{
|
||||
if (annaLiseIsReady == true && currentLureSpot.name == "LureSpotB") // Only allow if Anna Lise is ready and it's the correct lure spot
|
||||
{
|
||||
// Trigger the photo taken animation
|
||||
if (animator != null)
|
||||
{
|
||||
currentLureSpot.GetComponentInChildren<BirdEyesBehavior>().BirdReveal();
|
||||
animator.SetTrigger("TakePhoto");
|
||||
}
|
||||
annaLiseIsReady = false; // Reset the flag after taking the photo
|
||||
}
|
||||
Debug.Log("Trafalgar touched Anna Lise");
|
||||
}
|
||||
}
|
||||
|
||||
186
Assets/Scripts/DamianExperiments/Gardener.prefab
Normal file
186
Assets/Scripts/DamianExperiments/Gardener.prefab
Normal file
@@ -0,0 +1,186 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &277562128272848195
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 249029427890415945}
|
||||
- component: {fileID: 8669923946467467544}
|
||||
m_Layer: 0
|
||||
m_Name: GardenerChaseState
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &249029427890415945
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 277562128272848195}
|
||||
serializedVersion: 2
|
||||
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: 3773641007251837342}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8669923946467467544
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 277562128272848195}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eaefd3d5a2a864ca5b5d9ec5f2a7040f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &5634601970195484129
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5969249088313380091}
|
||||
- component: {fileID: 8741941670841680830}
|
||||
m_Layer: 0
|
||||
m_Name: GardenerIdleState
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5969249088313380091
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5634601970195484129}
|
||||
serializedVersion: 2
|
||||
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: 3773641007251837342}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &8741941670841680830
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5634601970195484129}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: eaefd3d5a2a864ca5b5d9ec5f2a7040f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &7821713087316151254
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3773641007251837342}
|
||||
- component: {fileID: 3270057320425534415}
|
||||
- component: {fileID: 8244548860977619315}
|
||||
- component: {fileID: 3901496808324947611}
|
||||
m_Layer: 0
|
||||
m_Name: Gardener
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3773641007251837342
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7821713087316151254}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 35.9931, y: 1.21847, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5969249088313380091}
|
||||
- {fileID: 249029427890415945}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &3270057320425534415
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7821713087316151254}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 55938fb1577dd4ad3af7e994048c86f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &8244548860977619315
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7821713087316151254}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9e0b24e2f2ad54cc09940c320ed3cf4b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
defaultState: {fileID: 0}
|
||||
currentState: {fileID: 0}
|
||||
_unityEventsFolded: 0
|
||||
verbose: 0
|
||||
allowReentry: 0
|
||||
returnToDefaultOnDisable: 1
|
||||
OnStateExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnStateEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnFirstStateEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnFirstStateExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnLastStateEntered:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnLastStateExited:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &3901496808324947611
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7821713087316151254}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4ad080e6ca3114e4e96ccc33655d3dff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
7
Assets/Scripts/DamianExperiments/Gardener.prefab.meta
Normal file
7
Assets/Scripts/DamianExperiments/Gardener.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6a6dfa92b2dc4940bfc687954961caa
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,6 +1,8 @@
|
||||
using UnityEngine;
|
||||
using Pixelplacement;
|
||||
|
||||
public class SoundGenerator : MonoBehaviour
|
||||
|
||||
public class GardenerBehaviour : MonoBehaviour
|
||||
{
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ad080e6ca3114e4e96ccc33655d3dff
|
||||
18
Assets/Scripts/DamianExperiments/LureSpot.cs
Normal file
18
Assets/Scripts/DamianExperiments/LureSpot.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class LureSpot : MonoBehaviour
|
||||
{
|
||||
[SerializeField] public GameObject luredBird;
|
||||
[SerializeField] public GameObject annaLiseSpot;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/DamianExperiments/LureSpot.cs.meta
Normal file
2
Assets/Scripts/DamianExperiments/LureSpot.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 78f015ca3cba1d54382afba790601471
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6975820127985294189da1bb0aff735b
|
||||
@@ -1,48 +1,198 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Pooling;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single bubble, handling its movement, wobble effect, scaling, and sprite assignment.
|
||||
/// Uses coroutines for better performance instead of Update() calls.
|
||||
/// </summary>
|
||||
public class Bubble : MonoBehaviour
|
||||
public class Bubble : MonoBehaviour, IPoolableWithReference<BubblePool>
|
||||
{
|
||||
public float speed = 1f;
|
||||
public float wobbleSpeed = 1f;
|
||||
private SpriteRenderer spriteRenderer;
|
||||
private SpriteRenderer bottleSpriteRenderer;
|
||||
private SpriteRenderer bubbleSpriteRenderer;
|
||||
private float timeOffset;
|
||||
private float minScale = 0.2f;
|
||||
private float maxScale = 1.2f;
|
||||
private float baseScale = 1f;
|
||||
|
||||
private Camera mainCamera;
|
||||
private BubblePool parentPool;
|
||||
|
||||
// Coroutine references
|
||||
private Coroutine _movementCoroutine;
|
||||
private Coroutine _wobbleCoroutine;
|
||||
private Coroutine _offScreenCheckCoroutine;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Cache references and randomize time offset for wobble
|
||||
spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
timeOffset = Random.value * 100f;
|
||||
// Find the child named "BottleSprite" and get its SpriteRenderer
|
||||
Transform bottleSpriteTransform = transform.Find("BubbleSprite");
|
||||
if (bottleSpriteTransform != null)
|
||||
|
||||
// Find the child named "BubbleSprite" and get its SpriteRenderer
|
||||
Transform bubbleSpriteTransform = transform.Find("BubbleSprite");
|
||||
if (bubbleSpriteTransform != null)
|
||||
{
|
||||
bottleSpriteRenderer = bottleSpriteTransform.GetComponent<SpriteRenderer>();
|
||||
bubbleSpriteRenderer = bubbleSpriteTransform.GetComponent<SpriteRenderer>();
|
||||
}
|
||||
|
||||
// Cache camera reference
|
||||
mainCamera = Camera.main;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
StartBubbleBehavior();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
StopBubbleBehavior();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts all bubble behavior coroutines
|
||||
/// </summary>
|
||||
private void StartBubbleBehavior()
|
||||
{
|
||||
_movementCoroutine = StartCoroutine(MovementCoroutine());
|
||||
_wobbleCoroutine = StartCoroutine(WobbleCoroutine());
|
||||
_offScreenCheckCoroutine = StartCoroutine(OffScreenCheckCoroutine());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops all bubble behavior coroutines
|
||||
/// </summary>
|
||||
private void StopBubbleBehavior()
|
||||
{
|
||||
if (_movementCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_movementCoroutine);
|
||||
_movementCoroutine = null;
|
||||
}
|
||||
|
||||
if (_wobbleCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_wobbleCoroutine);
|
||||
_wobbleCoroutine = null;
|
||||
}
|
||||
|
||||
if (_offScreenCheckCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_offScreenCheckCoroutine);
|
||||
_offScreenCheckCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
/// <summary>
|
||||
/// Coroutine that handles bubble upward movement
|
||||
/// </summary>
|
||||
private IEnumerator MovementCoroutine()
|
||||
{
|
||||
// Move bubble upward
|
||||
transform.position += Vector3.up * speed * Time.deltaTime;
|
||||
// Wobble effect (smooth oscillation between min and max scale)
|
||||
float t = (Mathf.Sin((Time.time + timeOffset) * wobbleSpeed) + 1f) * 0.5f; // t in [0,1]
|
||||
float newScale = Mathf.Lerp(minScale, maxScale, t);
|
||||
transform.localScale = Vector3.one * newScale;
|
||||
// Destroy when off screen
|
||||
if (transform.position.y > Camera.main.orthographicSize + 2f)
|
||||
while (enabled && gameObject.activeInHierarchy)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
// Move bubble upward
|
||||
transform.position += Vector3.up * (speed * Time.deltaTime);
|
||||
|
||||
// Wait for next frame
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine that handles the wobble scaling effect
|
||||
/// </summary>
|
||||
private IEnumerator WobbleCoroutine()
|
||||
{
|
||||
while (enabled && gameObject.activeInHierarchy)
|
||||
{
|
||||
// Wobble effect (smooth oscillation between min and max scale)
|
||||
float t = (Mathf.Sin((Time.time + timeOffset) * wobbleSpeed) + 1f) * 0.5f; // t in [0,1]
|
||||
float wobbleFactor = Mathf.Lerp(minScale, maxScale, t);
|
||||
transform.localScale = Vector3.one * (baseScale * wobbleFactor);
|
||||
|
||||
// Wait for next frame
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine that checks if bubble has moved off-screen
|
||||
/// Runs at a lower frequency for better performance
|
||||
/// </summary>
|
||||
private IEnumerator OffScreenCheckCoroutine()
|
||||
{
|
||||
const float checkInterval = 0.1f; // Check every 100ms instead of every frame
|
||||
|
||||
while (enabled && gameObject.activeInHierarchy)
|
||||
{
|
||||
// Check if bubble is off screen
|
||||
if (mainCamera != null && transform.position.y > mainCamera.orthographicSize + 2f)
|
||||
{
|
||||
OnBubbleDestroy();
|
||||
yield break; // Exit coroutine since bubble is being destroyed
|
||||
}
|
||||
|
||||
// Wait for the check interval
|
||||
yield return new WaitForSeconds(checkInterval);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when bubble is about to be destroyed
|
||||
/// </summary>
|
||||
private void OnBubbleDestroy()
|
||||
{
|
||||
// Use the cached pool reference instead of finding it each time
|
||||
if (parentPool != null)
|
||||
{
|
||||
parentPool.ReturnBubble(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback to find the pool if the reference is somehow lost
|
||||
BubblePool pool = FindFirstObjectByType<BubblePool>();
|
||||
if (pool != null)
|
||||
{
|
||||
Debug.LogWarning("Bubble is missing its parent pool reference, finding pool as fallback");
|
||||
pool.ReturnBubble(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the parent pool for this bubble
|
||||
/// </summary>
|
||||
/// <param name="pool">The bubble pool that created this bubble</param>
|
||||
public void SetPool(BubblePool pool)
|
||||
{
|
||||
parentPool = pool;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the object is retrieved from the pool.
|
||||
/// </summary>
|
||||
public void OnSpawn()
|
||||
{
|
||||
ResetState();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the object is returned to the pool.
|
||||
/// </summary>
|
||||
public void OnDespawn()
|
||||
{
|
||||
// Nothing to do here for now, but we could clean up resources
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the main sprite for the bubble.
|
||||
/// </summary>
|
||||
@@ -54,13 +204,22 @@ namespace Minigames.DivingForPictures
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the sprite for the child "BottleSprite" renderer.
|
||||
/// Sets the sprite for the child "BubbleSprite" renderer.
|
||||
/// </summary>
|
||||
/// <param name="sprite">Sprite to assign.</param>
|
||||
public void SetBottleSprite(Sprite sprite)
|
||||
public void SetBubbleSprite(Sprite sprite)
|
||||
{
|
||||
if (bottleSpriteRenderer != null)
|
||||
bottleSpriteRenderer.sprite = sprite;
|
||||
if (bubbleSpriteRenderer != null)
|
||||
bubbleSpriteRenderer.sprite = sprite;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base scale for the bubble
|
||||
/// </summary>
|
||||
/// <param name="scale">Base scale value</param>
|
||||
public void SetBaseScale(float scale)
|
||||
{
|
||||
baseScale = scale;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -73,5 +232,31 @@ namespace Minigames.DivingForPictures
|
||||
minScale = min;
|
||||
maxScale = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the movement speed at runtime
|
||||
/// </summary>
|
||||
/// <param name="newSpeed">New movement speed</param>
|
||||
public void SetSpeed(float newSpeed)
|
||||
{
|
||||
speed = newSpeed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the wobble speed at runtime
|
||||
/// </summary>
|
||||
/// <param name="newWobbleSpeed">New wobble speed</param>
|
||||
public void SetWobbleSpeed(float newWobbleSpeed)
|
||||
{
|
||||
wobbleSpeed = newWobbleSpeed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the bubble state for reuse from object pool
|
||||
/// </summary>
|
||||
public void ResetState()
|
||||
{
|
||||
timeOffset = Random.value * 100f;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Assets/Scripts/Minigames/DivingForPictures/BubblePool.cs
Normal file
42
Assets/Scripts/Minigames/DivingForPictures/BubblePool.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
using Pooling;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages a pool of bubble objects to reduce garbage collection overhead.
|
||||
/// </summary>
|
||||
public class BubblePool : BaseObjectPool<Bubble>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a bubble from the pool, or creates a new one if the pool is empty
|
||||
/// </summary>
|
||||
/// <returns>A bubble instance ready to use</returns>
|
||||
public Bubble GetBubble()
|
||||
{
|
||||
Bubble bubble = Get();
|
||||
|
||||
// Set reference to this pool so the bubble can return itself
|
||||
bubble.SetPool(this);
|
||||
|
||||
return bubble;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a bubble to the pool
|
||||
/// </summary>
|
||||
/// <param name="bubble">The bubble to return to the pool</param>
|
||||
public void ReturnBubble(Bubble bubble)
|
||||
{
|
||||
Return(bubble);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs pool statistics
|
||||
/// </summary>
|
||||
public override void LogPoolStats()
|
||||
{
|
||||
Debug.Log($"[BubblePool] Pooled bubbles: {pooledObjects.Count}/{maxPoolSize} (Created: {totalCreated}, Returned: {totalReturned})");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45cdaed0c047423bbb0b7380cd3687f3
|
||||
timeCreated: 1758015081
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using Pooling;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
@@ -19,9 +20,42 @@ namespace Minigames.DivingForPictures
|
||||
public float spawnY = -5f;
|
||||
public float wobbleMinScale = 0.2f;
|
||||
public float wobbleMaxScale = 1.2f;
|
||||
|
||||
[Header("Object Pooling")]
|
||||
public bool useObjectPooling = true;
|
||||
public int initialPoolSize = 10;
|
||||
public int maxPoolSize = 30;
|
||||
|
||||
[Header("Surfacing Settings")]
|
||||
[Tooltip("Factor to multiply bubble speed by when surfacing (0.5 = half speed)")]
|
||||
[SerializeField] private float surfacingSpeedFactor = 0.5f;
|
||||
|
||||
private float _timer;
|
||||
private float _nextSpawnInterval;
|
||||
private BubblePool _bubblePool;
|
||||
private Camera _mainCamera; // Cache camera reference
|
||||
private bool _isSurfacing = false;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_mainCamera = Camera.main;
|
||||
|
||||
if (useObjectPooling)
|
||||
{
|
||||
// Create the bubble pool
|
||||
GameObject poolGO = new GameObject("BubblePool");
|
||||
poolGO.transform.SetParent(transform);
|
||||
_bubblePool = poolGO.AddComponent<BubblePool>();
|
||||
_bubblePool.initialPoolSize = initialPoolSize;
|
||||
_bubblePool.maxPoolSize = maxPoolSize;
|
||||
_bubblePool.Initialize(bubblePrefab);
|
||||
|
||||
// Periodically check for pool statistics in debug builds
|
||||
#if DEVELOPMENT_BUILD || UNITY_EDITOR
|
||||
InvokeRepeating(nameof(LogPoolStats), 5f, 30f);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -56,23 +90,79 @@ namespace Minigames.DivingForPictures
|
||||
{
|
||||
float x = Random.Range(spawnXMin, spawnXMax);
|
||||
Vector3 spawnPos = new Vector3(x, spawnY, 0f);
|
||||
Bubble bubble = Instantiate(bubblePrefab, spawnPos, Quaternion.identity, transform);
|
||||
|
||||
Bubble bubble;
|
||||
if (useObjectPooling && _bubblePool != null)
|
||||
{
|
||||
bubble = _bubblePool.GetBubble();
|
||||
bubble.transform.position = spawnPos;
|
||||
}
|
||||
else
|
||||
{
|
||||
bubble = Instantiate(bubblePrefab, spawnPos, Quaternion.identity, transform);
|
||||
}
|
||||
|
||||
// Randomize bubble properties
|
||||
bubble.speed = Random.Range(speedRange.x, speedRange.y);
|
||||
float baseSpeed = Random.Range(speedRange.x, speedRange.y);
|
||||
|
||||
// Apply surfacing speed reduction if needed
|
||||
if (_isSurfacing)
|
||||
{
|
||||
bubble.speed = baseSpeed * surfacingSpeedFactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
bubble.speed = baseSpeed;
|
||||
}
|
||||
|
||||
bubble.wobbleSpeed = Random.Range(wobbleSpeedRange.x, wobbleSpeedRange.y);
|
||||
float scale = Random.Range(scaleRange.x, scaleRange.y);
|
||||
bubble.transform.localScale = Vector3.one * scale;
|
||||
// Assign random sprite to BottleSprite
|
||||
|
||||
// Set base scale (initial size) for the bubble
|
||||
float baseScale = Random.Range(scaleRange.x, scaleRange.y);
|
||||
bubble.SetBaseScale(baseScale);
|
||||
|
||||
// Assign random sprite to BubbleSprite (fixed naming from BottleSprite)
|
||||
if (bubbleSprites != null && bubbleSprites.Length > 0)
|
||||
{
|
||||
Sprite randomSprite = bubbleSprites[Random.Range(0, bubbleSprites.Length)];
|
||||
bubble.SetBottleSprite(randomSprite);
|
||||
bubble.SetBubbleSprite(randomSprite);
|
||||
}
|
||||
|
||||
// Random rotation
|
||||
bubble.transform.rotation = Quaternion.Euler(0f, 0f, Random.Range(0f, 360f));
|
||||
|
||||
// Pass min/max scale for wobble clamping
|
||||
bubble.SetWobbleScaleLimits(wobbleMinScale, wobbleMaxScale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start surfacing mode - slow down all bubbles
|
||||
/// </summary>
|
||||
public void StartSurfacing()
|
||||
{
|
||||
if (_isSurfacing) return; // Already surfacing
|
||||
|
||||
_isSurfacing = true;
|
||||
|
||||
// Slow down all existing bubbles
|
||||
Bubble[] activeBubbles = FindObjectsOfType<Bubble>();
|
||||
foreach (Bubble bubble in activeBubbles)
|
||||
{
|
||||
bubble.speed *= surfacingSpeedFactor;
|
||||
}
|
||||
|
||||
Debug.Log($"[BubbleSpawner] Started surfacing mode. Bubbles slowed to {surfacingSpeedFactor * 100}% speed.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs the current pool statistics for debugging
|
||||
/// </summary>
|
||||
private void LogPoolStats()
|
||||
{
|
||||
if (_bubblePool != null)
|
||||
{
|
||||
_bubblePool.LogPoolStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
619
Assets/Scripts/Minigames/DivingForPictures/DivingGameManager.cs
Normal file
619
Assets/Scripts/Minigames/DivingForPictures/DivingGameManager.cs
Normal file
@@ -0,0 +1,619 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
public class DivingGameManager : MonoBehaviour
|
||||
{
|
||||
[Header("Monster Prefabs")]
|
||||
[Tooltip("Array of monster prefabs to spawn randomly")]
|
||||
[SerializeField] private GameObject[] monsterPrefabs;
|
||||
|
||||
[Header("Spawn Probability")]
|
||||
[Tooltip("Base chance (0-1) of spawning a monster on each tile")]
|
||||
[SerializeField] private float baseSpawnProbability = 0.2f;
|
||||
[Tooltip("Maximum chance (0-1) of spawning a monster")]
|
||||
[SerializeField] private float maxSpawnProbability = 0.5f;
|
||||
[Tooltip("How fast the probability increases per second")]
|
||||
[SerializeField] private float probabilityIncreaseRate = 0.01f;
|
||||
|
||||
[Header("Spawn Timing")]
|
||||
[Tooltip("Force a spawn after this many seconds without spawns")]
|
||||
[SerializeField] private float guaranteedSpawnTime = 30f;
|
||||
[Tooltip("Minimum time between monster spawns")]
|
||||
[SerializeField] private float spawnCooldown = 5f;
|
||||
|
||||
[Header("Scoring")]
|
||||
[Tooltip("Base points for taking a picture")]
|
||||
[SerializeField] private int basePoints = 100;
|
||||
[Tooltip("Additional points per depth unit")]
|
||||
[SerializeField] private int depthMultiplier = 10;
|
||||
|
||||
[Header("Rope Damage System")]
|
||||
[Tooltip("Ropes that will break one by one as player takes damage")]
|
||||
[SerializeField] private RopeBreaker[] playerRopes;
|
||||
|
||||
[Header("Surfacing Settings")]
|
||||
[Tooltip("Duration in seconds for speed transition when surfacing")]
|
||||
[SerializeField] private float speedTransitionDuration = 2.0f;
|
||||
[Tooltip("Factor to multiply speed by when surfacing (usually 1.0 for same speed)")]
|
||||
[SerializeField] private float surfacingSpeedFactor = 3.0f;
|
||||
[Tooltip("How long to continue spawning tiles after surfacing begins (seconds)")]
|
||||
[SerializeField] private float surfacingSpawnDelay = 5.0f;
|
||||
[Tooltip("Reference to the PlayableDirector that will play the surfacing timeline")]
|
||||
[SerializeField] private PlayableDirector surfacingTimeline;
|
||||
|
||||
// Private state variables
|
||||
private int playerScore = 0;
|
||||
private float currentSpawnProbability;
|
||||
private float lastSpawnTime = -100f;
|
||||
private float timeSinceLastSpawn = 0f;
|
||||
private List<Monster> activeMonsters = new List<Monster>();
|
||||
|
||||
// Velocity management
|
||||
// Velocity state tracking
|
||||
private float _currentVelocityFactor = 1.0f; // 1.0 = normal descent speed, -1.0 * surfacingSpeedFactor = full surfacing speed
|
||||
private Coroutine _velocityTransitionCoroutine;
|
||||
private Coroutine _surfacingSequenceCoroutine;
|
||||
|
||||
// Public properties
|
||||
public int PlayerScore => playerScore;
|
||||
public float CurrentVelocityFactor => _currentVelocityFactor;
|
||||
|
||||
// Events
|
||||
public event Action<int> OnScoreChanged;
|
||||
public event Action<Monster> OnMonsterSpawned;
|
||||
public event Action<Monster, int> OnPictureTaken;
|
||||
public event Action<float> OnSpawnProbabilityChanged;
|
||||
public event Action OnGameOver;
|
||||
public event Action<int> OnRopeBroken; // Passes remaining ropes count
|
||||
public event Action<float> OnVelocityFactorChanged;
|
||||
|
||||
// Private state variables for rope system
|
||||
private int currentRopeIndex = 0;
|
||||
private bool isGameOver = false;
|
||||
private bool _isSurfacing = false;
|
||||
|
||||
// Used to track if we're currently surfacing
|
||||
public bool IsSurfacing => _isSurfacing;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
currentSpawnProbability = baseSpawnProbability;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Subscribe to tile spawned event
|
||||
TrenchTileSpawner tileSpawner = FindFirstObjectByType<TrenchTileSpawner>();
|
||||
if (tileSpawner != null)
|
||||
{
|
||||
tileSpawner.onTileSpawned.AddListener(OnTileSpawned);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("No TrenchTileSpawner found in scene. Monster spawning won't work.");
|
||||
}
|
||||
|
||||
// Subscribe to player damage events
|
||||
PlayerCollisionBehavior.OnDamageTaken += OnPlayerDamageTaken;
|
||||
|
||||
// Validate rope references
|
||||
ValidateRopeReferences();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
// Unsubscribe from events when the manager is destroyed
|
||||
PlayerCollisionBehavior.OnDamageTaken -= OnPlayerDamageTaken;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
timeSinceLastSpawn += Time.deltaTime;
|
||||
|
||||
// Gradually increase spawn probability over time
|
||||
float previousProbability = currentSpawnProbability;
|
||||
if (currentSpawnProbability < maxSpawnProbability)
|
||||
{
|
||||
currentSpawnProbability += probabilityIncreaseRate * Time.deltaTime;
|
||||
currentSpawnProbability = Mathf.Min(currentSpawnProbability, maxSpawnProbability);
|
||||
|
||||
// Only fire event if probability changed significantly
|
||||
if (Mathf.Abs(currentSpawnProbability - previousProbability) > 0.01f)
|
||||
{
|
||||
OnSpawnProbabilityChanged?.Invoke(currentSpawnProbability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTileSpawned(GameObject tile)
|
||||
{
|
||||
// Check for spawn points in the new tile
|
||||
MonsterSpawnPoint[] spawnPoints = tile.GetComponentsInChildren<MonsterSpawnPoint>();
|
||||
|
||||
if (spawnPoints.Length == 0) return;
|
||||
|
||||
// If we're surfacing, don't spawn new monsters
|
||||
if (_isSurfacing) return;
|
||||
|
||||
bool forceSpawn = timeSinceLastSpawn >= guaranteedSpawnTime;
|
||||
bool onCooldown = timeSinceLastSpawn < spawnCooldown;
|
||||
|
||||
// Don't spawn if on cooldown, unless forced
|
||||
if (onCooldown && !forceSpawn) return;
|
||||
|
||||
// Check probability or forced spawn
|
||||
if (forceSpawn || UnityEngine.Random.value <= currentSpawnProbability)
|
||||
{
|
||||
// Pick a random spawn point from this tile
|
||||
MonsterSpawnPoint spawnPoint = spawnPoints[UnityEngine.Random.Range(0, spawnPoints.Length)];
|
||||
|
||||
// Spawn the monster at the spawn point and parent it
|
||||
SpawnMonster(spawnPoint.transform);
|
||||
|
||||
// Reset timer and adjust probability
|
||||
lastSpawnTime = Time.time;
|
||||
timeSinceLastSpawn = 0f;
|
||||
currentSpawnProbability = baseSpawnProbability;
|
||||
OnSpawnProbabilityChanged?.Invoke(currentSpawnProbability);
|
||||
}
|
||||
}
|
||||
|
||||
private void SpawnMonster(Transform spawnPoint)
|
||||
{
|
||||
if (monsterPrefabs.Length == 0)
|
||||
{
|
||||
Debug.LogWarning("No monster prefabs assigned to DivingGameManager.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Select random monster prefab
|
||||
GameObject prefab = monsterPrefabs[UnityEngine.Random.Range(0, monsterPrefabs.Length)];
|
||||
|
||||
// Instantiate monster at spawn point position
|
||||
GameObject monsterObj = Instantiate(prefab, spawnPoint.position, Quaternion.identity);
|
||||
Monster monster = monsterObj.GetComponent<Monster>();
|
||||
|
||||
if (monster != null)
|
||||
{
|
||||
// Parent the monster to the spawn point so it moves with the tile
|
||||
monsterObj.transform.SetParent(spawnPoint);
|
||||
|
||||
// Subscribe to monster events
|
||||
monster.OnPictureTaken += OnMonsterPictureTaken;
|
||||
monster.OnMonsterDespawned += OnMonsterDespawned;
|
||||
|
||||
// Add to active monsters list
|
||||
activeMonsters.Add(monster);
|
||||
|
||||
// Fire event
|
||||
OnMonsterSpawned?.Invoke(monster);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Monster prefab {prefab.name} does not have a Monster component!");
|
||||
Destroy(monsterObj);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMonsterPictureTaken(Monster monster)
|
||||
{
|
||||
// Calculate points based on depth
|
||||
int depthBonus = Mathf.FloorToInt(Mathf.Abs(monster.transform.position.y) * depthMultiplier);
|
||||
int pointsAwarded = basePoints + depthBonus;
|
||||
|
||||
// Add score
|
||||
playerScore += pointsAwarded;
|
||||
|
||||
// Fire events
|
||||
OnScoreChanged?.Invoke(playerScore);
|
||||
OnPictureTaken?.Invoke(monster, pointsAwarded);
|
||||
}
|
||||
|
||||
private void OnMonsterDespawned(Monster monster)
|
||||
{
|
||||
// Remove from active list
|
||||
activeMonsters.Remove(monster);
|
||||
|
||||
// Unsubscribe from events
|
||||
monster.OnPictureTaken -= OnMonsterPictureTaken;
|
||||
monster.OnMonsterDespawned -= OnMonsterDespawned;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the player takes damage from any collision
|
||||
/// </summary>
|
||||
private void OnPlayerDamageTaken()
|
||||
{
|
||||
if (isGameOver) return;
|
||||
|
||||
// Break the next rope in sequence
|
||||
BreakNextRope();
|
||||
|
||||
// Check if all ropes are broken
|
||||
if (currentRopeIndex >= playerRopes.Length)
|
||||
{
|
||||
TriggerGameOver();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Notify listeners about rope break and remaining ropes
|
||||
int remainingRopes = playerRopes.Length - currentRopeIndex;
|
||||
OnRopeBroken?.Invoke(remainingRopes);
|
||||
|
||||
Debug.Log($"[DivingGameManager] Rope broken! {remainingRopes} ropes remaining.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Breaks the next available rope in the sequence
|
||||
/// </summary>
|
||||
private void BreakNextRope()
|
||||
{
|
||||
if (currentRopeIndex < playerRopes.Length)
|
||||
{
|
||||
RopeBreaker ropeToBreak = playerRopes[currentRopeIndex];
|
||||
|
||||
if (ropeToBreak != null)
|
||||
{
|
||||
// Let the RopeBreaker component handle the breaking, effects, and sounds
|
||||
ropeToBreak.BreakRope();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[DivingGameManager] Rope at index {currentRopeIndex} is null!");
|
||||
}
|
||||
|
||||
// Move to the next rope regardless if current was null
|
||||
currentRopeIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Manually break a rope (for testing or external events)
|
||||
/// </summary>
|
||||
public void ForceBreakRope()
|
||||
{
|
||||
if (!isGameOver)
|
||||
{
|
||||
OnPlayerDamageTaken();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Triggers game over state when all ropes are broken
|
||||
/// </summary>
|
||||
private void TriggerGameOver()
|
||||
{
|
||||
if (isGameOver) return;
|
||||
|
||||
isGameOver = true;
|
||||
Debug.Log("[DivingGameManager] Game Over! All ropes broken. Starting surfacing sequence...");
|
||||
|
||||
// Fire game over event
|
||||
OnGameOver?.Invoke();
|
||||
|
||||
// Start surfacing instead of directly ending the game
|
||||
StartSurfacing();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates rope references and logs warnings if any are missing
|
||||
/// </summary>
|
||||
private void ValidateRopeReferences()
|
||||
{
|
||||
if (playerRopes == null || playerRopes.Length == 0)
|
||||
{
|
||||
Debug.LogWarning("[DivingGameManager] No ropes assigned to break! Damage system won't work properly.");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < playerRopes.Length; i++)
|
||||
{
|
||||
if (playerRopes[i] == null)
|
||||
{
|
||||
Debug.LogWarning($"[DivingGameManager] Rope at index {i} is null!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the rope system for a new game
|
||||
/// </summary>
|
||||
public void ResetRopeSystem()
|
||||
{
|
||||
// Reset rope state
|
||||
currentRopeIndex = 0;
|
||||
isGameOver = false;
|
||||
|
||||
// Restore all broken ropes
|
||||
if (playerRopes != null)
|
||||
{
|
||||
foreach (var rope in playerRopes)
|
||||
{
|
||||
if (rope != null)
|
||||
{
|
||||
rope.RestoreRope();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log("[DivingGameManager] Rope system reset.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the surfacing mode - reverses trench direction and adjusts all spawned entities
|
||||
/// </summary>
|
||||
public void StartSurfacing()
|
||||
{
|
||||
if (_isSurfacing) return; // Already surfacing
|
||||
|
||||
_isSurfacing = true;
|
||||
|
||||
// 1. Initiate smooth velocity transition to surfacing speed
|
||||
float targetVelocityFactor = -1.0f * surfacingSpeedFactor;
|
||||
SetVelocityFactor(targetVelocityFactor);
|
||||
|
||||
// 2. Find and notify trench tile spawner about direction change (for spawning/despawning logic)
|
||||
TrenchTileSpawner tileSpawner = FindFirstObjectByType<TrenchTileSpawner>();
|
||||
if (tileSpawner != null)
|
||||
{
|
||||
// Subscribe to velocity changes if not already subscribed
|
||||
OnVelocityFactorChanged -= tileSpawner.OnVelocityFactorChanged;
|
||||
OnVelocityFactorChanged += tileSpawner.OnVelocityFactorChanged;
|
||||
|
||||
// Subscribe to the last tile event
|
||||
tileSpawner.onLastTileLeft.RemoveListener(OnLastTileLeft);
|
||||
tileSpawner.onLastTileLeft.AddListener(OnLastTileLeft);
|
||||
|
||||
// Tell spawner to reverse spawn/despawn logic
|
||||
tileSpawner.StartSurfacing();
|
||||
|
||||
// Immediately send current velocity factor
|
||||
tileSpawner.OnVelocityFactorChanged(_currentVelocityFactor);
|
||||
}
|
||||
|
||||
// Handle the Rock object - disable components and animate it falling offscreen
|
||||
GameObject rockObject = GameObject.FindGameObjectWithTag("Rock");
|
||||
if (rockObject != null)
|
||||
{
|
||||
// Disable all components except Transform on the rock object (not its children)
|
||||
foreach (Component component in rockObject.GetComponents<Component>())
|
||||
{
|
||||
if (!(component is Transform))
|
||||
{
|
||||
if (component is Behaviour behaviour)
|
||||
{
|
||||
behaviour.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Start coroutine to animate the rock falling offscreen
|
||||
StartCoroutine(MoveRockOffscreen(rockObject.transform));
|
||||
|
||||
Debug.Log("[DivingGameManager] Disabled rock components and animating it offscreen");
|
||||
}
|
||||
|
||||
// Handle the Player object - disable components and reset X position
|
||||
GameObject playerObject = GameObject.FindGameObjectWithTag("Player");
|
||||
if (playerObject != null)
|
||||
{
|
||||
// Disable all components except Transform and Animator on the player object (not its children)
|
||||
foreach (Component component in playerObject.GetComponents<Component>())
|
||||
{
|
||||
if (!(component is Transform) && !(component is Animator))
|
||||
{
|
||||
if (component is Behaviour behaviour)
|
||||
{
|
||||
behaviour.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Start coroutine to reset X position to 0 over 1 second
|
||||
StartCoroutine(ResetPlayerPosition(playerObject.transform));
|
||||
|
||||
Debug.Log("[DivingGameManager] Disabled player components (keeping Animator) and resetting position");
|
||||
}
|
||||
|
||||
// 3. Find bubble spawner and slow down existing bubbles (no velocity management needed)
|
||||
BubbleSpawner bubbleSpawner = FindFirstObjectByType<BubbleSpawner>();
|
||||
if (bubbleSpawner != null)
|
||||
{
|
||||
bubbleSpawner.StartSurfacing();
|
||||
}
|
||||
|
||||
// 4. Find obstacle spawner and set up for velocity changes
|
||||
ObstacleSpawner obstacleSpawner = FindFirstObjectByType<ObstacleSpawner>();
|
||||
if (obstacleSpawner != null)
|
||||
{
|
||||
// Subscribe to velocity changes
|
||||
OnVelocityFactorChanged -= obstacleSpawner.OnVelocityFactorChanged;
|
||||
OnVelocityFactorChanged += obstacleSpawner.OnVelocityFactorChanged;
|
||||
|
||||
// Tell spawner to reverse spawn/despawn logic
|
||||
obstacleSpawner.StartSurfacing();
|
||||
|
||||
// Immediately send current velocity factor
|
||||
obstacleSpawner.OnVelocityFactorChanged(_currentVelocityFactor);
|
||||
}
|
||||
|
||||
// Start the surfacing sequence coroutine
|
||||
if (_surfacingSequenceCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_surfacingSequenceCoroutine);
|
||||
}
|
||||
_surfacingSequenceCoroutine = StartCoroutine(SurfacingSequence());
|
||||
|
||||
Debug.Log($"[DivingGameManager] Started surfacing with target velocity factor: {targetVelocityFactor}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine to animate the rock falling below the screen
|
||||
/// </summary>
|
||||
private IEnumerator MoveRockOffscreen(Transform rockTransform)
|
||||
{
|
||||
Vector3 startPosition = rockTransform.position;
|
||||
|
||||
// Calculate position below the screen
|
||||
Camera mainCamera = Camera.main;
|
||||
if (mainCamera == null)
|
||||
{
|
||||
Debug.LogWarning("[DivingGameManager] Cannot find main camera to calculate offscreen position");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Get a position below the bottom of the screen
|
||||
Vector3 offscreenPosition = mainCamera.ViewportToWorldPoint(new Vector3(0.5f, -0.2f, mainCamera.nearClipPlane));
|
||||
Vector3 targetPosition = new Vector3(startPosition.x, offscreenPosition.y, startPosition.z);
|
||||
|
||||
float duration = 2.0f; // Animation duration in seconds
|
||||
float elapsed = 0f;
|
||||
|
||||
while (elapsed < duration)
|
||||
{
|
||||
elapsed += Time.deltaTime;
|
||||
float t = Mathf.Clamp01(elapsed / duration);
|
||||
|
||||
// Use an easing function that accelerates to simulate falling
|
||||
float easedT = t * t; // Quadratic easing
|
||||
|
||||
rockTransform.position = Vector3.Lerp(startPosition, targetPosition, easedT);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// Ensure final position is exactly at target
|
||||
rockTransform.position = targetPosition;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine to reset the player's X position to 0 over time
|
||||
/// </summary>
|
||||
private IEnumerator ResetPlayerPosition(Transform playerTransform)
|
||||
{
|
||||
Vector3 startPosition = playerTransform.position;
|
||||
Vector3 targetPosition = new Vector3(0f, startPosition.y, startPosition.z);
|
||||
|
||||
float duration = 1.0f; // Reset duration in seconds (as requested)
|
||||
float elapsed = 0f;
|
||||
|
||||
while (elapsed < duration)
|
||||
{
|
||||
elapsed += Time.deltaTime;
|
||||
float t = Mathf.Clamp01(elapsed / duration);
|
||||
|
||||
// Use smooth step for more natural movement
|
||||
float smoothT = Mathf.SmoothStep(0f, 1f, t);
|
||||
|
||||
playerTransform.position = Vector3.Lerp(startPosition, targetPosition, smoothT);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// Ensure final position is exactly at target
|
||||
playerTransform.position = targetPosition;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine to handle the surfacing sequence timing
|
||||
/// </summary>
|
||||
private IEnumerator SurfacingSequence()
|
||||
{
|
||||
// Wait for the configured delay
|
||||
yield return new WaitForSeconds(surfacingSpawnDelay);
|
||||
|
||||
// Find tile spawner and tell it to stop spawning
|
||||
TrenchTileSpawner tileSpawner = FindFirstObjectByType<TrenchTileSpawner>();
|
||||
if (tileSpawner != null)
|
||||
{
|
||||
// Tell it to stop spawning new tiles
|
||||
tileSpawner.StopSpawning();
|
||||
Debug.Log("[DivingGameManager] Stopped spawning new tiles after delay");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the last tile leaves the screen
|
||||
/// </summary>
|
||||
private void OnLastTileLeft()
|
||||
{
|
||||
// Play the timeline
|
||||
if (surfacingTimeline != null)
|
||||
{
|
||||
surfacingTimeline.Play();
|
||||
Debug.Log("[DivingGameManager] Last tile left the screen, playing timeline");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[DivingGameManager] No surfacing timeline assigned!");
|
||||
}
|
||||
}
|
||||
|
||||
// Call this when the game ends
|
||||
public void EndGame()
|
||||
{
|
||||
// Clean up active monsters
|
||||
foreach (var monster in activeMonsters.ToArray())
|
||||
{
|
||||
if (monster != null)
|
||||
{
|
||||
monster.DespawnMonster();
|
||||
}
|
||||
}
|
||||
|
||||
activeMonsters.Clear();
|
||||
|
||||
// Final score could be saved to player prefs or other persistence
|
||||
Debug.Log($"Final Score: {playerScore}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts a smooth transition to the new velocity factor
|
||||
/// </summary>
|
||||
/// <param name="targetFactor">Target velocity factor (e.g., -1.0 for surfacing speed)</param>
|
||||
public void SetVelocityFactor(float targetFactor)
|
||||
{
|
||||
if (_velocityTransitionCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_velocityTransitionCoroutine);
|
||||
}
|
||||
|
||||
_velocityTransitionCoroutine = StartCoroutine(TransitionVelocityFactor(targetFactor));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine to smoothly transition the velocity factor over time
|
||||
/// </summary>
|
||||
private IEnumerator<WaitForEndOfFrame> TransitionVelocityFactor(float targetFactor)
|
||||
{
|
||||
float startFactor = _currentVelocityFactor;
|
||||
float elapsed = 0f;
|
||||
|
||||
while (elapsed < speedTransitionDuration)
|
||||
{
|
||||
elapsed += Time.deltaTime;
|
||||
float t = Mathf.Clamp01(elapsed / speedTransitionDuration);
|
||||
|
||||
// Smooth step interpolation
|
||||
float smoothStep = t * t * (3f - 2f * t);
|
||||
|
||||
_currentVelocityFactor = Mathf.Lerp(startFactor, targetFactor, smoothStep);
|
||||
|
||||
// Notify listeners about the velocity factor change
|
||||
OnVelocityFactorChanged?.Invoke(_currentVelocityFactor);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_currentVelocityFactor = targetFactor;
|
||||
|
||||
// Final assignment to ensure exact target value
|
||||
OnVelocityFactorChanged?.Invoke(_currentVelocityFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b2b072821054504b03fc4014b063153
|
||||
timeCreated: 1758273243
|
||||
75
Assets/Scripts/Minigames/DivingForPictures/DivingScoreUI.cs
Normal file
75
Assets/Scripts/Minigames/DivingForPictures/DivingScoreUI.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
public class DivingScoreUI : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TextMeshProUGUI scoreText;
|
||||
[SerializeField] private GameObject scorePopupPrefab;
|
||||
[SerializeField] private Transform popupParent;
|
||||
|
||||
private DivingGameManager gameManager;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
gameManager = FindFirstObjectByType<DivingGameManager>();
|
||||
|
||||
if (gameManager != null)
|
||||
{
|
||||
// Subscribe to events
|
||||
gameManager.OnScoreChanged += UpdateScoreDisplay;
|
||||
gameManager.OnPictureTaken += ShowScorePopup;
|
||||
|
||||
// Initialize display
|
||||
UpdateScoreDisplay(gameManager.PlayerScore);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("No DivingGameManager found in scene.");
|
||||
}
|
||||
|
||||
// Create popup parent if needed
|
||||
if (popupParent == null)
|
||||
{
|
||||
popupParent = transform;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (gameManager != null)
|
||||
{
|
||||
// Unsubscribe from events
|
||||
gameManager.OnScoreChanged -= UpdateScoreDisplay;
|
||||
gameManager.OnPictureTaken -= ShowScorePopup;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateScoreDisplay(int score)
|
||||
{
|
||||
if (scoreText != null)
|
||||
{
|
||||
scoreText.text = $"Score: {score}";
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowScorePopup(Monster monster, int points)
|
||||
{
|
||||
if (scorePopupPrefab == null) return;
|
||||
|
||||
// Create popup at monster position
|
||||
GameObject popup = Instantiate(scorePopupPrefab, monster.transform.position, Quaternion.identity, popupParent);
|
||||
|
||||
// Find text component and set value
|
||||
TextMeshProUGUI popupText = popup.GetComponentInChildren<TextMeshProUGUI>();
|
||||
if (popupText != null)
|
||||
{
|
||||
popupText.text = $"+{points}";
|
||||
}
|
||||
|
||||
// Auto-destroy after delay
|
||||
Destroy(popup, 2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5ec365b02ab496d8fa1d5f7d41a33e9
|
||||
timeCreated: 1758273243
|
||||
339
Assets/Scripts/Minigames/DivingForPictures/FloatingObstacle.cs
Normal file
339
Assets/Scripts/Minigames/DivingForPictures/FloatingObstacle.cs
Normal file
@@ -0,0 +1,339 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Pooling;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
/// <summary>
|
||||
/// Complete floating obstacle component that handles movement and pooling.
|
||||
/// Obstacles move upward toward the surface. Collision detection is handled by the player.
|
||||
/// Once an obstacle hits the player, its collider is disabled to prevent further collisions.
|
||||
/// Uses coroutines for better performance instead of Update() calls.
|
||||
/// </summary>
|
||||
public class FloatingObstacle : MonoBehaviour, IPoolable
|
||||
{
|
||||
[Header("Obstacle Properties")]
|
||||
[Tooltip("Index of the prefab this obstacle was created from")]
|
||||
[SerializeField] private int prefabIndex;
|
||||
|
||||
[Tooltip("Movement speed of this obstacle")]
|
||||
[SerializeField] private float moveSpeed = 2f;
|
||||
|
||||
[Header("Movement")]
|
||||
[Tooltip("Whether this obstacle moves (can be disabled for static obstacles)")]
|
||||
[SerializeField] private bool enableMovement = true;
|
||||
|
||||
[Header("References")]
|
||||
[Tooltip("Reference to the spawner that created this obstacle")]
|
||||
[SerializeField] private ObstacleSpawner spawner;
|
||||
|
||||
// Public properties
|
||||
public int PrefabIndex
|
||||
{
|
||||
get => prefabIndex;
|
||||
set => prefabIndex = value;
|
||||
}
|
||||
|
||||
public float MoveSpeed
|
||||
{
|
||||
get => moveSpeed;
|
||||
set => moveSpeed = value;
|
||||
}
|
||||
|
||||
// Private fields
|
||||
private Collider2D _collider;
|
||||
private Camera _mainCamera;
|
||||
private float _screenTop;
|
||||
private float _screenBottom; // Added to track bottom of screen
|
||||
private Coroutine _movementCoroutine;
|
||||
private Coroutine _offScreenCheckCoroutine;
|
||||
private bool _isSurfacing = false; // Flag to track surfacing state
|
||||
private float _velocityFactor = 1.0f; // Current velocity factor from game manager
|
||||
private float _baseMoveSpeed; // Original move speed before velocity factor is applied
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_collider = GetComponent<Collider2D>();
|
||||
|
||||
if (_collider == null)
|
||||
{
|
||||
_collider = GetComponentInChildren<Collider2D>();
|
||||
}
|
||||
|
||||
if (_collider == null)
|
||||
{
|
||||
Debug.LogError($"[FloatingObstacle] No Collider2D found on {gameObject.name}!");
|
||||
}
|
||||
|
||||
_mainCamera = Camera.main;
|
||||
_baseMoveSpeed = moveSpeed; // Store original speed
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
StartObstacleBehavior();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
StopObstacleBehavior();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the obstacle behavior coroutines
|
||||
/// </summary>
|
||||
private void StartObstacleBehavior()
|
||||
{
|
||||
if (enableMovement)
|
||||
{
|
||||
_movementCoroutine = StartCoroutine(MovementCoroutine());
|
||||
}
|
||||
|
||||
_offScreenCheckCoroutine = StartCoroutine(OffScreenCheckCoroutine());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops all obstacle behavior coroutines
|
||||
/// </summary>
|
||||
private void StopObstacleBehavior()
|
||||
{
|
||||
if (_movementCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_movementCoroutine);
|
||||
_movementCoroutine = null;
|
||||
}
|
||||
|
||||
if (_offScreenCheckCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_offScreenCheckCoroutine);
|
||||
_offScreenCheckCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the velocity factor changes from the DivingGameManager via ObstacleSpawner
|
||||
/// </summary>
|
||||
public void OnVelocityFactorChanged(float velocityFactor)
|
||||
{
|
||||
_velocityFactor = velocityFactor;
|
||||
|
||||
// Update actual move speed based on velocity factor and base speed
|
||||
// We use Abs for magnitude and Sign for direction
|
||||
moveSpeed = _baseMoveSpeed * Mathf.Abs(_velocityFactor);
|
||||
|
||||
// Restart movement with new speed if needed
|
||||
if (enableMovement && gameObject.activeInHierarchy)
|
||||
{
|
||||
if (_movementCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_movementCoroutine);
|
||||
}
|
||||
_movementCoroutine = StartCoroutine(MovementCoroutine());
|
||||
}
|
||||
|
||||
Debug.Log($"[FloatingObstacle] {gameObject.name} velocity factor updated to {_velocityFactor:F2}, speed: {moveSpeed:F2}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine that handles obstacle movement
|
||||
/// </summary>
|
||||
private IEnumerator MovementCoroutine()
|
||||
{
|
||||
while (enabled && gameObject.activeInHierarchy)
|
||||
{
|
||||
// Use velocity factor sign to determine direction
|
||||
Vector3 direction = Vector3.up * Mathf.Sign(_velocityFactor);
|
||||
float speed = moveSpeed * Time.deltaTime;
|
||||
|
||||
// Apply movement in correct direction
|
||||
transform.position += direction * speed;
|
||||
|
||||
// Wait for next frame
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Coroutine that checks if obstacle has moved off-screen
|
||||
/// Runs at a lower frequency than movement for better performance
|
||||
/// </summary>
|
||||
private IEnumerator OffScreenCheckCoroutine()
|
||||
{
|
||||
const float checkInterval = 0.2f; // Check every 200ms instead of every frame
|
||||
|
||||
while (enabled && gameObject.activeInHierarchy)
|
||||
{
|
||||
CheckIfOffScreen();
|
||||
|
||||
// Wait for the check interval
|
||||
yield return new WaitForSeconds(checkInterval);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disables the collider after hitting the player to prevent further collisions
|
||||
/// This is more performant than tracking hit state
|
||||
/// </summary>
|
||||
public void MarkDamageDealt()
|
||||
{
|
||||
if (_collider != null && _collider.enabled)
|
||||
{
|
||||
_collider.enabled = false;
|
||||
Debug.Log($"[FloatingObstacle] Obstacle {gameObject.name} hit player - collider disabled");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the obstacle has moved off-screen and should be despawned
|
||||
/// </summary>
|
||||
private void CheckIfOffScreen()
|
||||
{
|
||||
if (_mainCamera == null)
|
||||
{
|
||||
_mainCamera = Camera.main;
|
||||
if (_mainCamera == null) return;
|
||||
}
|
||||
|
||||
// Always recalculate screen bounds to ensure accuracy
|
||||
Vector3 topWorldPoint = _mainCamera.ViewportToWorldPoint(new Vector3(0.5f, 1f, _mainCamera.transform.position.z));
|
||||
_screenTop = topWorldPoint.y;
|
||||
|
||||
Vector3 bottomWorldPoint = _mainCamera.ViewportToWorldPoint(new Vector3(0.5f, 0f, _mainCamera.transform.position.z));
|
||||
_screenBottom = bottomWorldPoint.y;
|
||||
|
||||
// Check if obstacle is significantly above screen top (obstacles move upward)
|
||||
// Use a larger buffer to ensure obstacles are truly off-screen before returning to pool
|
||||
if (transform.position.y > _screenTop + 5f)
|
||||
{
|
||||
Debug.Log($"[FloatingObstacle] {gameObject.name} off-screen at Y:{transform.position.y:F2}, screen top:{_screenTop:F2}");
|
||||
ReturnToPool();
|
||||
}
|
||||
else if (transform.position.y < _screenBottom - 5f) // Added check for bottom screen edge
|
||||
{
|
||||
Debug.Log($"[FloatingObstacle] {gameObject.name} below screen at Y:{transform.position.y:F2}, screen bottom:{_screenBottom:F2}");
|
||||
ReturnToPool();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns this obstacle to the spawner's pool
|
||||
/// </summary>
|
||||
private void ReturnToPool()
|
||||
{
|
||||
// CRITICAL: Stop all behavior first to prevent race conditions
|
||||
// This ensures no more off-screen checks or movement happen during pool return
|
||||
StopObstacleBehavior();
|
||||
|
||||
if (spawner != null)
|
||||
{
|
||||
spawner.ReturnObstacleToPool(gameObject, prefabIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try to find the spawner instead of destroying the object
|
||||
ObstacleSpawner foundSpawner = FindFirstObjectByType<ObstacleSpawner>();
|
||||
if (foundSpawner != null)
|
||||
{
|
||||
Debug.LogWarning($"[FloatingObstacle] Obstacle {gameObject.name} lost spawner reference, found replacement spawner");
|
||||
spawner = foundSpawner;
|
||||
spawner.ReturnObstacleToPool(gameObject, prefabIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// No spawner found - just deactivate the object instead of destroying it
|
||||
Debug.LogWarning($"[FloatingObstacle] No spawner found for {gameObject.name}, deactivating safely");
|
||||
gameObject.SetActive(false);
|
||||
|
||||
// Move to a safe location to avoid interference
|
||||
transform.position = new Vector3(1000f, 1000f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the spawner reference for this obstacle
|
||||
/// </summary>
|
||||
/// <param name="obstacleSpawner">The spawner that created this obstacle</param>
|
||||
public void SetSpawner(ObstacleSpawner obstacleSpawner)
|
||||
{
|
||||
spawner = obstacleSpawner;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the obstacle is retrieved from the pool
|
||||
/// </summary>
|
||||
public void OnSpawn()
|
||||
{
|
||||
// Reset all state first
|
||||
_screenTop = 0f; // Reset cached screen bounds
|
||||
_mainCamera = Camera.main; // Refresh camera reference
|
||||
|
||||
// Re-enable the collider for reuse
|
||||
if (_collider != null)
|
||||
{
|
||||
_collider.enabled = true;
|
||||
}
|
||||
|
||||
Debug.Log($"[FloatingObstacle] Obstacle {gameObject.name} spawned from pool");
|
||||
|
||||
// Note: Don't start coroutines here - OnEnable() will handle that when SetActive(true) is called
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the obstacle is returned to the pool
|
||||
/// </summary>
|
||||
public void OnDespawn()
|
||||
{
|
||||
// Stop all coroutines before returning to pool
|
||||
StopObstacleBehavior();
|
||||
|
||||
// Re-enable collider for next use (in case it was disabled)
|
||||
if (_collider != null)
|
||||
{
|
||||
_collider.enabled = true;
|
||||
}
|
||||
|
||||
Debug.Log($"[FloatingObstacle] Obstacle {gameObject.name} despawned to pool");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to manually trigger return to pool (for external systems)
|
||||
/// </summary>
|
||||
public void ForceReturnToPool()
|
||||
{
|
||||
ReturnToPool();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to enable/disable movement at runtime
|
||||
/// </summary>
|
||||
public void SetMovementEnabled(bool enabled)
|
||||
{
|
||||
if (enableMovement == enabled) return;
|
||||
|
||||
enableMovement = enabled;
|
||||
|
||||
// Restart coroutines to apply movement change
|
||||
if (gameObject.activeInHierarchy)
|
||||
{
|
||||
StopObstacleBehavior();
|
||||
StartObstacleBehavior();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets surfacing mode, which reverses obstacle movement direction
|
||||
/// </summary>
|
||||
public void StartSurfacing()
|
||||
{
|
||||
if (_isSurfacing) return; // Already surfacing
|
||||
|
||||
_isSurfacing = true;
|
||||
|
||||
// Reverse movement speed (already handled by ObstacleSpawner, but this ensures consistency)
|
||||
moveSpeed *= -1;
|
||||
|
||||
Debug.Log($"[FloatingObstacle] {gameObject.name} started surfacing with speed: {moveSpeed}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32718083aef44be2a4318681fcdf5b2e
|
||||
timeCreated: 1758117709
|
||||
133
Assets/Scripts/Minigames/DivingForPictures/Monster.cs
Normal file
133
Assets/Scripts/Minigames/DivingForPictures/Monster.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
public class Monster : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
[SerializeField] private CircleCollider2D detectionCollider;
|
||||
|
||||
private bool pictureAlreadyTaken = false;
|
||||
private Camera mainCamera;
|
||||
|
||||
// Events
|
||||
public event Action<Monster> OnPictureTaken;
|
||||
public event Action<Monster> OnMonsterSpawned;
|
||||
public event Action<Monster> OnMonsterDespawned;
|
||||
|
||||
// Properties
|
||||
public float PictureRadius => detectionCollider != null ? detectionCollider.radius : 0f;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (detectionCollider == null)
|
||||
detectionCollider = GetComponent<CircleCollider2D>();
|
||||
|
||||
mainCamera = Camera.main;
|
||||
|
||||
// Start checking if monster is off-screen
|
||||
StartCoroutine(CheckIfOffScreen());
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
pictureAlreadyTaken = false;
|
||||
OnMonsterSpawned?.Invoke(this);
|
||||
}
|
||||
|
||||
private IEnumerator CheckIfOffScreen()
|
||||
{
|
||||
WaitForSeconds wait = new WaitForSeconds(0.5f);
|
||||
|
||||
while (true)
|
||||
{
|
||||
yield return wait;
|
||||
|
||||
if (!IsVisibleToCamera())
|
||||
{
|
||||
DespawnMonster();
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsVisibleToCamera()
|
||||
{
|
||||
if (mainCamera == null)
|
||||
mainCamera = Camera.main;
|
||||
|
||||
if (mainCamera == null)
|
||||
return false;
|
||||
|
||||
// Get the world position (will account for parent movement)
|
||||
Vector3 worldPosition = transform.position;
|
||||
Vector3 viewportPoint = mainCamera.WorldToViewportPoint(worldPosition);
|
||||
|
||||
// Adjust buffer to be larger below the screen to account for downward movement
|
||||
float bufferSides = 0.2f;
|
||||
float bufferTop = 0.2f;
|
||||
float bufferBottom = 0.5f; // Larger buffer below the screen
|
||||
|
||||
return viewportPoint.x > -bufferSides &&
|
||||
viewportPoint.x < 1 + bufferSides &&
|
||||
viewportPoint.y > -bufferBottom &&
|
||||
viewportPoint.y < 1 + bufferTop;
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
// Check if it's the player
|
||||
if (other.CompareTag("Player") && !pictureAlreadyTaken)
|
||||
{
|
||||
TakePicture();
|
||||
}
|
||||
}
|
||||
|
||||
// Called when a picture is taken of this monster
|
||||
public void TakePicture()
|
||||
{
|
||||
if (pictureAlreadyTaken) return;
|
||||
|
||||
pictureAlreadyTaken = true;
|
||||
OnPictureTaken?.Invoke(this);
|
||||
|
||||
DespawnMonster();
|
||||
}
|
||||
|
||||
// Public method to despawn this monster
|
||||
public void DespawnMonster()
|
||||
{
|
||||
if (gameObject.activeSelf)
|
||||
{
|
||||
OnMonsterDespawned?.Invoke(this);
|
||||
gameObject.SetActive(false);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
// Visualization for the picture radius in editor
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
// Get the collider in edit mode
|
||||
if (detectionCollider == null)
|
||||
detectionCollider = GetComponent<CircleCollider2D>();
|
||||
|
||||
if (detectionCollider != null)
|
||||
{
|
||||
Gizmos.color = Color.yellow;
|
||||
Gizmos.DrawWireSphere(transform.position, detectionCollider.radius / 2);
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// Update collider radius in editor
|
||||
private void OnValidate()
|
||||
{
|
||||
if (detectionCollider == null)
|
||||
detectionCollider = GetComponent<CircleCollider2D>();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1b1889b120f4259a9fa9b7e415ea58a
|
||||
timeCreated: 1758273243
|
||||
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
public class MonsterSpawnPoint : MonoBehaviour
|
||||
{
|
||||
[Tooltip("Visual radius for spawn point in editor")]
|
||||
public float gizmoRadius = 0.5f;
|
||||
|
||||
// Visual indicator for editor only
|
||||
private void OnDrawGizmos()
|
||||
{
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawWireSphere(transform.position, gizmoRadius);
|
||||
|
||||
// Draw a cross in the center for better visibility
|
||||
Gizmos.DrawLine(
|
||||
transform.position + Vector3.left * gizmoRadius * 0.5f,
|
||||
transform.position + Vector3.right * gizmoRadius * 0.5f);
|
||||
Gizmos.DrawLine(
|
||||
transform.position + Vector3.up * gizmoRadius * 0.5f,
|
||||
transform.position + Vector3.down * gizmoRadius * 0.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ddb6d3629fe4b46b1d7ae972a83539c
|
||||
timeCreated: 1758273243
|
||||
@@ -0,0 +1,44 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
/// <summary>
|
||||
/// Collision behavior that handles damage from mobile obstacles.
|
||||
/// Uses trigger-based collision detection with shared immunity state.
|
||||
/// </summary>
|
||||
public class ObstacleCollision : PlayerCollisionBehavior
|
||||
{
|
||||
protected override void HandleCollisionResponse(Collider2D obstacle)
|
||||
{
|
||||
// Mark the obstacle as having dealt damage to prevent multiple hits
|
||||
FloatingObstacle obstacleComponent = obstacle.GetComponent<FloatingObstacle>();
|
||||
if (obstacleComponent != null)
|
||||
{
|
||||
obstacleComponent.MarkDamageDealt();
|
||||
}
|
||||
|
||||
Debug.Log($"[ObstacleCollision] Player hit by obstacle {obstacle.gameObject.name}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to prevent input blocking during damage immunity
|
||||
/// Since obstacles pass through the player, we don't want to block input
|
||||
/// </summary>
|
||||
protected override void OnImmunityStart()
|
||||
{
|
||||
Debug.Log($"[ObstacleCollision] Damage immunity started for {damageImmunityDuration} seconds");
|
||||
|
||||
// Don't block input for obstacle damage - let player keep moving
|
||||
// The shared immunity system will handle the collision prevention
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to handle immunity end
|
||||
/// </summary>
|
||||
protected override void OnImmunityEnd()
|
||||
{
|
||||
Debug.Log($"[ObstacleCollision] Damage immunity ended");
|
||||
// No special handling needed - shared immunity system handles collider re-enabling
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c9c18dbd013d42ae8c221e6205e4d49c
|
||||
timeCreated: 1758116850
|
||||
54
Assets/Scripts/Minigames/DivingForPictures/ObstaclePool.cs
Normal file
54
Assets/Scripts/Minigames/DivingForPictures/ObstaclePool.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
using Pooling;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
/// <summary>
|
||||
/// Manages a pool of floating obstacle objects to reduce garbage collection overhead.
|
||||
/// Optimized for handling a large number of different obstacle prefab types.
|
||||
/// </summary>
|
||||
public class ObstaclePool : MultiPrefabPool<FloatingObstacle>
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns an obstacle to the pool
|
||||
/// </summary>
|
||||
/// <param name="obstacle">The obstacle to return to the pool</param>
|
||||
/// <param name="prefabIndex">The index of the prefab this obstacle was created from</param>
|
||||
public void ReturnObstacle(GameObject obstacle, int prefabIndex)
|
||||
{
|
||||
if (obstacle != null)
|
||||
{
|
||||
FloatingObstacle obstacleComponent = obstacle.GetComponent<FloatingObstacle>();
|
||||
if (obstacleComponent != null)
|
||||
{
|
||||
Debug.Log($"[ObstaclePool] Returning obstacle {obstacle.name} to pool");
|
||||
Return(obstacleComponent, prefabIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Attempted to return a GameObject without a FloatingObstacle component: {obstacle.name}");
|
||||
Destroy(obstacle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an obstacle from the pool, or creates a new one if the pool is empty
|
||||
/// </summary>
|
||||
/// <returns>An obstacle instance ready to use</returns>
|
||||
public GameObject GetObstacle(int prefabIndex)
|
||||
{
|
||||
Debug.Log($"[ObstaclePool] GetObstacle called for prefab index {prefabIndex}");
|
||||
FloatingObstacle obstacleComponent = Get(prefabIndex);
|
||||
|
||||
if (obstacleComponent == null)
|
||||
{
|
||||
Debug.LogError($"[ObstaclePool] Get() returned null for prefab index {prefabIndex}");
|
||||
return null;
|
||||
}
|
||||
|
||||
Debug.Log($"[ObstaclePool] Get() returned obstacle {obstacleComponent.name}, active state: {obstacleComponent.gameObject.activeInHierarchy}");
|
||||
return obstacleComponent.gameObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a53ba79246a94dc4a71d2fb0d7214cfb
|
||||
timeCreated: 1758116804
|
||||
568
Assets/Scripts/Minigames/DivingForPictures/ObstacleSpawner.cs
Normal file
568
Assets/Scripts/Minigames/DivingForPictures/ObstacleSpawner.cs
Normal file
@@ -0,0 +1,568 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using Pooling;
|
||||
|
||||
namespace Minigames.DivingForPictures
|
||||
{
|
||||
/// <summary>
|
||||
/// Spawns and manages mobile obstacles for the diving minigame.
|
||||
/// Uses object pooling and validates spawn positions to avoid colliding with tiles.
|
||||
/// </summary>
|
||||
public class ObstacleSpawner : MonoBehaviour
|
||||
{
|
||||
[Header("Obstacle Prefabs")]
|
||||
[Tooltip("List of possible obstacle prefabs to spawn")]
|
||||
[SerializeField] private List<GameObject> obstaclePrefabs;
|
||||
|
||||
[Header("Spawn Settings")]
|
||||
[Tooltip("Time interval between spawn attempts (in seconds)")]
|
||||
[SerializeField] private float spawnInterval = 2f;
|
||||
|
||||
[Tooltip("Random variation in spawn timing (+/- seconds)")]
|
||||
[SerializeField] private float spawnIntervalVariation = 0.5f;
|
||||
|
||||
[Tooltip("Maximum number of spawn position attempts before skipping")]
|
||||
[SerializeField] private int maxSpawnAttempts = 10;
|
||||
|
||||
[Tooltip("Radius around spawn point to check for tile collisions")]
|
||||
[SerializeField] private float spawnCollisionRadius = 1f;
|
||||
|
||||
[Header("Spawn Position")]
|
||||
[Tooltip("How far below screen to spawn obstacles")]
|
||||
[SerializeField] private float spawnDistanceBelowScreen = 2f;
|
||||
|
||||
[Tooltip("Horizontal spawn range (distance from center)")]
|
||||
[SerializeField] private float spawnRangeX = 8f;
|
||||
|
||||
[Header("Obstacle Properties Randomization")]
|
||||
[Tooltip("Minimum movement speed for spawned obstacles")]
|
||||
[SerializeField] private float minMoveSpeed = 1f;
|
||||
|
||||
[Tooltip("Maximum movement speed for spawned obstacles")]
|
||||
[SerializeField] private float maxMoveSpeed = 4f;
|
||||
|
||||
[Header("Object Pooling")]
|
||||
[Tooltip("Whether to use object pooling for obstacles")]
|
||||
[SerializeField] private bool useObjectPooling = true;
|
||||
|
||||
[Tooltip("Maximum objects per prefab type in pool")]
|
||||
[SerializeField] private int maxPerPrefabPoolSize = 3;
|
||||
|
||||
[Tooltip("Total maximum pool size across all prefab types")]
|
||||
[SerializeField] private int totalMaxPoolSize = 15;
|
||||
|
||||
[Header("Layer Settings")]
|
||||
[Tooltip("Layer mask for tile collision detection during spawn position validation")]
|
||||
[SerializeField] private LayerMask tileLayerMask = -1; // Let user configure which layers to avoid
|
||||
|
||||
[Tooltip("Target layer for spawned obstacles - obstacles will be placed on this layer")]
|
||||
[SerializeField] private int obstacleLayer = 11; // Default to layer 11, but configurable
|
||||
|
||||
[Header("Events")]
|
||||
[Tooltip("Called when an obstacle is spawned")]
|
||||
public UnityEvent<GameObject> onObstacleSpawned;
|
||||
|
||||
[Tooltip("Called when an obstacle is returned to pool")]
|
||||
public UnityEvent<GameObject> onObstacleDestroyed;
|
||||
|
||||
// Private fields
|
||||
private ObstaclePool _obstaclePool;
|
||||
private Camera _mainCamera;
|
||||
private float _screenBottom;
|
||||
private float _spawnRangeX;
|
||||
private Coroutine _spawnCoroutine;
|
||||
private readonly List<GameObject> _activeObstacles = new List<GameObject>();
|
||||
private int _obstacleCounter = 0; // Counter for unique obstacle naming
|
||||
private bool _isSurfacing = false; // Flag to track surfacing state
|
||||
private float _velocityFactor = 1.0f; // Current velocity factor from the game manager
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_mainCamera = Camera.main;
|
||||
|
||||
// Validate obstacle prefabs
|
||||
ValidateObstaclePrefabs();
|
||||
|
||||
if (useObjectPooling)
|
||||
{
|
||||
InitializeObjectPool();
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
CalculateScreenBounds();
|
||||
StartSpawning();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
StopSpawning();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validates that all prefabs have required components
|
||||
/// </summary>
|
||||
private void ValidateObstaclePrefabs()
|
||||
{
|
||||
for (int i = 0; i < obstaclePrefabs.Count; i++)
|
||||
{
|
||||
if (obstaclePrefabs[i] == null) continue;
|
||||
|
||||
// Check if the prefab has a FloatingObstacle component
|
||||
if (obstaclePrefabs[i].GetComponent<FloatingObstacle>() == null)
|
||||
{
|
||||
Debug.LogWarning($"Obstacle prefab {obstaclePrefabs[i].name} does not have a FloatingObstacle component. Adding one automatically.");
|
||||
obstaclePrefabs[i].AddComponent<FloatingObstacle>();
|
||||
}
|
||||
|
||||
// Ensure the prefab is on the correct layer (using configurable obstacleLayer)
|
||||
if (obstaclePrefabs[i].layer != obstacleLayer)
|
||||
{
|
||||
Debug.LogWarning($"Obstacle prefab {obstaclePrefabs[i].name} is not on the configured obstacle layer ({obstacleLayer}). Setting layer automatically.");
|
||||
SetLayerRecursively(obstaclePrefabs[i], obstacleLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the layer of a GameObject and all its children
|
||||
/// </summary>
|
||||
private void SetLayerRecursively(GameObject obj, int layer)
|
||||
{
|
||||
obj.layer = layer;
|
||||
foreach (Transform child in obj.transform)
|
||||
{
|
||||
SetLayerRecursively(child.gameObject, layer);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the object pool system
|
||||
/// </summary>
|
||||
private void InitializeObjectPool()
|
||||
{
|
||||
GameObject poolGO = new GameObject("ObstaclePool");
|
||||
poolGO.transform.SetParent(transform);
|
||||
_obstaclePool = poolGO.AddComponent<ObstaclePool>();
|
||||
|
||||
// Set up pool configuration
|
||||
_obstaclePool.maxPerPrefabPoolSize = maxPerPrefabPoolSize;
|
||||
_obstaclePool.totalMaxPoolSize = totalMaxPoolSize;
|
||||
|
||||
// Convert GameObject list to FloatingObstacle list
|
||||
List<FloatingObstacle> prefabObstacles = new List<FloatingObstacle>(obstaclePrefabs.Count);
|
||||
foreach (var prefab in obstaclePrefabs)
|
||||
{
|
||||
if (prefab != null)
|
||||
{
|
||||
FloatingObstacle obstacleComponent = prefab.GetComponent<FloatingObstacle>();
|
||||
if (obstacleComponent != null)
|
||||
{
|
||||
prefabObstacles.Add(obstacleComponent);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Obstacle prefab {prefab.name} is missing a FloatingObstacle component!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize the pool
|
||||
_obstaclePool.Initialize(prefabObstacles);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculate screen bounds in world space dynamically
|
||||
/// </summary>
|
||||
private void CalculateScreenBounds()
|
||||
{
|
||||
if (_mainCamera == null)
|
||||
{
|
||||
_mainCamera = Camera.main;
|
||||
if (_mainCamera == null)
|
||||
{
|
||||
Debug.LogError("[ObstacleSpawner] No main camera found!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate screen bottom (Y spawn position will be 2 units below this)
|
||||
Vector3 bottomWorldPoint = _mainCamera.ViewportToWorldPoint(new Vector3(0.5f, 0f, _mainCamera.nearClipPlane));
|
||||
_screenBottom = bottomWorldPoint.y;
|
||||
|
||||
// Calculate screen width in world units
|
||||
Vector3 leftWorldPoint = _mainCamera.ViewportToWorldPoint(new Vector3(0f, 0.5f, _mainCamera.nearClipPlane));
|
||||
Vector3 rightWorldPoint = _mainCamera.ViewportToWorldPoint(new Vector3(1f, 0.5f, _mainCamera.nearClipPlane));
|
||||
float screenWidth = rightWorldPoint.x - leftWorldPoint.x;
|
||||
|
||||
// Calculate spawn range based on 80% of screen width (40% on each side from center)
|
||||
_spawnRangeX = (screenWidth * 0.8f) / 2f;
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] Screen calculated - Width: {screenWidth:F2}, Bottom: {_screenBottom:F2}, Spawn Range X: ±{_spawnRangeX:F2}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Starts the obstacle spawning coroutine
|
||||
/// </summary>
|
||||
public void StartSpawning()
|
||||
{
|
||||
if (_spawnCoroutine == null)
|
||||
{
|
||||
_spawnCoroutine = StartCoroutine(SpawnObstaclesCoroutine());
|
||||
Debug.Log("[ObstacleSpawner] Started spawning obstacles");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops the obstacle spawning coroutine
|
||||
/// </summary>
|
||||
public void StopSpawning()
|
||||
{
|
||||
if (_spawnCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_spawnCoroutine);
|
||||
_spawnCoroutine = null;
|
||||
Debug.Log("[ObstacleSpawner] Stopped spawning obstacles");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Main spawning coroutine that runs continuously
|
||||
/// </summary>
|
||||
private IEnumerator SpawnObstaclesCoroutine()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
// Calculate next spawn time with variation
|
||||
float nextSpawnTime = spawnInterval + Random.Range(-spawnIntervalVariation, spawnIntervalVariation);
|
||||
nextSpawnTime = Mathf.Max(0.1f, nextSpawnTime); // Ensure minimum interval
|
||||
|
||||
yield return new WaitForSeconds(nextSpawnTime);
|
||||
|
||||
// Attempt to spawn an obstacle
|
||||
TrySpawnObstacle();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to spawn an obstacle at a valid position
|
||||
/// </summary>
|
||||
private void TrySpawnObstacle()
|
||||
{
|
||||
// Don't spawn new obstacles when surfacing
|
||||
if (_isSurfacing)
|
||||
{
|
||||
Debug.Log("[ObstacleSpawner] Skipping obstacle spawn - currently surfacing");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] TrySpawnObstacle called at {Time.time:F2}");
|
||||
|
||||
if (obstaclePrefabs == null || obstaclePrefabs.Count == 0)
|
||||
{
|
||||
Debug.LogWarning("[ObstacleSpawner] No obstacle prefabs available for spawning!");
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 spawnPosition;
|
||||
bool foundValidPosition = false;
|
||||
|
||||
// Try to find a valid spawn position
|
||||
for (int attempts = 0; attempts < maxSpawnAttempts; attempts++)
|
||||
{
|
||||
spawnPosition = GetRandomSpawnPosition();
|
||||
|
||||
if (IsValidSpawnPosition(spawnPosition))
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] Found valid position at {spawnPosition} after {attempts + 1} attempts");
|
||||
SpawnObstacleAt(spawnPosition);
|
||||
foundValidPosition = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] Position {spawnPosition} invalid (attempt {attempts + 1}/{maxSpawnAttempts})");
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundValidPosition)
|
||||
{
|
||||
Debug.LogWarning($"[ObstacleSpawner] SPAWN MISSED: Could not find valid spawn position after {maxSpawnAttempts} attempts at {Time.time:F2}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a random spawn position below the screen
|
||||
/// </summary>
|
||||
private Vector3 GetRandomSpawnPosition()
|
||||
{
|
||||
// Use dynamically calculated spawn range (80% of screen width)
|
||||
float randomX = Random.Range(-_spawnRangeX, _spawnRangeX);
|
||||
// Spawn 2 units below screen bottom
|
||||
float spawnY = _screenBottom - 2f;
|
||||
|
||||
return new Vector3(randomX, spawnY, 0f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a spawn position is valid (not colliding with tiles)
|
||||
/// </summary>
|
||||
private bool IsValidSpawnPosition(Vector3 position)
|
||||
{
|
||||
// Use OverlapCircle to check for collisions with tiles
|
||||
Collider2D collision = Physics2D.OverlapCircle(position, spawnCollisionRadius, tileLayerMask);
|
||||
return collision == null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Spawns an obstacle at the specified position
|
||||
/// </summary>
|
||||
private void SpawnObstacleAt(Vector3 position)
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] SpawnObstacleAt called for position {position}");
|
||||
|
||||
// Select random prefab
|
||||
int prefabIndex = Random.Range(0, obstaclePrefabs.Count);
|
||||
GameObject prefab = obstaclePrefabs[prefabIndex];
|
||||
|
||||
if (prefab == null)
|
||||
{
|
||||
Debug.LogError($"[ObstacleSpawner] SPAWN FAILED: Obstacle prefab at index {prefabIndex} is null!");
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject obstacle;
|
||||
|
||||
// Spawn using pool or instantiate directly
|
||||
if (useObjectPooling && _obstaclePool != null)
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] Requesting obstacle from pool (prefab index {prefabIndex})");
|
||||
obstacle = _obstaclePool.GetObstacle(prefabIndex);
|
||||
if (obstacle == null)
|
||||
{
|
||||
Debug.LogError($"[ObstacleSpawner] SPAWN FAILED: Failed to get obstacle from pool for prefab index {prefabIndex}!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Important: Set position/parent/rotation BEFORE activation to avoid visual glitches
|
||||
obstacle.transform.position = position;
|
||||
obstacle.transform.rotation = prefab.transform.rotation;
|
||||
obstacle.transform.SetParent(transform);
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] Got obstacle {obstacle.name} from pool, active state: {obstacle.activeInHierarchy}");
|
||||
|
||||
// ENHANCED FORCE ACTIVATION - more robust approach
|
||||
if (!obstacle.activeInHierarchy)
|
||||
{
|
||||
Debug.LogWarning($"[ObstacleSpawner] Pool returned inactive object {obstacle.name}, force activating!");
|
||||
|
||||
// Configure obstacle BEFORE activation
|
||||
ConfigureObstacle(obstacle, prefabIndex);
|
||||
|
||||
// Force activate the obstacle
|
||||
obstacle.SetActive(true);
|
||||
|
||||
// Double-check activation status
|
||||
if (!obstacle.activeInHierarchy)
|
||||
{
|
||||
Debug.LogError($"[ObstacleSpawner] CRITICAL ERROR: Failed to activate {obstacle.name} after multiple attempts!");
|
||||
|
||||
// Last resort: try to instantiate a new one instead
|
||||
GameObject newObstacle = Instantiate(prefab, position, prefab.transform.rotation, transform);
|
||||
if (newObstacle != null)
|
||||
{
|
||||
obstacle = newObstacle;
|
||||
ConfigureObstacle(obstacle, prefabIndex);
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] After force activation, {obstacle.name} active state: {obstacle.activeInHierarchy}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Still configure if already active
|
||||
ConfigureObstacle(obstacle, prefabIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] Instantiating new obstacle (pooling disabled)");
|
||||
obstacle = Instantiate(prefab, position, prefab.transform.rotation, transform);
|
||||
|
||||
// Configure the newly instantiated obstacle
|
||||
ConfigureObstacle(obstacle, prefabIndex);
|
||||
}
|
||||
|
||||
// Assign unique name with counter
|
||||
_obstacleCounter++;
|
||||
string oldName = obstacle.name;
|
||||
obstacle.name = $"Obstacle{_obstacleCounter:D3}";
|
||||
Debug.Log($"[ObstacleSpawner] Renamed obstacle from '{oldName}' to '{obstacle.name}', active state: {obstacle.activeInHierarchy}");
|
||||
|
||||
// Track active obstacles
|
||||
_activeObstacles.Add(obstacle);
|
||||
|
||||
// Invoke events
|
||||
onObstacleSpawned?.Invoke(obstacle);
|
||||
Debug.Log($"[ObstacleSpawner] After events, obstacle {obstacle.name} active state: {obstacle.activeInHierarchy}");
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] Successfully spawned obstacle {obstacle.name} at {position}. Active count: {_activeObstacles.Count}, Final active state: {obstacle.activeInHierarchy}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures an obstacle with randomized properties
|
||||
/// </summary>
|
||||
private void ConfigureObstacle(GameObject obstacle, int prefabIndex)
|
||||
{
|
||||
FloatingObstacle obstacleComponent = obstacle.GetComponent<FloatingObstacle>();
|
||||
if (obstacleComponent != null)
|
||||
{
|
||||
// Set prefab index
|
||||
obstacleComponent.PrefabIndex = prefabIndex;
|
||||
|
||||
// Randomize properties
|
||||
obstacleComponent.MoveSpeed = Random.Range(minMoveSpeed, maxMoveSpeed);
|
||||
|
||||
// Set spawner reference (since FloatingObstacle has this built-in now)
|
||||
obstacleComponent.SetSpawner(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an obstacle to the pool (called by FloatingObstacle)
|
||||
/// </summary>
|
||||
public void ReturnObstacleToPool(GameObject obstacle, int prefabIndex)
|
||||
{
|
||||
if (obstacle == null) return;
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] ReturnObstacleToPool called for {obstacle.name}, active state: {obstacle.activeInHierarchy}");
|
||||
|
||||
// Remove from active list
|
||||
_activeObstacles.Remove(obstacle);
|
||||
|
||||
// Invoke events
|
||||
onObstacleDestroyed?.Invoke(obstacle);
|
||||
|
||||
// Return to pool or destroy
|
||||
if (useObjectPooling && _obstaclePool != null)
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] Returning {obstacle.name} to pool");
|
||||
_obstaclePool.ReturnObstacle(obstacle, prefabIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"[ObstacleSpawner] Destroying {obstacle.name} (pooling disabled)");
|
||||
Destroy(obstacle);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to change spawn interval at runtime
|
||||
/// </summary>
|
||||
public void SetSpawnInterval(float interval)
|
||||
{
|
||||
spawnInterval = interval;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to change spawn range at runtime
|
||||
/// </summary>
|
||||
public void SetSpawnRange(float range)
|
||||
{
|
||||
spawnRangeX = range;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to set speed range at runtime
|
||||
/// </summary>
|
||||
public void SetSpeedRange(float min, float max)
|
||||
{
|
||||
minMoveSpeed = min;
|
||||
maxMoveSpeed = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public method to recalculate screen bounds (useful if camera changes)
|
||||
/// </summary>
|
||||
public void RecalculateScreenBounds()
|
||||
{
|
||||
CalculateScreenBounds();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the velocity factor changes from the DivingGameManager
|
||||
/// </summary>
|
||||
public void OnVelocityFactorChanged(float velocityFactor)
|
||||
{
|
||||
_velocityFactor = velocityFactor;
|
||||
|
||||
// Update all active obstacles with the new velocity factor
|
||||
foreach (GameObject obstacle in _activeObstacles)
|
||||
{
|
||||
if (obstacle != null)
|
||||
{
|
||||
FloatingObstacle obstacleComponent = obstacle.GetComponent<FloatingObstacle>();
|
||||
if (obstacleComponent != null)
|
||||
{
|
||||
obstacleComponent.OnVelocityFactorChanged(velocityFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] Velocity factor updated to {_velocityFactor:F2}, propagated to {_activeObstacles.Count} active obstacles");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start surfacing mode - reverse direction of existing obstacles and stop spawning new ones
|
||||
/// </summary>
|
||||
public void StartSurfacing()
|
||||
{
|
||||
if (_isSurfacing) return; // Already surfacing
|
||||
|
||||
_isSurfacing = true;
|
||||
|
||||
// Notify obstacles about surfacing state (for direction-based logic)
|
||||
foreach (GameObject obstacle in _activeObstacles)
|
||||
{
|
||||
if (obstacle != null)
|
||||
{
|
||||
FloatingObstacle obstacleComponent = obstacle.GetComponent<FloatingObstacle>();
|
||||
if (obstacleComponent != null)
|
||||
{
|
||||
// Call StartSurfacing on the obstacle component itself
|
||||
obstacleComponent.StartSurfacing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"[ObstacleSpawner] Started surfacing mode for {_activeObstacles.Count} active obstacles");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the count of currently active obstacles
|
||||
/// </summary>
|
||||
public int ActiveObstacleCount => _activeObstacles.Count;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
// Only draw if screen bounds have been calculated
|
||||
if (_spawnRangeX > 0f)
|
||||
{
|
||||
// Draw spawn area using dynamic calculations
|
||||
Gizmos.color = Color.yellow;
|
||||
Vector3 center = new Vector3(0f, _screenBottom - 2f, 0f);
|
||||
Vector3 size = new Vector3(_spawnRangeX * 2f, 1f, 1f);
|
||||
Gizmos.DrawWireCube(center, size);
|
||||
|
||||
// Draw collision radius at spawn point
|
||||
Gizmos.color = Color.red;
|
||||
Gizmos.DrawWireSphere(center, spawnCollisionRadius);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49ec62157fd945fab730193e9ea0bff7
|
||||
timeCreated: 1758116903
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user