mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2025-06-27 11:58:51 +02:00
Compare commits
11 Commits
97b473cb01
...
v1.0.0-sta
Author | SHA1 | Date | |
---|---|---|---|
f8791dfd1b
|
|||
86f64a7705
|
|||
728c57c66c | |||
0b32ce7036 | |||
2c7a420f90 | |||
bdd238f524 | |||
f818a9a8a7 | |||
3fe6a2998c | |||
bde6ea3a43 | |||
0263f6b3b0 | |||
7f2db297fa |
80
Assets/Resources/AICollider.prefab
Normal file
80
Assets/Resources/AICollider.prefab
Normal file
@ -0,0 +1,80 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3654053280041398781
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4104371471751400115}
|
||||
- component: {fileID: 1415423667558431683}
|
||||
m_Layer: 0
|
||||
m_Name: AICollider
|
||||
m_TagString: AICollider
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4104371471751400115
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3654053280041398781}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 86.53131, y: 53.261993, z: -5.1268225}
|
||||
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!61 &1415423667558431683
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3654053280041398781}
|
||||
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: 1
|
||||
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
|
7
Assets/Resources/AICollider.prefab.meta
Normal file
7
Assets/Resources/AICollider.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a862ece8e0cd6047ea9e799642c7b31c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -109,6 +109,7 @@ TextureImporter:
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
>>>>>>> develop
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
@ -147,8 +148,7 @@ TextureImporter:
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable:
|
||||
RegularBlock01_0: 229215520534054086
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
|
BIN
Assets/Resources/InGame/Save.png
Normal file
BIN
Assets/Resources/InGame/Save.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
155
Assets/Resources/InGame/Save.png.meta
Normal file
155
Assets/Resources/InGame/Save.png.meta
Normal file
@ -0,0 +1,155 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58314e7be35f3201e8f3d376508d5800
|
||||
TextureImporter:
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
213: -522367714226421056
|
||||
second: Save_0
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Save_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 24
|
||||
y: 23
|
||||
width: 464
|
||||
height: 464
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: -1
|
||||
bones: []
|
||||
spriteID: 0c2c66fd45d20c8f0800000000000000
|
||||
internalID: -522367714226421056
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Resources/Sounds.meta
Normal file
8
Assets/Resources/Sounds.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f762bc8c54d24bc38a9c08ae37e1861
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Sounds/click.mp3
Normal file
BIN
Assets/Resources/Sounds/click.mp3
Normal file
Binary file not shown.
23
Assets/Resources/Sounds/click.mp3.meta
Normal file
23
Assets/Resources/Sounds/click.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f783190ab25e24deb41c3810d8bd910
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Sounds/death.mp3
Normal file
BIN
Assets/Resources/Sounds/death.mp3
Normal file
Binary file not shown.
23
Assets/Resources/Sounds/death.mp3.meta
Normal file
23
Assets/Resources/Sounds/death.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a534a6e5c2588e8468f392da95b4d051
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/Resources/Sounds/win.mp3
Normal file
BIN
Assets/Resources/Sounds/win.mp3
Normal file
Binary file not shown.
23
Assets/Resources/Sounds/win.mp3.meta
Normal file
23
Assets/Resources/Sounds/win.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01bc19d23f018f986bec98d64fb0c51b
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -202,9 +202,9 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
- m_Target: {fileID: 1858033414}
|
||||
m_TargetAssemblyTypeName: MainMenu, Assembly-CSharp
|
||||
m_MethodName: OpenImport
|
||||
m_MethodName: EditLevel
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
@ -408,6 +408,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ef2acea012085a3bb9a981fc334afaec, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 1895261020}
|
||||
--- !u!114 &681324524
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -859,7 +860,7 @@ MonoBehaviour:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1858033414}
|
||||
m_TargetAssemblyTypeName: MainMenu, Assembly-CSharp
|
||||
m_MethodName: LevelEditor
|
||||
m_MethodName: CreateVoidLevel
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
@ -1087,6 +1088,136 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a1cd6b406f139414086355a222af717e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 1895261020}
|
||||
--- !u!1 &1895261019
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1895261021}
|
||||
- component: {fileID: 1895261020}
|
||||
m_Layer: 0
|
||||
m_Name: Sound
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &1895261020
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1895261019}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!4 &1895261021
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1895261019}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 513.29504, y: 455.8944, z: -2.436951}
|
||||
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 &1985937862
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1173,3 +1304,4 @@ SceneRoots:
|
||||
- {fileID: 1858033413}
|
||||
- {fileID: 585327055}
|
||||
- {fileID: 1985937865}
|
||||
- {fileID: 1895261021}
|
||||
|
@ -463,6 +463,135 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 303285652}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &376463333
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 376463335}
|
||||
- component: {fileID: 376463334}
|
||||
m_Layer: 0
|
||||
m_Name: Sound
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &376463334
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 376463333}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!4 &376463335
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 376463333}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 591.1148, y: 374.54196, z: 17.932013}
|
||||
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 &481473973
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1413,6 +1542,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: a1cd6b406f139414086355a222af717e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 376463334}
|
||||
--- !u!1 &1899869498
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1557,3 +1687,4 @@ SceneRoots:
|
||||
- {fileID: 481473977}
|
||||
- {fileID: 948896768}
|
||||
- {fileID: 1832520163}
|
||||
- {fileID: 376463335}
|
||||
|
@ -849,6 +849,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ef2acea012085a3bb9a981fc334afaec, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 1646124753}
|
||||
--- !u!114 &955286180
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1048,6 +1049,135 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1646124752
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1646124754}
|
||||
- component: {fileID: 1646124753}
|
||||
m_Layer: 0
|
||||
m_Name: Sound
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &1646124753
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1646124752}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!4 &1646124754
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1646124752}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 513.29504, y: 455.8944, z: -2.436951}
|
||||
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!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1055,3 +1185,4 @@ SceneRoots:
|
||||
- {fileID: 837005990}
|
||||
- {fileID: 1442014941}
|
||||
- {fileID: 162069549}
|
||||
- {fileID: 1646124754}
|
||||
|
@ -4964,7 +4964,6 @@ GameObject:
|
||||
- component: {fileID: 78453694}
|
||||
- component: {fileID: 78453693}
|
||||
- component: {fileID: 78453692}
|
||||
- component: {fileID: 78453696}
|
||||
- component: {fileID: 78453697}
|
||||
m_Layer: 0
|
||||
m_Name: LevelEditorPlayer
|
||||
@ -5117,18 +5116,6 @@ Transform:
|
||||
- {fileID: 39537682}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &78453696
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 78453690}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 680dadbbc97b91b47a86bde6254fde4d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &78453697
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5141,6 +5128,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ebe0bd74200510d4aa75c327a76499c6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
pauseMenu: {fileID: 0}
|
||||
sfxSource: {fileID: 762457564}
|
||||
SpeedMultiplier: 1
|
||||
--- !u!1 &333456214
|
||||
GameObject:
|
||||
@ -5326,6 +5315,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ef2acea012085a3bb9a981fc334afaec, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 762457564}
|
||||
--- !u!114 &590020934
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5431,6 +5421,9 @@ GameObject:
|
||||
- component: {fileID: 678214373}
|
||||
- component: {fileID: 678214375}
|
||||
- component: {fileID: 678214374}
|
||||
- component: {fileID: 678214378}
|
||||
- component: {fileID: 678214377}
|
||||
- component: {fileID: 678214376}
|
||||
m_Layer: 5
|
||||
m_Name: Save
|
||||
m_TagString: Untagged
|
||||
@ -5477,7 +5470,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 2079131731516339571, guid: b83b54968fd22ff438fe127c168bebac, type: 3}
|
||||
m_Sprite: {fileID: -522367714226421056, guid: 58314e7be35f3201e8f3d376508d5800, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@ -5495,6 +5488,89 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 678214372}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &678214376
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 678214372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 678214374}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 678214377}
|
||||
m_TargetAssemblyTypeName: JSONExporter, Assembly-CSharp
|
||||
m_MethodName: ExportJSON
|
||||
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
|
||||
--- !u!114 &678214377
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 678214372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d3227fe18f4441647bdd19d3131efa02, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
statusText: {fileID: 0}
|
||||
--- !u!114 &678214378
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 678214372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f5bf592d3d8430744a08058675701934, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
blockGroupContainer: {fileID: 0}
|
||||
buttonPrefabTemplate: {fileID: 0}
|
||||
--- !u!1 &739948034
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5837,7 +5913,6 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: f5bf592d3d8430744a08058675701934, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mapParent: {fileID: 0}
|
||||
blockGroupContainer: {fileID: 394350961}
|
||||
buttonPrefabTemplate: {fileID: 1993500743}
|
||||
--- !u!114 &746393166
|
||||
@ -5857,6 +5932,135 @@ MonoBehaviour:
|
||||
shipMinYFollow: 6
|
||||
smoothSpeed: 5
|
||||
isPlaying: 0
|
||||
--- !u!1 &762457563
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 762457565}
|
||||
- component: {fileID: 762457564}
|
||||
m_Layer: 0
|
||||
m_Name: Sound
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &762457564
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 762457563}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!4 &762457565
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 762457563}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 513.29504, y: 455.8944, z: -2.436951}
|
||||
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 &782585331
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6019,6 +6223,153 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &1479180207
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1479180210}
|
||||
- component: {fileID: 1479180209}
|
||||
- component: {fileID: 1479180208}
|
||||
m_Layer: 0
|
||||
m_Name: LevelLoader
|
||||
m_TagString: LevelLoader
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &1479180208
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1479180207}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!114 &1479180209
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1479180207}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 017ea60a517f31bf3af976010911be25, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
levelsLoader: {fileID: 0}
|
||||
editMode: 1
|
||||
createMode: 0
|
||||
musicSource: {fileID: 0}
|
||||
progressionText: {fileID: 0}
|
||||
--- !u!4 &1479180210
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1479180207}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 8.485552, y: 2.2081068, z: -0.13737443}
|
||||
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 &1561821047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6074,6 +6425,7 @@ MonoBehaviour:
|
||||
spawnPoint: {fileID: 0}
|
||||
editorUI: {fileID: 0}
|
||||
playerCamera: {fileID: 746393166}
|
||||
sfxSource: {fileID: 0}
|
||||
--- !u!114 &1561821050
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6873,3 +7225,5 @@ SceneRoots:
|
||||
- {fileID: 1724106027}
|
||||
- {fileID: 2030873961}
|
||||
- {fileID: 78453695}
|
||||
- {fileID: 1479180210}
|
||||
- {fileID: 762457565}
|
||||
|
@ -222,63 +222,81 @@ MonoBehaviour:
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1001 &109370708
|
||||
PrefabInstance:
|
||||
--- !u!1 &99686832
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1771296619209216840, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BonusSlowSpeed
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -5.4423084
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -2.783749
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6543394447596783970, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: e9dda45aef9258745a40efb48437d584, type: 3}
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 99686833}
|
||||
- component: {fileID: 99686835}
|
||||
- component: {fileID: 99686834}
|
||||
m_Layer: 5
|
||||
m_Name: Checkmark
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &99686833
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 99686832}
|
||||
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: 295909703}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 36.9547, y: 33.6365}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &99686834
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 99686832}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &99686835
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 99686832}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &245275147
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -358,6 +376,82 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 245275147}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &295909702
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 295909703}
|
||||
- component: {fileID: 295909705}
|
||||
- component: {fileID: 295909704}
|
||||
m_Layer: 5
|
||||
m_Name: Background
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &295909703
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 295909702}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 99686833}
|
||||
m_Father: {fileID: 2145558729}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 49.9975, y: 40.9}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &295909704
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 295909702}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &295909705
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 295909702}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &487176671
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -434,6 +528,67 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 487176671}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &496264820
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3025146551836412649, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: BonusBoostSpeed
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3025146551836412649, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -2.88
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.99681437
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0.079757296
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7134261581051338486, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -9.149
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5d01d2d55c6c25541b0db90186e76c2b, type: 3}
|
||||
--- !u!1 &519420028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5828,6 +5983,8 @@ RectTransform:
|
||||
- {fileID: 1269654000}
|
||||
- {fileID: 1464555240}
|
||||
- {fileID: 6776933}
|
||||
- {fileID: 2145558729}
|
||||
- {fileID: 2049642316}
|
||||
m_Father: {fileID: 1371294550}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
@ -6275,6 +6432,135 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1247869545
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1247869547}
|
||||
- component: {fileID: 1247869546}
|
||||
m_Layer: 0
|
||||
m_Name: Sound
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!82 &1247869546
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1247869545}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!4 &1247869547
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1247869545}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 8.485552, y: 2.2081068, z: -0.13737443}
|
||||
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 &1267397455
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6405,6 +6691,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ebe0bd74200510d4aa75c327a76499c6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
pauseMenu: {fileID: 892725783}
|
||||
sfxSource: {fileID: 1247869546}
|
||||
SpeedMultiplier: 1
|
||||
--- !u!61 &1267397460
|
||||
BoxCollider2D:
|
||||
@ -7316,7 +7604,9 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
levelsLoader: {fileID: 0}
|
||||
audioSource: {fileID: 1999482188}
|
||||
editMode: 0
|
||||
createMode: 0
|
||||
musicSource: {fileID: 1999482188}
|
||||
progressionText: {fileID: 245275149}
|
||||
--- !u!4 &1999482187
|
||||
Transform:
|
||||
@ -7465,6 +7755,197 @@ RectTransform:
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &2049642315
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2049642316}
|
||||
- component: {fileID: 2049642318}
|
||||
- component: {fileID: 2049642317}
|
||||
m_Layer: 0
|
||||
m_Name: AI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2049642316
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2049642315}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -2.9565992}
|
||||
m_LocalScale: {x: 0.4166666, y: 0.4166666, z: 0.4166666}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 892725782}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -377, y: -274}
|
||||
m_SizeDelta: {x: 87.0508, y: 79.9371}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2049642317
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2049642315}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
|
||||
m_FontSize: 56
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 0
|
||||
m_MaxSize: 56
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: AI
|
||||
--- !u!222 &2049642318
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2049642315}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &2145558728
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2145558729}
|
||||
- component: {fileID: 2145558730}
|
||||
- component: {fileID: 2145558731}
|
||||
m_Layer: 5
|
||||
m_Name: CheckboxAI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2145558729
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2145558728}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 295909703}
|
||||
m_Father: {fileID: 892725782}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -424.55, y: -273.6}
|
||||
m_SizeDelta: {x: 60.1819, y: 50.9705}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2145558730
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2145558728}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 295909704}
|
||||
toggleTransition: 1
|
||||
graphic: {fileID: 99686834}
|
||||
m_Group: {fileID: 0}
|
||||
onValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2145558731}
|
||||
m_TargetAssemblyTypeName: AI, Assembly-CSharp
|
||||
m_MethodName: OnAiChange
|
||||
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
|
||||
m_IsOn: 0
|
||||
--- !u!114 &2145558731
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2145558728}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b63079a9773c036389c5b87c12e728c3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
AIToggle: {fileID: 0}
|
||||
player: {fileID: 1267397459}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -7475,4 +7956,5 @@ SceneRoots:
|
||||
- {fileID: 1371294550}
|
||||
- {fileID: 521952202}
|
||||
- {fileID: 555497623}
|
||||
- {fileID: 109370708}
|
||||
- {fileID: 496264820}
|
||||
- {fileID: 1247869547}
|
||||
|
@ -438,6 +438,139 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &334972165
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 334972166}
|
||||
- component: {fileID: 334972167}
|
||||
m_Layer: 5
|
||||
m_Name: Sound
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &334972166
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 334972165}
|
||||
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: 1153106989}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!82 &334972167
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 334972165}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &633505916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -846,6 +979,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 2c53cba3260b30d02b79e69a3198546c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 334972167}
|
||||
levelsLoader: {fileID: 0}
|
||||
--- !u!1 &1099679056
|
||||
GameObject:
|
||||
@ -992,6 +1126,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ef2acea012085a3bb9a981fc334afaec, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 334972167}
|
||||
--- !u!1 &1153106988
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1031,6 +1166,7 @@ RectTransform:
|
||||
- {fileID: 760653959}
|
||||
- {fileID: 92159575}
|
||||
- {fileID: 1571276505}
|
||||
- {fileID: 334972166}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
@ -1246,6 +1382,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c34ef065650ba0802be580828cc0d474, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
sfxSource: {fileID: 334972167}
|
||||
levelsLoader: {fileID: 0}
|
||||
--- !u!1 &1571276504
|
||||
GameObject:
|
||||
|
1304
Assets/Scenes/SelectLevelToEditScene.unity
Normal file
1304
Assets/Scenes/SelectLevelToEditScene.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/SelectLevelToEditScene.unity.meta
Normal file
7
Assets/Scenes/SelectLevelToEditScene.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fabb6c6015f46541a57baf21011fa51
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
19
Assets/Scripts/AIToggle.cs
Normal file
19
Assets/Scripts/AIToggle.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class AI : MonoBehaviour
|
||||
{
|
||||
public Toggle AIToggle;
|
||||
public Player player;
|
||||
|
||||
public void OnAiChange()
|
||||
{
|
||||
player.IsAI = AIToggle.isOn;
|
||||
}
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
AIToggle = GetComponent<Toggle>();
|
||||
AIToggle.isOn = player.IsAI;
|
||||
}
|
||||
}
|
2
Assets/Scripts/AIToggle.cs.meta
Normal file
2
Assets/Scripts/AIToggle.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b63079a9773c036389c5b87c12e728c3
|
@ -5,4 +5,6 @@ public interface IGameMode
|
||||
void Update(Player player);
|
||||
void OnCollisionEnter(Player player, Collision2D collision);
|
||||
void OnCollisionExit(Player player, Collision2D collision);
|
||||
|
||||
void Jump(Player player);
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
|
||||
public class NormalGameMode : IGameMode
|
||||
{
|
||||
@ -15,7 +13,6 @@ public class NormalGameMode : IGameMode
|
||||
{
|
||||
player.RigidBody.linearVelocity = new Vector2(HorizontalSpeed * player.SpeedMultiplier, player.RigidBody.linearVelocity.y);
|
||||
|
||||
|
||||
if (player.IsColliding && Input.GetKey(JumpKey) && !isRotating)
|
||||
{
|
||||
Jump(player);
|
||||
@ -38,7 +35,7 @@ public class NormalGameMode : IGameMode
|
||||
UpdateParticlePositionAndRotation(player);
|
||||
}
|
||||
|
||||
private void Jump(Player player)
|
||||
public void Jump(Player player)
|
||||
{
|
||||
player.RigidBody.linearVelocity = new Vector2(player.RigidBody.linearVelocity.x, 0);
|
||||
player.RigidBody.AddForce(Vector2.up * JumpForce, ForceMode2D.Impulse);
|
||||
@ -86,16 +83,6 @@ public class NormalGameMode : IGameMode
|
||||
public void OnCollisionEnter(Player player, Collision2D collision)
|
||||
{
|
||||
player.IsColliding = true;
|
||||
|
||||
if (collision.gameObject.CompareTag("Kill"))
|
||||
{
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
|
||||
}
|
||||
|
||||
if (collision.gameObject.CompareTag("Win"))
|
||||
{
|
||||
SceneManager.LoadScene("SelectLevelScene");
|
||||
}
|
||||
}
|
||||
|
||||
public void OnCollisionExit(Player player, Collision2D collision)
|
||||
|
@ -1,3 +1,4 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
@ -55,7 +56,7 @@ public class ShipGameMode : IGameMode
|
||||
return angle;
|
||||
}
|
||||
|
||||
private void Jump(Player player)
|
||||
public void Jump(Player player)
|
||||
{
|
||||
player.RigidBody.linearVelocity = new Vector2(player.RigidBody.linearVelocity.x, 0);
|
||||
player.RigidBody.AddForce(Vector2.up * JumpForce, ForceMode2D.Impulse);
|
||||
@ -67,17 +68,6 @@ public class ShipGameMode : IGameMode
|
||||
|
||||
public void OnCollisionEnter(Player player, Collision2D collision)
|
||||
{
|
||||
if (collision.gameObject.CompareTag("Kill"))
|
||||
{
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
|
||||
return;
|
||||
}
|
||||
if (collision.gameObject.CompareTag("Win"))
|
||||
{
|
||||
SceneManager.LoadScene("HomeScene");
|
||||
return;
|
||||
}
|
||||
|
||||
float currentAngle = GetCurrentZAngle(player);
|
||||
float shortestAngle = Mathf.DeltaAngle(currentAngle, 0);
|
||||
player.Transform.rotation = Quaternion.RotateTowards(player.Transform.rotation, Quaternion.Euler(0, 0, 0), Mathf.Abs(shortestAngle));
|
||||
|
@ -5,12 +5,17 @@ using System.Collections.Generic;
|
||||
using SimpleFileBrowser;
|
||||
using TMPro;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
|
||||
[RequireComponent(typeof(LevelEditor))]
|
||||
public class JSONExporter : MonoBehaviour
|
||||
{
|
||||
public TMP_Text statusText;
|
||||
private LevelEditor editor;
|
||||
private string levelsFolder;
|
||||
private string assetFolderPath;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@ -19,6 +24,8 @@ public class JSONExporter : MonoBehaviour
|
||||
if (!Directory.Exists(levelsFolder))
|
||||
Directory.CreateDirectory(levelsFolder);
|
||||
|
||||
assetFolderPath = "Assets/Resources/Levels";
|
||||
|
||||
if (statusText == null)
|
||||
{
|
||||
var statusObj = GameObject.Find("StatusText");
|
||||
@ -104,36 +111,33 @@ public class JSONExporter : MonoBehaviour
|
||||
{
|
||||
Debug.LogError("Export error: " + e);
|
||||
SetStatus("Export error. See console.", Color.red);
|
||||
yield break;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.AssetDatabase.Refresh();
|
||||
string assetPath = Path.Combine(assetFolderPath, fileName + ".json");
|
||||
AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate);
|
||||
#endif
|
||||
var loader = Object.FindAnyObjectByType<LevelsLoader>();
|
||||
if (loader != null)
|
||||
loader.RefreshLevels();
|
||||
|
||||
var loader = FindObjectOfType<LevelsLoader>();
|
||||
loader?.RefreshLevels();
|
||||
}
|
||||
|
||||
private void SetStatus(string message, Color color)
|
||||
{
|
||||
if (statusText != null)
|
||||
{
|
||||
statusText.text = message;
|
||||
statusText.color = color;
|
||||
statusText.gameObject.SetActive(false);
|
||||
statusText.gameObject.SetActive(true);
|
||||
Canvas.ForceUpdateCanvases();
|
||||
}
|
||||
if (statusText == null) return;
|
||||
statusText.text = message;
|
||||
statusText.color = color;
|
||||
statusText.gameObject.SetActive(false);
|
||||
statusText.gameObject.SetActive(true);
|
||||
Canvas.ForceUpdateCanvases();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
private class SerializableElement
|
||||
{
|
||||
public string type;
|
||||
public float x;
|
||||
public float y;
|
||||
public float scaleX;
|
||||
public float scaleY;
|
||||
public float x, y, scaleX, scaleY;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
|
153
Assets/Scripts/JSONLevelEditor.cs
Normal file
153
Assets/Scripts/JSONLevelEditor.cs
Normal file
@ -0,0 +1,153 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using SimpleFileBrowser;
|
||||
using TMPro;
|
||||
|
||||
[System.Serializable]
|
||||
public class BlockData
|
||||
{
|
||||
public string prefabName;
|
||||
public Vector3 position;
|
||||
public float rotationZ;
|
||||
public Vector3 scale;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class LevelData
|
||||
{
|
||||
public string levelName;
|
||||
public List<BlockData> blocks = new List<BlockData>();
|
||||
}
|
||||
|
||||
public class JSONLevelEditor : MonoBehaviour
|
||||
{
|
||||
[Header("UI")]
|
||||
public TMP_Dropdown levelDropdown;
|
||||
public Button loadButton;
|
||||
public Button saveButton;
|
||||
public TMP_Text statusText;
|
||||
|
||||
[Header("Editor")]
|
||||
public Transform editRoot; // où on instancie les blocs
|
||||
public List<GameObject> blockPrefabs; // à remplir dans l’inspecteur (mêmes noms que dans JSON)
|
||||
|
||||
private LevelData currentLevel;
|
||||
private string currentJsonPath;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// Remplir la dropdown avec les JSON disponibles dans Resources/Levels
|
||||
var assets = Resources.LoadAll<TextAsset>("Levels");
|
||||
levelDropdown.options.Clear();
|
||||
foreach (var txt in assets)
|
||||
levelDropdown.options.Add(new TMP_Dropdown.OptionData(txt.name));
|
||||
levelDropdown.RefreshShownValue();
|
||||
|
||||
loadButton.onClick.AddListener(OnLoadClicked);
|
||||
saveButton.onClick.AddListener(OnSaveClicked);
|
||||
UpdateStatus("Prêt.", Color.white);
|
||||
}
|
||||
|
||||
private void OnLoadClicked()
|
||||
{
|
||||
string lvlName = levelDropdown.options[levelDropdown.value].text;
|
||||
TextAsset json = Resources.Load<TextAsset>($"Levels/{lvlName}");
|
||||
if (json == null)
|
||||
{
|
||||
UpdateStatus($"Niveau '{lvlName}' introuvable.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
currentJsonPath = Path.Combine(Application.dataPath, "Resources/Levels", lvlName + ".json");
|
||||
currentLevel = JsonUtility.FromJson<LevelData>(json.text);
|
||||
if (currentLevel == null)
|
||||
{
|
||||
UpdateStatus("Impossible de parser le JSON.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
ClearEditRoot();
|
||||
foreach (var bd in currentLevel.blocks)
|
||||
{
|
||||
var prefab = blockPrefabs.Find(p => p.name == bd.prefabName);
|
||||
if (prefab == null) continue;
|
||||
var go = Instantiate(prefab, editRoot);
|
||||
go.transform.localPosition = bd.position;
|
||||
go.transform.localEulerAngles = new Vector3(0, 0, bd.rotationZ);
|
||||
go.transform.localScale = bd.scale;
|
||||
// vous pouvez ajouter un script pour manipuler ce 'go' dans l’éditeur
|
||||
}
|
||||
|
||||
UpdateStatus($"Niveau '{lvlName}' chargé.", Color.green);
|
||||
}
|
||||
|
||||
private void OnSaveClicked()
|
||||
{
|
||||
if (currentLevel == null)
|
||||
{
|
||||
UpdateStatus("Aucun niveau chargé.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
// Reconstruire le LevelData depuis les enfants de editRoot
|
||||
currentLevel.blocks.Clear();
|
||||
foreach (Transform child in editRoot)
|
||||
{
|
||||
var bd = new BlockData
|
||||
{
|
||||
prefabName = child.name.Replace("(Clone)", ""),
|
||||
position = child.localPosition,
|
||||
rotationZ = child.localEulerAngles.z,
|
||||
scale = child.localScale
|
||||
};
|
||||
currentLevel.blocks.Add(bd);
|
||||
}
|
||||
|
||||
// Demande path de sauvegarde
|
||||
StartCoroutine(DoSaveDialog());
|
||||
}
|
||||
|
||||
private IEnumerator DoSaveDialog()
|
||||
{
|
||||
yield return FileBrowser.WaitForSaveDialog(
|
||||
FileBrowser.PickMode.Files, false, null, "json",
|
||||
"Save JSON", "Save");
|
||||
|
||||
if (!FileBrowser.Success)
|
||||
{
|
||||
UpdateStatus("Sauvegarde annulée.", Color.red);
|
||||
yield break;
|
||||
}
|
||||
|
||||
string dest = FileBrowser.Result[0];
|
||||
if (!dest.EndsWith(".json")) dest += ".json";
|
||||
|
||||
string jsonText = JsonUtility.ToJson(currentLevel, true);
|
||||
try
|
||||
{
|
||||
File.WriteAllText(dest, jsonText);
|
||||
UpdateStatus($"Sauvegardé : {dest}", Color.green);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError(e);
|
||||
UpdateStatus("Erreur lors de la sauvegarde.", Color.red);
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearEditRoot()
|
||||
{
|
||||
for (int i = editRoot.childCount - 1; i >= 0; i--)
|
||||
DestroyImmediate(editRoot.GetChild(i).gameObject);
|
||||
}
|
||||
|
||||
private void UpdateStatus(string msg, Color col)
|
||||
{
|
||||
if (statusText == null) return;
|
||||
statusText.text = msg;
|
||||
statusText.color = col;
|
||||
}
|
||||
}
|
2
Assets/Scripts/JSONLevelEditor.cs.meta
Normal file
2
Assets/Scripts/JSONLevelEditor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a995a69086a0184d830aa300b3c2843
|
@ -1,5 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class LevelEditor : MonoBehaviour
|
||||
@ -7,7 +8,7 @@ public class LevelEditor : MonoBehaviour
|
||||
[Header("Placement")]
|
||||
private GameObject currentBlock;
|
||||
private bool isPlacingBlock = false;
|
||||
private Vector3 currentScale = new Vector3(1f, 1f, 1);
|
||||
private Vector3 currentScale = Vector3.one;
|
||||
private float scaleStep = 0.1f;
|
||||
|
||||
[Header("UI")]
|
||||
@ -27,427 +28,566 @@ public class LevelEditor : MonoBehaviour
|
||||
|
||||
private enum ResizeAxis { None, Horizontal, Vertical }
|
||||
private ResizeAxis currentResizeAxis = ResizeAxis.None;
|
||||
private Transform persistentBlockContainer;
|
||||
|
||||
void Start()
|
||||
{
|
||||
persistentBlockContainer = new GameObject("PlacedBlocks").transform;
|
||||
DontDestroyOnLoad(persistentBlockContainer.gameObject);
|
||||
LoadPrefabs();
|
||||
GenerateButtons();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (IsPointerOverUI()) return;
|
||||
|
||||
if (isPlacingBlock && currentBlock != null)
|
||||
HandleBlockPlacement();
|
||||
else
|
||||
HandleBlockSelection();
|
||||
|
||||
HandleBlockResizing();
|
||||
HandleBlockDeletion();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
ClearEditor();
|
||||
}
|
||||
#region UI
|
||||
|
||||
void LoadPrefabs()
|
||||
{
|
||||
blockPrefabs.AddRange(Resources.LoadAll<GameObject>("Prefabs"));
|
||||
var all = Resources.LoadAll<GameObject>("Prefabs");
|
||||
blockPrefabs.Clear();
|
||||
foreach (var prefab in all)
|
||||
{
|
||||
var name = prefab.name.ToLower();
|
||||
if (name == "ground" || name == "winnerwall") continue;
|
||||
blockPrefabs.Add(prefab);
|
||||
}
|
||||
}
|
||||
|
||||
void GenerateButtons()
|
||||
{
|
||||
if (buttonPrefabTemplate == null)
|
||||
{
|
||||
Debug.LogError("LevelEditor.GenerateButtons(): buttonPrefabTemplate n’est pas assigné !");
|
||||
return;
|
||||
}
|
||||
if (blockGroupContainer == null)
|
||||
{
|
||||
Debug.LogError("LevelEditor.GenerateButtons(): blockGroupContainer n’est pas assigné !");
|
||||
return;
|
||||
}
|
||||
ClearCurrentButtons();
|
||||
|
||||
Transform container = blockGroupContainer;
|
||||
|
||||
if (container == null || buttonPrefabTemplate == null)
|
||||
if (blockGroupContainer == null || buttonPrefabTemplate == null)
|
||||
{
|
||||
Debug.LogError("UI Container ou prefab de bouton manquant.");
|
||||
Debug.LogError("UI Container ou prefab manquant.");
|
||||
return;
|
||||
}
|
||||
|
||||
int start = currentPage * buttonsPerPage;
|
||||
int end = Mathf.Min(start + buttonsPerPage, blockPrefabs.Count);
|
||||
|
||||
for (int i = start; i < end; i++)
|
||||
{
|
||||
GameObject button = Instantiate(buttonPrefabTemplate, container);
|
||||
button.SetActive(true);
|
||||
|
||||
Transform canvas = button.transform.Find("Canvas");
|
||||
Transform bg = canvas?.Find("BlankSquare");
|
||||
Transform icon = canvas?.Find("PrefabIcon");
|
||||
|
||||
if (bg == null || icon == null)
|
||||
{
|
||||
Destroy(button);
|
||||
continue;
|
||||
}
|
||||
|
||||
float xOffset = -375f + (i - start) * 125f;
|
||||
bg.GetComponent<RectTransform>().anchoredPosition = new Vector2(xOffset, bg.GetComponent<RectTransform>().anchoredPosition.y);
|
||||
icon.GetComponent<RectTransform>().anchoredPosition = new Vector2(xOffset, icon.GetComponent<RectTransform>().anchoredPosition.y);
|
||||
|
||||
Image bgImage = bg.GetComponent<Image>();
|
||||
Image iconImage = icon.GetComponent<Image>();
|
||||
|
||||
bgImage.sprite = Resources.Load<Sprite>("InGame/ButtonSkin/BlankSquare");
|
||||
iconImage.sprite = blockPrefabs[i].GetComponent<SpriteRenderer>()?.sprite;
|
||||
|
||||
string prefabName = blockPrefabs[i].name.ToLower();
|
||||
if (prefabName.Contains("smallspike") || prefabName.Contains("smallobstacle"))
|
||||
icon.GetComponent<RectTransform>().sizeDelta = new Vector2(50, 25);
|
||||
else
|
||||
icon.GetComponent<RectTransform>().sizeDelta = new Vector2(50, 50);
|
||||
|
||||
GameObject prefab = blockPrefabs[i];
|
||||
button.GetComponent<Button>().onClick.AddListener(() => SelectPrefab(prefab));
|
||||
currentButtons.Add(button);
|
||||
var btn = Instantiate(buttonPrefabTemplate, blockGroupContainer);
|
||||
btn.SetActive(true);
|
||||
SetupButtonVisual(btn.transform, blockPrefabs[i], i - start);
|
||||
var prefab = blockPrefabs[i];
|
||||
btn.GetComponent<Button>().onClick.AddListener(() => SelectPrefab(prefab));
|
||||
currentButtons.Add(btn);
|
||||
}
|
||||
}
|
||||
|
||||
void SetupButtonVisual(Transform t, GameObject prefab, int idx)
|
||||
{
|
||||
var canvas = t.Find("Canvas");
|
||||
var bg = canvas?.Find("BlankSquare");
|
||||
var icon = canvas?.Find("PrefabIcon");
|
||||
if (bg == null || icon == null) { Destroy(t.gameObject); return; }
|
||||
float xOff = -375f + idx * 125f;
|
||||
var bgRt = bg.GetComponent<RectTransform>();
|
||||
var icRt = icon.GetComponent<RectTransform>();
|
||||
bgRt.anchoredPosition = new Vector2(xOff, bgRt.anchoredPosition.y);
|
||||
icRt.anchoredPosition = new Vector2(xOff, icRt.anchoredPosition.y);
|
||||
bg.GetComponent<Image>().sprite = Resources.Load<Sprite>("InGame/ButtonSkin/BlankSquare");
|
||||
icon.GetComponent<Image>().sprite = prefab.GetComponent<SpriteRenderer>()?.sprite;
|
||||
icRt.sizeDelta = prefab.name.ToLower().Contains("small")
|
||||
? new Vector2(50, 25)
|
||||
: new Vector2(50, 50);
|
||||
}
|
||||
|
||||
void ClearCurrentButtons()
|
||||
{
|
||||
foreach (var button in currentButtons)
|
||||
Destroy(button);
|
||||
|
||||
foreach (var b in currentButtons) Destroy(b);
|
||||
currentButtons.Clear();
|
||||
}
|
||||
|
||||
public void NextPage()
|
||||
{
|
||||
int maxPage = 3;
|
||||
Debug.Log(currentPage);
|
||||
if (currentPage < maxPage - 1)
|
||||
{
|
||||
currentPage++;
|
||||
GenerateButtons();
|
||||
}
|
||||
int max = Mathf.CeilToInt(blockPrefabs.Count / (float)buttonsPerPage);
|
||||
if (currentPage < max - 1) { currentPage++; GenerateButtons(); }
|
||||
}
|
||||
|
||||
public void PreviousPage()
|
||||
{
|
||||
Debug.Log(currentPage);
|
||||
if (currentPage > 0)
|
||||
{
|
||||
currentPage--;
|
||||
GenerateButtons();
|
||||
}
|
||||
if (currentPage > 0) { currentPage--; GenerateButtons(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Placement
|
||||
|
||||
void SelectPrefab(GameObject prefab)
|
||||
{
|
||||
if (isPlacingBlock) return;
|
||||
|
||||
string name = prefab.name.ToLower();
|
||||
|
||||
if (name.Contains("portal"))
|
||||
currentScale = new Vector3(0.5f, 0.5f, 1);
|
||||
else if (name.Contains("small"))
|
||||
currentScale = new Vector3(0.15f, 0.07f, 1);
|
||||
else if (name.Contains("spike"))
|
||||
currentScale = new Vector3(0.15f, 0.15f, 1);
|
||||
else if (name.Contains("block"))
|
||||
currentScale = new Vector3(0.2f, 0.2f, 1);
|
||||
else if (name.Contains("bonus"))
|
||||
currentScale = new Vector3(0.3f, 0.3f, 1);
|
||||
else
|
||||
currentScale = new Vector3(1f, 1f, 1);
|
||||
|
||||
currentScale = DetermineScaleFromName(prefab.name);
|
||||
InstantiateAndPrepare(prefab, currentScale);
|
||||
}
|
||||
void Update()
|
||||
|
||||
Vector3 DetermineScaleFromName(string name)
|
||||
{
|
||||
// Déplacement de l'objet en cours de placement
|
||||
if (isPlacingBlock && currentBlock != null)
|
||||
{
|
||||
Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
currentBlock.transform.position = new Vector3(Mathf.Round(mousePos.x), Mathf.Round(mousePos.y), -1);
|
||||
|
||||
if (currentBlock != null && Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
HandleBlockRotation(); // ✅ Nouvelle rotation
|
||||
}
|
||||
|
||||
if (!currentBlock.name.ToLower().Contains("portal"))
|
||||
{
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
if (scroll != 0)
|
||||
{
|
||||
float newScale = Mathf.Max(0.1f, currentScale.x + scroll * scaleStep);
|
||||
currentScale = new Vector3(newScale, newScale, 1);
|
||||
currentBlock.transform.localScale = currentScale;
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
Collider2D[] overlaps = Physics2D.OverlapBoxAll(
|
||||
currentBlock.transform.position,
|
||||
currentBlock.GetComponent<Collider2D>().bounds.size,
|
||||
0f
|
||||
);
|
||||
|
||||
if (overlaps.Length > 1)
|
||||
{
|
||||
Debug.Log("Placement annulé : un objet est déjà présent à cet endroit.");
|
||||
return;
|
||||
}
|
||||
|
||||
PlaceBlock();
|
||||
}
|
||||
}
|
||||
else if (Input.GetMouseButtonDown(0)) // Clic gauche pour reprendre un objet déjà placé
|
||||
{
|
||||
Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
Collider2D hit = Physics2D.OverlapPoint(mousePos);
|
||||
|
||||
if (hit != null && hit.transform != null)
|
||||
{
|
||||
if (hit.CompareTag("Ground"))
|
||||
{
|
||||
Debug.Log("Impossible de déplacer le sol (tag Ground).");
|
||||
return;
|
||||
}
|
||||
currentBlock = hit.gameObject;
|
||||
isPlacingBlock = true;
|
||||
currentScale = currentBlock.transform.localScale;
|
||||
Debug.Log($"Déplacement de l'objet : {currentBlock.name}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Redimensionnement d'un objet déjà placé
|
||||
if (Input.GetMouseButtonDown(0) && Input.GetKey(KeyCode.LeftShift) && !isPlacingBlock)
|
||||
{
|
||||
Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
Collider2D hit = Physics2D.OverlapPoint(mousePos);
|
||||
|
||||
if (hit != null && hit.transform != null && !hit.CompareTag("Ground"))
|
||||
{
|
||||
resizingTarget = hit.gameObject;
|
||||
originalMousePos = mousePos;
|
||||
originalScale = resizingTarget.transform.localScale;
|
||||
|
||||
Vector2 localClick = mousePos - (Vector2)resizingTarget.transform.position;
|
||||
float ratio = resizingTarget.GetComponent<Collider2D>().bounds.size.x /
|
||||
resizingTarget.GetComponent<Collider2D>().bounds.size.y;
|
||||
|
||||
currentResizeAxis = Mathf.Abs(localClick.x) > Mathf.Abs(localClick.y * ratio)
|
||||
? ResizeAxis.Horizontal
|
||||
: ResizeAxis.Vertical;
|
||||
|
||||
isResizing = true;
|
||||
Debug.Log($"Début de redimensionnement : {resizingTarget.name}, axe = {currentResizeAxis}");
|
||||
}
|
||||
}
|
||||
|
||||
if (isResizing && resizingTarget != null)
|
||||
{
|
||||
Vector3 currentMousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
Vector3 delta = currentMousePos - originalMousePos;
|
||||
|
||||
Vector3 newScale = originalScale;
|
||||
|
||||
if (currentResizeAxis == ResizeAxis.Horizontal)
|
||||
newScale.x = Mathf.Max(0.1f, originalScale.x + delta.x);
|
||||
else if (currentResizeAxis == ResizeAxis.Vertical)
|
||||
newScale.y = Mathf.Max(0.1f, originalScale.y + delta.y);
|
||||
|
||||
// Temporarily apply the new scale for collision testing
|
||||
Vector3 originalPos = resizingTarget.transform.position;
|
||||
resizingTarget.transform.localScale = newScale;
|
||||
|
||||
Bounds bounds = resizingTarget.GetComponent<Collider2D>().bounds;
|
||||
Collider2D[] overlaps = Physics2D.OverlapBoxAll(bounds.center, bounds.size, 0f);
|
||||
|
||||
bool hasCollision = false;
|
||||
foreach (var col in overlaps)
|
||||
{
|
||||
if (col.gameObject != resizingTarget)
|
||||
{
|
||||
hasCollision = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasCollision)
|
||||
{
|
||||
resizingTarget.transform.localScale = originalScale; // revert
|
||||
Debug.Log("Étirement annulé : collision détectée.");
|
||||
}
|
||||
|
||||
if (Input.GetMouseButtonUp(0))
|
||||
{
|
||||
isResizing = false;
|
||||
resizingTarget = null;
|
||||
currentResizeAxis = ResizeAxis.None;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Clic droit pour supprimer un objet déjà placé (sauf le sol)
|
||||
if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
Collider2D hit = Physics2D.OverlapPoint(mousePos);
|
||||
|
||||
if (hit != null && hit.transform != null)
|
||||
{
|
||||
if (hit.CompareTag("Ground"))
|
||||
{
|
||||
Debug.Log("Impossible de supprimer le sol (tag Ground).");
|
||||
return;
|
||||
}
|
||||
|
||||
Destroy(hit.gameObject);
|
||||
Debug.Log($"Objet supprimé : {hit.name}");
|
||||
}
|
||||
}
|
||||
|
||||
name = name.ToLower();
|
||||
if (name.Contains("portal")) return new Vector3(0.5f, 0.5f, 1);
|
||||
if (name.Contains("small")) return new Vector3(0.15f, 0.07f, 1);
|
||||
if (name.Contains("spike")) return new Vector3(0.15f, 0.15f, 1);
|
||||
if (name.Contains("block")) return new Vector3(0.2f, 0.2f, 1);
|
||||
if (name.Contains("bonus")) return new Vector3(0.3f, 0.3f, 1);
|
||||
return Vector3.one;
|
||||
}
|
||||
|
||||
void HandleBlockPlacement()
|
||||
{
|
||||
Vector2 m = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
currentBlock.transform.position = new Vector3(Mathf.Round(m.x), Mathf.Round(m.y), -1);
|
||||
if (Input.GetKeyDown(KeyCode.R)) HandleBlockRotation();
|
||||
if (!currentBlock.name.ToLower().Contains("portal"))
|
||||
{
|
||||
float s = Input.GetAxis("Mouse ScrollWheel");
|
||||
if (s != 0)
|
||||
{
|
||||
float ns = Mathf.Max(0.1f, currentScale.x + s * scaleStep);
|
||||
currentScale = Vector3.one * ns;
|
||||
currentBlock.transform.localScale = currentScale;
|
||||
}
|
||||
}
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
if (!IsPlacementValid())
|
||||
{
|
||||
Debug.Log("Placement invalide : collision.");
|
||||
return;
|
||||
}
|
||||
PlaceBlock();
|
||||
}
|
||||
}
|
||||
|
||||
bool IsPlacementValid()
|
||||
{
|
||||
var col = currentBlock.GetComponent<Collider2D>();
|
||||
var hits = Physics2D.OverlapBoxAll(col.bounds.center, col.bounds.size, 0f);
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (h == col) continue;
|
||||
if (h.transform.IsChildOf(currentBlock.transform)) continue;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleBlockSelection()
|
||||
{
|
||||
if (!Input.GetMouseButtonDown(0)) return;
|
||||
Vector2 m = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
var hit = Physics2D.OverlapPoint(m);
|
||||
if (hit != null && !hit.CompareTag("Ground"))
|
||||
{
|
||||
var sel = hit.gameObject;
|
||||
if ((sel.name.Contains("ObstacleSafer") || sel.name.Contains("ObstacleKiller"))
|
||||
&& sel.transform.parent != null
|
||||
&& sel.transform.parent.name.Contains("ObstacleBlock"))
|
||||
sel = sel.transform.parent.gameObject;
|
||||
currentBlock = sel;
|
||||
isPlacingBlock = true;
|
||||
currentScale = currentBlock.transform.localScale;
|
||||
Debug.Log($"Sélection : {sel.name}");
|
||||
}
|
||||
}
|
||||
void PlaceBlock()
|
||||
{
|
||||
bool skipVerticalSnap = false;
|
||||
string name = currentBlock.name.ToLower();
|
||||
bool isSpikeType = name.Contains("spike") || name.Contains("smallspike") || name.Contains("killzone");
|
||||
|
||||
if (currentBlock.name.ToLower().Contains("smallobstacle") || currentBlock.name.ToLower().Contains("portal"))
|
||||
if (isSpikeType)
|
||||
{
|
||||
skipVerticalSnap = true; // On saute l'alignement vertical pour ces cas-là
|
||||
}
|
||||
|
||||
if (!skipVerticalSnap)
|
||||
{
|
||||
Vector2 origin = currentBlock.transform.position;
|
||||
RaycastHit2D[] hitsBelow = Physics2D.RaycastAll(origin, Vector2.down, 100f);
|
||||
|
||||
float highestY = -Mathf.Infinity;
|
||||
GameObject bestTargetBelow = null;
|
||||
|
||||
foreach (var hit in hitsBelow)
|
||||
// 1) Bloquer si on perçoit un spike de même type dans la direction de snap
|
||||
if (IsBlockedBySameTypeInSnapDirection())
|
||||
{
|
||||
if (hit.collider != null && hit.collider.gameObject != currentBlock)
|
||||
{
|
||||
float topOfObject = hit.collider.bounds.max.y;
|
||||
if (topOfObject > highestY)
|
||||
{
|
||||
highestY = topOfObject;
|
||||
bestTargetBelow = hit.collider.gameObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bestTargetBelow != null)
|
||||
{
|
||||
float height = currentBlock.GetComponent<Collider2D>().bounds.size.y;
|
||||
currentBlock.transform.position = new Vector3(currentBlock.transform.position.x, highestY + height / 2f, -1);
|
||||
Debug.LogError("Impossible de poser un spike sur un autre spike !");
|
||||
Destroy(currentBlock);
|
||||
}
|
||||
else
|
||||
{
|
||||
float height = currentBlock.GetComponent<Collider2D>().bounds.size.y;
|
||||
currentBlock.transform.position = new Vector3(currentBlock.transform.position.x, height / 2f, -1);
|
||||
// 2) On snap dans la direction (down/left/up/right), et on détruit si aucun support
|
||||
if (!SnapSpikeByRotation())
|
||||
{
|
||||
Debug.LogError("Impossible de poser un spike dans le vide !");
|
||||
Destroy(currentBlock);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 3) On fait l’ajustement fin (si besoin)
|
||||
TrySnapToNearbyBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
// ➔ Toujours essayer de snap sur la droite et en bas même pour Portal et SmallObstacle
|
||||
TrySnapToNearbyBlock();
|
||||
else
|
||||
{
|
||||
// tous les autres blocs
|
||||
TrySnapToNearbyBlock();
|
||||
}
|
||||
|
||||
isPlacingBlock = false;
|
||||
currentBlock = null;
|
||||
}
|
||||
|
||||
|
||||
private void TrySnapToNearbyBlock()
|
||||
/// <summary>
|
||||
/// Vérifie qu’il n’y ait pas déjà un spike/smallspike/killzone
|
||||
/// juste devant le spike selon sa rotation.
|
||||
/// </summary>
|
||||
bool IsBlockedBySameTypeInSnapDirection()
|
||||
{
|
||||
if (currentBlock == null)
|
||||
return;
|
||||
var col = currentBlock.GetComponent<Collider2D>();
|
||||
var b = col.bounds;
|
||||
|
||||
Collider2D blockCollider = currentBlock.GetComponent<Collider2D>();
|
||||
Bounds bounds = blockCollider.bounds;
|
||||
|
||||
float snapDistance = 1f; // Distance de snap (en Unity units)
|
||||
|
||||
// Zone de scan à droite
|
||||
Vector2 rightAreaStart = new Vector2(bounds.max.x, bounds.min.y);
|
||||
Vector2 rightAreaEnd = new Vector2(bounds.max.x + snapDistance, bounds.max.y);
|
||||
|
||||
// Zone de scan à gauche
|
||||
Vector2 leftAreaStart = new Vector2(bounds.min.x - snapDistance, bounds.min.y);
|
||||
Vector2 leftAreaEnd = new Vector2(bounds.min.x, bounds.max.y);
|
||||
|
||||
// Zone de scan en dessous
|
||||
Vector2 bottomAreaStart = new Vector2(bounds.min.x, bounds.min.y - snapDistance);
|
||||
Vector2 bottomAreaEnd = new Vector2(bounds.max.x, bounds.min.y);
|
||||
|
||||
// Zone de scan au dessus
|
||||
Vector2 topAreaStart = new Vector2(bounds.min.x, bounds.max.y);
|
||||
Vector2 topAreaEnd = new Vector2(bounds.max.x, bounds.max.y + snapDistance);
|
||||
|
||||
Collider2D[] hitsRight = Physics2D.OverlapAreaAll(rightAreaStart, rightAreaEnd);
|
||||
Collider2D[] hitsLeft = Physics2D.OverlapAreaAll(leftAreaStart, leftAreaEnd);
|
||||
Collider2D[] hitsBelow = Physics2D.OverlapAreaAll(bottomAreaStart, bottomAreaEnd);
|
||||
Collider2D[] hitsAbove = Physics2D.OverlapAreaAll(topAreaStart, topAreaEnd);
|
||||
|
||||
// ➔ Priorité : droite > gauche > bas > haut
|
||||
|
||||
foreach (var hit in hitsRight)
|
||||
// 1) Détermine direction de snap (0→down,1→left,2→up,3→right)
|
||||
int rot = (Mathf.RoundToInt(currentBlock.transform.eulerAngles.z / 90) % 4 + 4) % 4;
|
||||
Vector2 dir = rot switch
|
||||
{
|
||||
if (hit != null && hit.gameObject != currentBlock)
|
||||
1 => Vector2.right,
|
||||
2 => Vector2.up,
|
||||
3 => Vector2.left,
|
||||
_ => Vector2.down
|
||||
};
|
||||
|
||||
// 2) Origine : on place la « boîte » juste en bordure du sprite
|
||||
float offset = 0.01f;
|
||||
Vector2 origin = rot switch
|
||||
{
|
||||
1 => new Vector2(b.min.x - offset, b.center.y), // gauche
|
||||
3 => new Vector2(b.max.x + offset, b.center.y), // droite
|
||||
2 => new Vector2(b.center.x, b.max.y + offset), // haut
|
||||
_ => new Vector2(b.center.x, b.min.y - offset) // bas
|
||||
};
|
||||
|
||||
// 3) On box‐cast exactement la taille du sprite pour 100 unités
|
||||
RaycastHit2D[] hits = Physics2D.BoxCastAll(
|
||||
origin,
|
||||
b.size,
|
||||
0f,
|
||||
dir,
|
||||
100f
|
||||
);
|
||||
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (h.collider == null || h.collider.gameObject == currentBlock) continue;
|
||||
if (h.collider.isTrigger) continue;
|
||||
|
||||
string me = currentBlock.name.ToLower();
|
||||
string other = h.collider.gameObject.name.ToLower();
|
||||
|
||||
bool meIsSpikeFamily = me.Contains("spike") || me.Contains("killzone");
|
||||
bool otherIsSpikeFamily = other.Contains("spike") || other.Contains("killzone");
|
||||
|
||||
if (meIsSpikeFamily && otherIsSpikeFamily)
|
||||
{
|
||||
float theirLeft = hit.bounds.min.x;
|
||||
float ourWidth = bounds.size.x;
|
||||
currentBlock.transform.position = new Vector3(theirLeft - ourWidth / 2f, currentBlock.transform.position.y, -1);
|
||||
Debug.Log("✅ Snap automatique à droite !");
|
||||
return;
|
||||
// on bloque absolument tout chevauchement entre ces trois types
|
||||
return true;
|
||||
}
|
||||
|
||||
// si on tape autre chose (sol, block, bonus…), on arrête le scan
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SnapSpikeByRotation()
|
||||
{
|
||||
// Récupère bounds et demi-tailles
|
||||
var col = currentBlock.GetComponent<Collider2D>();
|
||||
var b = col.bounds;
|
||||
float hw = b.extents.x;
|
||||
float hh = b.extents.y;
|
||||
|
||||
// 1) Détermine la rotation en quarts de tour : 0→down, 1→left, 2→up, 3→right
|
||||
int rot = ((Mathf.RoundToInt(currentBlock.transform.eulerAngles.z / 90f) % 4) + 4) % 4;
|
||||
Vector2 dir;
|
||||
switch (rot)
|
||||
{
|
||||
case 1: dir = Vector2.right; break;
|
||||
case 2: dir = Vector2.up; break;
|
||||
case 3: dir = Vector2.left; break;
|
||||
default: dir = Vector2.down; break;
|
||||
}
|
||||
|
||||
// 2) Calcule 3 origines le long de la face « avant » du spike
|
||||
const float eps = 0.01f;
|
||||
List<Vector2> origins = new List<Vector2>();
|
||||
if (dir == Vector2.down || dir == Vector2.up)
|
||||
{
|
||||
// face inférieure ou supérieure → balaye l’axe X
|
||||
float y0 = (dir == Vector2.down) ? b.min.y - eps : b.max.y + eps;
|
||||
origins.Add(new Vector2(b.min.x + 0.1f * b.size.x, y0));
|
||||
origins.Add(new Vector2(b.center.x, y0));
|
||||
origins.Add(new Vector2(b.max.x - 0.1f * b.size.x, y0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// face gauche ou droite → balaye l’axe Y
|
||||
float x0 = (dir == Vector2.left) ? b.min.x - eps : b.max.x + eps;
|
||||
origins.Add(new Vector2(x0, b.min.y + 0.1f * b.size.y));
|
||||
origins.Add(new Vector2(x0, b.center.y));
|
||||
origins.Add(new Vector2(x0, b.max.y - 0.1f * b.size.y));
|
||||
}
|
||||
|
||||
// 3) Pour chaque origine, on lance un RaycastAll et on garde le hit le plus proche
|
||||
float bestDist = float.PositiveInfinity;
|
||||
RaycastHit2D bestHit = default;
|
||||
foreach (var o in origins)
|
||||
{
|
||||
var hits = Physics2D.RaycastAll(o, dir, 100f);
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (h.collider == null || h.collider.gameObject == currentBlock) continue;
|
||||
if (h.collider.isTrigger) continue;
|
||||
if (h.distance < bestDist)
|
||||
{
|
||||
bestDist = h.distance;
|
||||
bestHit = h;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var hit in hitsLeft)
|
||||
{
|
||||
if (hit != null && hit.gameObject != currentBlock)
|
||||
{
|
||||
float theirRight = hit.bounds.max.x;
|
||||
float ourWidth = bounds.size.x;
|
||||
currentBlock.transform.position = new Vector3(theirRight + ourWidth / 2f, currentBlock.transform.position.y, -1);
|
||||
Debug.Log("✅ Snap automatique à gauche !");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 4) Aucun support trouvé → échec
|
||||
if (bestHit.collider == null)
|
||||
return false;
|
||||
|
||||
foreach (var hit in hitsBelow)
|
||||
{
|
||||
if (hit != null && hit.gameObject != currentBlock)
|
||||
{
|
||||
float theirTop = hit.bounds.max.y;
|
||||
float ourHeight = bounds.size.y;
|
||||
currentBlock.transform.position = new Vector3(currentBlock.transform.position.x, theirTop + ourHeight / 2f, -1);
|
||||
Debug.Log("✅ Snap automatique en bas !");
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 5) Sinon, colle bord à bord
|
||||
Vector3 p = currentBlock.transform.position;
|
||||
if (dir == Vector2.down) p.y = bestHit.point.y + hh;
|
||||
else if (dir == Vector2.up) p.y = bestHit.point.y - hh;
|
||||
else if (dir == Vector2.left) p.x = bestHit.point.x + hw;
|
||||
else if (dir == Vector2.right) p.x = bestHit.point.x - hw;
|
||||
|
||||
foreach (var hit in hitsAbove)
|
||||
currentBlock.transform.position = new Vector3(p.x, p.y, -1f);
|
||||
Debug.Log($"Spike snapé {dir} sur « {bestHit.collider.name} » à {currentBlock.transform.position}");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Resizing & Deletion
|
||||
|
||||
void HandleBlockResizing()
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0) && Input.GetKey(KeyCode.LeftShift) && !isPlacingBlock)
|
||||
{
|
||||
if (hit != null && hit.gameObject != currentBlock)
|
||||
{
|
||||
float theirBottom = hit.bounds.min.y;
|
||||
float ourHeight = bounds.size.y;
|
||||
currentBlock.transform.position = new Vector3(currentBlock.transform.position.x, theirBottom - ourHeight / 2f, -1);
|
||||
Debug.Log("✅ Snap automatique en haut !");
|
||||
return;
|
||||
}
|
||||
Vector2 m = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
var hit = Physics2D.OverlapPoint(m);
|
||||
if (hit != null && !hit.CompareTag("Ground"))
|
||||
BeginResizing(hit.gameObject, m);
|
||||
}
|
||||
if (isResizing && resizingTarget != null)
|
||||
PerformResizing();
|
||||
}
|
||||
|
||||
void BeginResizing(GameObject tgt, Vector2 mPos)
|
||||
{
|
||||
resizingTarget = tgt;
|
||||
originalMousePos = mPos;
|
||||
originalScale = tgt.transform.localScale;
|
||||
Vector2 local = mPos - (Vector2)tgt.transform.position;
|
||||
float ratio = tgt.GetComponent<Collider2D>().bounds.size.x / tgt.GetComponent<Collider2D>().bounds.size.y;
|
||||
currentResizeAxis = Mathf.Abs(local.x) > Mathf.Abs(local.y * ratio)
|
||||
? ResizeAxis.Horizontal
|
||||
: ResizeAxis.Vertical;
|
||||
isResizing = true;
|
||||
Debug.Log($"Début redim {tgt.name} (axe {currentResizeAxis})");
|
||||
}
|
||||
|
||||
void PerformResizing()
|
||||
{
|
||||
Vector3 m = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
Vector3 delta = m - originalMousePos;
|
||||
Vector3 ns = originalScale;
|
||||
if (currentResizeAxis == ResizeAxis.Horizontal)
|
||||
ns.x = Mathf.Max(0.1f, originalScale.x + delta.x);
|
||||
else
|
||||
ns.y = Mathf.Max(0.1f, originalScale.y + delta.y);
|
||||
resizingTarget.transform.localScale = ns;
|
||||
if (IsOverlapping(resizingTarget))
|
||||
{
|
||||
resizingTarget.transform.localScale = originalScale;
|
||||
Debug.Log("Redim annulé : collision");
|
||||
}
|
||||
if (Input.GetMouseButtonUp(0))
|
||||
{
|
||||
isResizing = false;
|
||||
resizingTarget = null;
|
||||
currentResizeAxis = ResizeAxis.None;
|
||||
Debug.Log("Fin redim");
|
||||
}
|
||||
}
|
||||
|
||||
bool IsOverlapping(GameObject obj)
|
||||
{
|
||||
var b = obj.GetComponent<Collider2D>().bounds;
|
||||
foreach (var h in Physics2D.OverlapBoxAll(b.center, b.size, 0f))
|
||||
if (h.gameObject != obj) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void HandleBlockDeletion()
|
||||
{
|
||||
if (!Input.GetMouseButtonDown(1)) return;
|
||||
Vector2 m = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
var hit = Physics2D.OverlapPoint(m);
|
||||
if (hit != null && !hit.CompareTag("Ground"))
|
||||
{
|
||||
var toD = hit.gameObject;
|
||||
if ((toD.name.Contains("ObstacleSafer") || toD.name.Contains("ObstacleKiller"))
|
||||
&& toD.transform.parent != null
|
||||
&& toD.transform.parent.name.Contains("ObstacleBlock"))
|
||||
toD = toD.transform.parent.gameObject;
|
||||
if (toD == currentBlock) { currentBlock = null; isPlacingBlock = false; }
|
||||
Destroy(toD);
|
||||
Debug.Log($"Supprimé {toD.name}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Utility
|
||||
|
||||
bool IsPointerOverUI()
|
||||
=> EventSystem.current != null && EventSystem.current.IsPointerOverGameObject();
|
||||
|
||||
void TrySnapToNearbyBlock()
|
||||
{
|
||||
if (currentBlock == null) return;
|
||||
|
||||
var col = currentBlock.GetComponent<Collider2D>();
|
||||
var b = col.bounds;
|
||||
float snapDistance = 1f;
|
||||
float verticalEps = 0.1f;
|
||||
|
||||
// === SNAP HORIZONTAL (droite)
|
||||
Vector2 hBoxSize = new Vector2(snapDistance, b.size.y - verticalEps * 2f);
|
||||
Vector2 rightCenter = new Vector2(b.max.x + snapDistance / 2f, b.center.y);
|
||||
var hits = Physics2D.OverlapBoxAll(rightCenter, hBoxSize, 0f);
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (IsInvalidSnapTarget(h)) continue;
|
||||
float newX = h.bounds.min.x - b.extents.x;
|
||||
currentBlock.transform.position = new Vector3(newX, currentBlock.transform.position.y, -1f);
|
||||
Debug.Log($"Snap horizontal à droite contre {h.name}");
|
||||
return;
|
||||
}
|
||||
|
||||
// === SNAP HORIZONTAL (gauche)
|
||||
Vector2 leftCenter = new Vector2(b.min.x - snapDistance / 2f, b.center.y);
|
||||
hits = Physics2D.OverlapBoxAll(leftCenter, hBoxSize, 0f);
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (IsInvalidSnapTarget(h)) continue;
|
||||
float newX = h.bounds.max.x + b.extents.x;
|
||||
currentBlock.transform.position = new Vector3(newX, currentBlock.transform.position.y, -1f);
|
||||
Debug.Log($"Snap horizontal à gauche contre {h.name}");
|
||||
return;
|
||||
}
|
||||
|
||||
// === SNAP VERTICAL (dessous)
|
||||
Vector2 downBoxSize = new Vector2(b.size.x - 0.1f, snapDistance);
|
||||
Vector2 downCenter = new Vector2(b.center.x, b.min.y - snapDistance / 2f);
|
||||
hits = Physics2D.OverlapBoxAll(downCenter, downBoxSize, 0f);
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (IsInvalidSnapTarget(h)) continue;
|
||||
float newY = h.bounds.max.y + b.extents.y;
|
||||
currentBlock.transform.position = new Vector3(currentBlock.transform.position.x, newY, -1f);
|
||||
Debug.Log($"Snap vertical (bas) contre {h.name}");
|
||||
return;
|
||||
}
|
||||
|
||||
// === SNAP VERTICAL (au-dessus)
|
||||
Vector2 upCenter = new Vector2(b.center.x, b.max.y + snapDistance / 2f);
|
||||
hits = Physics2D.OverlapBoxAll(upCenter, downBoxSize, 0f);
|
||||
foreach (var h in hits)
|
||||
{
|
||||
if (IsInvalidSnapTarget(h)) continue;
|
||||
float newY = h.bounds.min.y - b.extents.y;
|
||||
currentBlock.transform.position = new Vector3(currentBlock.transform.position.x, newY, -1f);
|
||||
Debug.Log($"Snap vertical (haut) contre {h.name}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsInvalidSnapTarget(Collider2D h)
|
||||
{
|
||||
if (h == null || h.gameObject == currentBlock || h.isTrigger) return true;
|
||||
|
||||
var t = h.transform;
|
||||
if (t.parent != null && t.parent.name.Contains("ObstacleBlock"))
|
||||
{
|
||||
if (t.name.Contains("ObstacleKiller") || t.name.Contains("ObstacleSafer"))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Filtrage des enfants parasites
|
||||
bool IsChildOfObstacleBlock(Collider2D col)
|
||||
{
|
||||
var t = col.transform;
|
||||
if (t.parent == null) return false;
|
||||
|
||||
bool isNamedObstacleChild = t.name.Contains("ObstacleSafer") || t.name.Contains("ObstacleKiller");
|
||||
bool parentIsBlock = t.parent.name.Contains("ObstacleBlock");
|
||||
return isNamedObstacleChild && parentIsBlock;
|
||||
}
|
||||
|
||||
void HandleBlockRotation()
|
||||
{
|
||||
currentBlock.transform.Rotate(0, 0, -90f);
|
||||
Debug.Log("Rotation 90°!");
|
||||
}
|
||||
|
||||
void InstantiateAndPrepare(GameObject prefab, Vector3? scaleOverride = null)
|
||||
{
|
||||
GameObject obj = Instantiate(prefab);
|
||||
var obj = Instantiate(prefab, persistentBlockContainer);
|
||||
obj.transform.position = new Vector3(0, 0, -1);
|
||||
obj.transform.localScale = scaleOverride ?? currentScale;
|
||||
|
||||
try { obj.tag = prefab.name; }
|
||||
catch { Debug.LogWarning($"Le tag '{prefab.name}' n'existe pas. Ajoutez-le dans Project Settings > Tags."); }
|
||||
|
||||
currentBlock = obj;
|
||||
currentBlock.tag = prefab.tag;
|
||||
isPlacingBlock = true;
|
||||
}
|
||||
|
||||
private void HandleBlockRotation()
|
||||
public void Save()
|
||||
{
|
||||
currentBlock.transform.Rotate(0f, 0f, -90f); // ➔ Rotation de 90° dans le sens horaire
|
||||
Debug.Log("🔄 Bloc pivoté de 90° !");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void ClearEditor()
|
||||
{
|
||||
if (persistentBlockContainer == null) return;
|
||||
|
||||
foreach (Transform child in persistentBlockContainer)
|
||||
{
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
|
||||
Debug.Log("Éditeur vidé.");
|
||||
|
||||
currentBlock = null;
|
||||
isPlacingBlock = false;
|
||||
currentPage = 0;
|
||||
ClearCurrentButtons();
|
||||
GenerateButtons();
|
||||
}
|
||||
}
|
||||
|
@ -5,66 +5,154 @@ using System.IO;
|
||||
public class LevelLoader : MonoBehaviour
|
||||
{
|
||||
public LevelsLoader levelsLoader;
|
||||
public AudioSource audioSource;
|
||||
public bool editMode;
|
||||
public bool createMode;
|
||||
public AudioSource musicSource;
|
||||
public Text progressionText;
|
||||
private readonly float groundY = -6.034f;
|
||||
|
||||
private GameObject GetPrefab(string type)
|
||||
{
|
||||
return Resources.Load<GameObject>("Prefabs/" + type);
|
||||
var prefab = Resources.Load<GameObject>("Prefabs/" + type);
|
||||
if (prefab == null)
|
||||
{
|
||||
Debug.LogError($"Prefab introuvable pour : {type}");
|
||||
}
|
||||
return prefab;
|
||||
}
|
||||
|
||||
private void LoadAudio()
|
||||
{
|
||||
audioSource.clip = Resources.Load<AudioClip>(Path.Combine("Musics", levelsLoader.levelCurrent.musicName));
|
||||
musicSource.clip = Resources.Load<AudioClip>(Path.Combine("Musics", levelsLoader.levelCurrent.musicName));
|
||||
|
||||
if (PlayerPrefs.HasKey("Volume"))
|
||||
{
|
||||
audioSource.volume = PlayerPrefs.GetFloat("Volume");
|
||||
musicSource.volume = PlayerPrefs.GetFloat("Volume");
|
||||
}
|
||||
else
|
||||
{
|
||||
audioSource.volume = 1f;
|
||||
musicSource.volume = 1f;
|
||||
}
|
||||
|
||||
audioSource.Play();
|
||||
musicSource.Play();
|
||||
}
|
||||
|
||||
private void LoadElements()
|
||||
{
|
||||
Level current = levelsLoader.levelCurrent;
|
||||
|
||||
foreach (var element in current.elements)
|
||||
{
|
||||
GameObject prefab = GetPrefab(element.type);
|
||||
GameObject instance = Instantiate(prefab, new Vector3(element.x, element.y, 0), Quaternion.identity);
|
||||
if (prefab == null) continue;
|
||||
|
||||
GameObject instance = Instantiate(
|
||||
prefab,
|
||||
new Vector3(element.x, element.y, 0),
|
||||
Quaternion.identity
|
||||
);
|
||||
|
||||
if (editMode)
|
||||
{
|
||||
foreach (Transform child in instance.transform)
|
||||
{
|
||||
if (child.name.Contains("ObstacleKiller"))
|
||||
{
|
||||
var col = child.GetComponent<BoxCollider2D>();
|
||||
if (col != null && col.size.y > 2f) // Trop grand
|
||||
{
|
||||
Debug.LogWarning($"⚠️ Collider {child.name} trop grand, réduction appliquée.");
|
||||
col.size = new Vector2(col.size.x, 1f);
|
||||
col.offset = new Vector2(col.offset.x, -2f); // Ajuste selon ton design
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// En mode jeu/test uniquement → ajout du AICollider
|
||||
if (!editMode)
|
||||
{
|
||||
if (prefab.CompareTag("Kill"))
|
||||
{
|
||||
Instantiate(
|
||||
Resources.Load<GameObject>("AICollider"),
|
||||
new Vector3(element.x - 1, element.y, 0),
|
||||
Quaternion.identity
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Appliquer l'échelle personnalisée
|
||||
Vector3 originalScale = instance.transform.localScale;
|
||||
float newScaleX = element.scaleX > 0 ? element.scaleX : originalScale.x;
|
||||
float newScaleY = element.scaleY > 0 ? element.scaleY : originalScale.y;
|
||||
|
||||
instance.transform.localScale = new Vector3(newScaleX, newScaleY, originalScale.z);
|
||||
}
|
||||
|
||||
GameObject groundPrefab = GetPrefab("Ground");
|
||||
GameObject groundInstance = Instantiate(groundPrefab, new Vector3(current.LastX / 2, groundY, 0), Quaternion.identity);
|
||||
float groundWidth = current.LastX;
|
||||
groundInstance.transform.localScale = new Vector3(groundWidth / 5f * 2, 1, 1);
|
||||
// Sol uniquement en mode jeu
|
||||
if (!editMode)
|
||||
{
|
||||
GameObject groundPrefab = GetPrefab("Ground");
|
||||
if (groundPrefab != null)
|
||||
{
|
||||
GameObject groundInstance = Instantiate(
|
||||
groundPrefab,
|
||||
new Vector3(current.LastX / 2, groundY, 0),
|
||||
Quaternion.identity
|
||||
);
|
||||
groundInstance.transform.localScale = new Vector3(current.LastX / 5f * 2, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Mur de fin toujours placé
|
||||
GameObject winWall = GetPrefab("WinnerWall");
|
||||
if (winWall != null)
|
||||
{
|
||||
Instantiate(
|
||||
winWall,
|
||||
new Vector3(current.LastX, 0, 0),
|
||||
Quaternion.Euler(0, 0, 90)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
||||
Level current = levelsLoader.levelCurrent;
|
||||
createMode = PlayerPrefs.GetInt("CreateMode", 0) == 1;
|
||||
if (!editMode)
|
||||
{
|
||||
GameObject groundPrefab = GetPrefab("Ground");
|
||||
GameObject groundInstance = Instantiate(groundPrefab, new Vector3(current.LastX / 2, groundY, 0), Quaternion.identity);
|
||||
float groundWidth = current.LastX;
|
||||
groundInstance.transform.localScale = new Vector3(groundWidth / 5f * 2, 1, 1);
|
||||
}
|
||||
Instantiate(GetPrefab("WinnerWall"), new Vector3(current.LastX, 0, 0), Quaternion.Euler(0, 0, 90));
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
||||
levelsLoader.IncreaseTotalAttempts();
|
||||
if (!createMode)
|
||||
{
|
||||
levelsLoader = GameObject
|
||||
.FindGameObjectWithTag("LevelsLoader")
|
||||
.GetComponent<LevelsLoader>();
|
||||
|
||||
LoadAudio();
|
||||
LoadElements();
|
||||
levelsLoader.IncreaseTotalAttempts();
|
||||
|
||||
LoadElements();
|
||||
if (!editMode)
|
||||
LoadAudio();
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
Level current = levelsLoader.levelCurrent;
|
||||
progressionText.text = current.ProgressionPercent + "%";
|
||||
if (!editMode)
|
||||
{
|
||||
progressionText.text = levelsLoader.levelCurrent.ProgressionPercent + "%";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
0
Assets/Scripts/LevelsSelect/LevelEditor
Normal file
0
Assets/Scripts/LevelsSelect/LevelEditor
Normal file
7
Assets/Scripts/LevelsSelect/LevelEditor.meta
Normal file
7
Assets/Scripts/LevelsSelect/LevelEditor.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 588b3f9ce673f764b8a3a81842ed9f46
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,10 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LevelHomeButton : MonoBehaviour
|
||||
{
|
||||
public AudioSource sfxSource;
|
||||
|
||||
public static IEnumerator PlaySoundAndLoadScene(AudioSource sfxSource, string scene)
|
||||
{
|
||||
yield return new WaitWhile(() => sfxSource.isPlaying);
|
||||
SceneManager.LoadScene(scene);
|
||||
}
|
||||
|
||||
public void GoToHome()
|
||||
{
|
||||
SceneManager.LoadScene("HomeScene");
|
||||
PlayerPrefs.SetInt("CreateMode", 0);
|
||||
PlayerPrefs.SetInt("EditMode", 0);
|
||||
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
StartCoroutine(PlaySoundAndLoadScene(sfxSource, "HomeScene"));
|
||||
}
|
||||
}
|
||||
|
@ -7,4 +7,9 @@ public class LevelNameButton : MonoBehaviour
|
||||
{
|
||||
SceneManager.LoadScene("LevelScene");
|
||||
}
|
||||
public void EditLevel()
|
||||
{
|
||||
PlayerPrefs.SetInt("CreateMode", 0);
|
||||
SceneManager.LoadScene("LevelEditorScene");
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
public class LevelNextButton : MonoBehaviour
|
||||
{
|
||||
public AudioSource sfxSource;
|
||||
public LevelsLoader levelsLoader;
|
||||
|
||||
public void Start()
|
||||
@ -9,8 +11,18 @@ public class LevelNextButton : MonoBehaviour
|
||||
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.RightArrow))
|
||||
{
|
||||
NextLevel();
|
||||
}
|
||||
}
|
||||
|
||||
public void NextLevel()
|
||||
{
|
||||
levelsLoader.NextLevel();
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
public class LevelPreviousButton : MonoBehaviour
|
||||
{
|
||||
public AudioSource sfxSource;
|
||||
public LevelsLoader levelsLoader;
|
||||
|
||||
public void Start()
|
||||
@ -9,8 +11,18 @@ public class LevelPreviousButton : MonoBehaviour
|
||||
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.LeftArrow))
|
||||
{
|
||||
PreviousLevel();
|
||||
}
|
||||
}
|
||||
|
||||
public void PreviousLevel()
|
||||
{
|
||||
levelsLoader.PreviousLevel();
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,25 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MainMenu : MonoBehaviour
|
||||
{
|
||||
public AudioSource sfxSource;
|
||||
|
||||
public void LaunchGame()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("SelectLevelScene");
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "SelectLevelScene"));
|
||||
}
|
||||
|
||||
public void OpenImport()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("ImportScene");
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "ImportScene"));
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
@ -20,16 +29,34 @@ public class MainMenu : MonoBehaviour
|
||||
|
||||
public void LevelEditor()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("LevelEditorScene");
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "LevelEditorScene"));
|
||||
}
|
||||
|
||||
public void CreateVoidLevel()
|
||||
{
|
||||
PlayerPrefs.SetInt("CreateMode", 1);
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "LevelEditorScene"));
|
||||
}
|
||||
|
||||
public void EditorChoice()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("EditorChoiceScene");
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "EditorChoiceScene"));
|
||||
}
|
||||
|
||||
public void CreateLevel()
|
||||
public void EditLevel()
|
||||
{
|
||||
SceneManager.LoadSceneAsync("CreateLevelScene");
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "click"));
|
||||
sfxSource.Play();
|
||||
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "SelectLevelToEditScene"));
|
||||
}
|
||||
}
|
||||
|
@ -13,26 +13,26 @@ public class PauseMenu : MonoBehaviour
|
||||
{
|
||||
if (PlayerPrefs.HasKey("Volume"))
|
||||
{
|
||||
levelLoader.audioSource.volume = PlayerPrefs.GetFloat("Volume");
|
||||
volumeSlider.value = levelLoader.audioSource.volume;
|
||||
levelLoader.musicSource.volume = PlayerPrefs.GetFloat("Volume");
|
||||
volumeSlider.value = levelLoader.musicSource.volume;
|
||||
}
|
||||
else
|
||||
{
|
||||
levelLoader.audioSource.volume = 1f;
|
||||
levelLoader.musicSource.volume = 1f;
|
||||
volumeSlider.value = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeVolume()
|
||||
{
|
||||
levelLoader.audioSource.volume = volumeSlider.value;
|
||||
PlayerPrefs.SetFloat("Volume", levelLoader.audioSource.volume);
|
||||
levelLoader.musicSource.volume = volumeSlider.value;
|
||||
PlayerPrefs.SetFloat("Volume", levelLoader.musicSource.volume);
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
{
|
||||
Time.timeScale = 0;
|
||||
levelLoader.audioSource.Pause();
|
||||
levelLoader.musicSource.Pause();
|
||||
|
||||
pauseMenu.SetActive(true);
|
||||
pauseButton.SetActive(false);
|
||||
@ -47,7 +47,7 @@ public class PauseMenu : MonoBehaviour
|
||||
public void Resume()
|
||||
{
|
||||
Time.timeScale = 1;
|
||||
levelLoader.audioSource.Play();
|
||||
levelLoader.musicSource.Play();
|
||||
|
||||
pauseMenu.SetActive(false);
|
||||
pauseButton.SetActive(true);
|
||||
|
@ -1,3 +1,4 @@
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
@ -11,6 +12,9 @@ public class Player : MonoBehaviour
|
||||
public bool IsColliding { get; set; } = true;
|
||||
public bool HasStarted { get; set; } = false;
|
||||
public bool CanJump { get; set; } = true;
|
||||
public PauseMenu pauseMenu;
|
||||
public AudioSource sfxSource;
|
||||
public bool editMode { get; set; } = false;
|
||||
|
||||
public IGameMode CurrentGameMode { get; set; }
|
||||
public float SpeedMultiplier = 1f;
|
||||
@ -24,9 +28,13 @@ public class Player : MonoBehaviour
|
||||
|
||||
GameObject loaderObj = GameObject.FindGameObjectWithTag("LevelsLoader");
|
||||
if (loaderObj != null)
|
||||
{
|
||||
LevelsLoader = loaderObj.GetComponent<LevelsLoader>();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("LevelsLoader introuvable : Progression désactivée pour ce niveau.");
|
||||
}
|
||||
}
|
||||
|
||||
public void Start()
|
||||
@ -38,18 +46,78 @@ public class Player : MonoBehaviour
|
||||
CurrentGameMode = new NormalGameMode();
|
||||
}
|
||||
|
||||
public bool IsAI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (PlayerPrefs.HasKey("AI"))
|
||||
{
|
||||
return PlayerPrefs.GetInt("AI") == 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
PlayerPrefs.SetInt("AI", value ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (CurrentGameMode != null)
|
||||
CurrentGameMode.Update(this);
|
||||
CurrentGameMode?.Update(this);
|
||||
|
||||
if (LevelsLoader != null)
|
||||
{
|
||||
LevelsLoader.CalculateCurrentProgressionPercent(transform.position);
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
if (pauseMenu.pauseMenu.activeSelf)
|
||||
{
|
||||
pauseMenu.Resume();
|
||||
}
|
||||
else
|
||||
{
|
||||
pauseMenu.Pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
CurrentGameMode?.OnCollisionEnter(this, collision);
|
||||
|
||||
if (editMode && (collision.gameObject.CompareTag("Kill") || collision.gameObject.CompareTag("Win")))
|
||||
{
|
||||
GameObject spawn = new GameObject("AutoSpawnPoint");
|
||||
spawn.transform.position = new Vector3(-16, -3, 0f);
|
||||
transform.position = spawn.transform.position;
|
||||
RigidBody.linearVelocity = Vector2.zero;
|
||||
SpeedMultiplier = 1f;
|
||||
CurrentGameMode = new NormalGameMode();
|
||||
SpriteRenderer.sprite = Resources.Load<Sprite>("Shapes/BaseSquare");
|
||||
return;
|
||||
}
|
||||
|
||||
if (collision.gameObject.CompareTag("Kill"))
|
||||
{
|
||||
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "death"));
|
||||
sfxSource.Play();
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, SceneManager.GetActiveScene().name));
|
||||
|
||||
}
|
||||
|
||||
if (collision.gameObject.CompareTag("Win"))
|
||||
{
|
||||
sfxSource.clip = Resources.Load<AudioClip>(Path.Combine("Sounds", "win"));
|
||||
sfxSource.Play();
|
||||
StartCoroutine(LevelHomeButton.PlaySoundAndLoadScene(sfxSource, "SelectLevelScene"));
|
||||
}
|
||||
}
|
||||
|
||||
public void OnCollisionExit2D(Collision2D collision)
|
||||
@ -79,6 +147,10 @@ public class Player : MonoBehaviour
|
||||
SpeedMultiplier /= 1.5f;
|
||||
Destroy(collision.gameObject);
|
||||
}
|
||||
else if (collision.CompareTag("AICollider") && IsAI)
|
||||
{
|
||||
CurrentGameMode.Jump(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void ChangeGameMode(IGameMode newMode)
|
||||
|
@ -18,25 +18,29 @@ public class PlayerCamera : MonoBehaviour
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (isPlaying)
|
||||
{
|
||||
Player player = playerObject.GetComponent<Player>();
|
||||
if (!isPlaying) return;
|
||||
|
||||
float minYFollow = normalMinYFollow;
|
||||
if (player.CurrentGameMode is ShipGameMode)
|
||||
{
|
||||
minYFollow = shipMinYFollow;
|
||||
}
|
||||
Player player = playerObject.GetComponent<Player>();
|
||||
|
||||
float targetY = initialY;
|
||||
if (playerObject.transform.position.y > minYFollow)
|
||||
{
|
||||
targetY = playerObject.transform.position.y;
|
||||
}
|
||||
// Choix du minY selon le mode de jeu
|
||||
float minYFollow = (player.CurrentGameMode is ShipGameMode)
|
||||
? shipMinYFollow
|
||||
: normalMinYFollow;
|
||||
|
||||
float newY = Mathf.Lerp(transform.position.y, targetY, smoothSpeed * Time.deltaTime);
|
||||
// Calcul de la cible Y
|
||||
float targetY = initialY;
|
||||
if (playerObject.transform.position.y > minYFollow)
|
||||
targetY = playerObject.transform.position.y;
|
||||
|
||||
transform.position = new Vector3(playerObject.transform.position.x, newY, transform.position.z);
|
||||
}
|
||||
// Interpolation douce
|
||||
float newY = Mathf.Lerp(transform.position.y, targetY, smoothSpeed * Time.deltaTime);
|
||||
|
||||
// Clamp pour éviter de descendre sous Y = 0
|
||||
newY = Mathf.Max(newY, 0f);
|
||||
|
||||
// On suit aussi l'axe X du joueur
|
||||
float newX = playerObject.transform.position.x;
|
||||
|
||||
transform.position = new Vector3(newX, newY, transform.position.z);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ public class TestManager : MonoBehaviour
|
||||
public Transform spawnPoint;
|
||||
public GameObject editorUI;
|
||||
public PlayerCamera playerCamera;
|
||||
public AudioSource sfxSource;
|
||||
|
||||
private bool isTesting = false;
|
||||
|
||||
@ -27,6 +28,7 @@ public class TestManager : MonoBehaviour
|
||||
else
|
||||
{
|
||||
gameMode = new NormalGameMode();
|
||||
currentPlayer.editMode = true;
|
||||
currentPlayer.ChangeGameMode(gameMode);
|
||||
currentPlayer.SpeedMultiplier = 0f;
|
||||
|
||||
@ -68,12 +70,17 @@ public class TestManager : MonoBehaviour
|
||||
}
|
||||
|
||||
if (editorUI != null)
|
||||
{
|
||||
Debug.LogError("editor UI null");
|
||||
editorUI.SetActive(false);
|
||||
}
|
||||
|
||||
currentPlayer.transform.position = spawnPoint.position;
|
||||
currentPlayer.transform.rotation = Quaternion.Euler(0f, 0f, 0f);
|
||||
currentPlayer.RigidBody.freezeRotation = true;
|
||||
currentPlayer.RigidBody.linearVelocity = Vector2.zero;
|
||||
currentPlayer.SpeedMultiplier = 1f;
|
||||
currentPlayer.SpriteRenderer.sprite = Resources.Load<Sprite>("Shapes/BaseSquare");
|
||||
// currentPlayer.SpriteRenderer.sprite = Resources.Load<Sprite>("Shapes/BaseSquare");
|
||||
|
||||
currentPlayer.ChangeGameMode(gameMode);
|
||||
isTesting = true;
|
||||
@ -88,7 +95,7 @@ public class TestManager : MonoBehaviour
|
||||
currentPlayer.SpriteRenderer.enabled = true;
|
||||
|
||||
if (currentPlayer.Particle != null)
|
||||
currentPlayer.Particle.Play(); // ✅ Démarrer la particule
|
||||
currentPlayer.Particle.Play(); // Démarrer la particule
|
||||
|
||||
Debug.Log("[TestManager] Test du niveau démarré !");
|
||||
}
|
||||
@ -105,7 +112,7 @@ public class TestManager : MonoBehaviour
|
||||
currentPlayer.SpeedMultiplier = 0f;
|
||||
|
||||
if (currentPlayer.Particle != null)
|
||||
currentPlayer.Particle.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); // ✅ Arrêter proprement
|
||||
currentPlayer.Particle.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); // Arrêter proprement
|
||||
|
||||
if (currentPlayer.SpriteRenderer != null)
|
||||
currentPlayer.SpriteRenderer.enabled = false;
|
||||
|
@ -32,7 +32,7 @@ rectangle "Menu Pause" {
|
||||
|
||||
rectangle "Création de niveaux" {
|
||||
usecase "Créer un nouveau niveau" as CreerNouveauNiveau
|
||||
usecase "Modifier un niveau existante" as ModifierNiveau
|
||||
usecase "Modifier un niveau existant" as ModifierNiveau
|
||||
usecase "Tester un niveau" as TesterNiveau
|
||||
usecase "Exporter un niveau" as ExporterNiveau
|
||||
}
|
||||
|
@ -17,6 +17,17 @@ EditorBuildSettings:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/LevelScene.unity
|
||||
guid: 8c9cfa26abfee488c85f1582747f6a02
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/ImportScene.unity
|
||||
guid: 079203ac02d460d48a1208a03134d373
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/EditorChoiceScene.unity
|
||||
guid: 200c916866fde6f4bb0123b72f22771f
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/SelectLevelToEditScene.unity
|
||||
guid: 2fabb6c6015f46541a57baf21011fa51
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/CreateLevelScene.unity
|
||||
- enabled: 0
|
||||
path: Assets/Scenes/LevelEditorScene.unity
|
||||
guid: 73b983a44d701df4bb6d8ceb94e05a2b
|
||||
|
@ -3,12 +3,12 @@
|
||||
--- !u!19 &1
|
||||
Physics2DSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 5
|
||||
serializedVersion: 6
|
||||
m_Gravity: {x: 0, y: -9.81}
|
||||
m_DefaultMaterial: {fileID: 0}
|
||||
m_VelocityIterations: 8
|
||||
m_PositionIterations: 3
|
||||
m_VelocityThreshold: 1
|
||||
m_BounceThreshold: 1
|
||||
m_MaxLinearCorrection: 0.2
|
||||
m_MaxAngularCorrection: 8
|
||||
m_MaxTranslationSpeed: 100
|
||||
@ -19,6 +19,7 @@ Physics2DSettings:
|
||||
m_LinearSleepTolerance: 0.01
|
||||
m_AngularSleepTolerance: 2
|
||||
m_DefaultContactOffset: 0.01
|
||||
m_ContactThreshold: 0
|
||||
m_JobOptions:
|
||||
serializedVersion: 2
|
||||
useMultithreading: 0
|
||||
@ -39,18 +40,17 @@ Physics2DSettings:
|
||||
m_IslandSolverBodiesPerJob: 50
|
||||
m_IslandSolverContactsPerJob: 50
|
||||
m_SimulationMode: 0
|
||||
m_SimulationLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_MaxSubStepCount: 4
|
||||
m_MinSubStepFPS: 30
|
||||
m_UseSubStepping: 0
|
||||
m_UseSubStepContacts: 0
|
||||
m_QueriesHitTriggers: 1
|
||||
m_QueriesStartInColliders: 1
|
||||
m_CallbacksOnDisable: 1
|
||||
m_ReuseCollisionCallbacks: 1
|
||||
m_AutoSyncTransforms: 0
|
||||
m_AlwaysShowColliders: 0
|
||||
m_ShowColliderSleep: 1
|
||||
m_ShowColliderContacts: 0
|
||||
m_ShowColliderAABB: 0
|
||||
m_ContactArrowScale: 0.2
|
||||
m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
|
||||
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||
m_GizmoOptions: 8
|
||||
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
|
@ -140,7 +140,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: v1.0.0-staging.3
|
||||
bundleVersion: v1.0.0-staging.4
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
|
@ -18,7 +18,7 @@ TagManager:
|
||||
- PortalButtonGroup
|
||||
- BonusBoostSpeed
|
||||
- BonusSlowSpeed
|
||||
- Ground
|
||||
- AICollider
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
@ -4,6 +4,12 @@
|
||||
|
||||
Développement d'une reproduction du jeu [Geometry Dash](https://fr.wikipedia.org/wiki/Geometry_Dash) réalisé dans le cadre de la formation [Ingénieur en Informatique et Systèmes d'Information (SI), CNAM](https://www.itii-alsace.fr/formations/informatique-et-systemes-dinformation-le-cnam/), pour les modules de Programmation Orientée Objet (POO) et de Méthodologie Systèmes d'Informations.
|
||||
|
||||
Afin de tester le jeu, plusieurs `.zip` avec l'exécutable sont disponibles, généré automatiquement grâce au déploiement continu de [GameCI](https://game.ci/), en fonction du système d'exploitation:
|
||||
|
||||
- [Windows](https://github.com/boudji-ludwig-pett/cnam-geometry-dash/releases/download/v1.0.0-staging.4/windows.zip)
|
||||
- [GNU/Linux](https://github.com/boudji-ludwig-pett/cnam-geometry-dash/releases/download/v1.0.0-staging.4/linux.zip)
|
||||
- [macOS](https://github.com/boudji-ludwig-pett/cnam-geometry-dash/releases/download/v1.0.0-staging.4/macOS.zip)
|
||||
|
||||
### Membres du groupe
|
||||
|
||||
- [Djelal BOUDJI](https://github.com/djelalb)
|
||||
|
Reference in New Issue
Block a user