resizable
This commit is contained in:
parent
df70f353d1
commit
72de3c7b42
|
@ -1316,90 +1316,6 @@ SpriteRenderer:
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
--- !u!1 &2671326294020303789
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8411741261202548534}
|
|
||||||
- component: {fileID: 3347665118137351440}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Circle
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &8411741261202548534
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2671326294020303789}
|
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
|
||||||
m_LocalPosition: {x: 1.5, y: -0.25, z: 0}
|
|
||||||
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
|
|
||||||
m_ConstrainProportionsScale: 1
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 5813499711186931250}
|
|
||||||
m_RootOrder: 3
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!212 &3347665118137351440
|
|
||||||
SpriteRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2671326294020303789}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CastShadows: 0
|
|
||||||
m_ReceiveShadows: 0
|
|
||||||
m_DynamicOccludee: 1
|
|
||||||
m_StaticShadowCaster: 0
|
|
||||||
m_MotionVectors: 1
|
|
||||||
m_LightProbeUsage: 1
|
|
||||||
m_ReflectionProbeUsage: 1
|
|
||||||
m_RayTracingMode: 0
|
|
||||||
m_RayTraceProcedural: 0
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
|
||||||
m_StaticBatchInfo:
|
|
||||||
firstSubMesh: 0
|
|
||||||
subMeshCount: 0
|
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
|
||||||
m_ProbeAnchor: {fileID: 0}
|
|
||||||
m_LightProbeVolumeOverride: {fileID: 0}
|
|
||||||
m_ScaleInLightmap: 1
|
|
||||||
m_ReceiveGI: 1
|
|
||||||
m_PreserveUVs: 0
|
|
||||||
m_IgnoreNormalsForChartDetection: 0
|
|
||||||
m_ImportantGI: 0
|
|
||||||
m_StitchLightmapSeams: 1
|
|
||||||
m_SelectedEditorRenderState: 0
|
|
||||||
m_MinimumChartSize: 4
|
|
||||||
m_AutoUVMaxDistance: 0.5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3}
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_FlipX: 0
|
|
||||||
m_FlipY: 0
|
|
||||||
m_DrawMode: 0
|
|
||||||
m_Size: {x: 1, y: 1}
|
|
||||||
m_AdaptiveModeThreshold: 0.5
|
|
||||||
m_SpriteTileMode: 0
|
|
||||||
m_WasSpriteAssigned: 1
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
m_SpriteSortPoint: 0
|
|
||||||
--- !u!1 &2698380409090072979
|
--- !u!1 &2698380409090072979
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1424,7 +1340,7 @@ Transform:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2698380409090072979}
|
m_GameObject: {fileID: 2698380409090072979}
|
||||||
m_LocalRotation: {x: -0, y: 0, z: 0.13052616, w: 0.99144495}
|
m_LocalRotation: {x: 0, y: 0, z: 0.13052616, w: 0.9914449}
|
||||||
m_LocalPosition: {x: -0.135, y: 0.10999999, z: 0}
|
m_LocalPosition: {x: -0.135, y: 0.10999999, z: 0}
|
||||||
m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1}
|
m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
|
@ -3054,7 +2970,6 @@ Transform:
|
||||||
- {fileID: 2619828408818896828}
|
- {fileID: 2619828408818896828}
|
||||||
- {fileID: 4474597943635544359}
|
- {fileID: 4474597943635544359}
|
||||||
- {fileID: 1483397584454175980}
|
- {fileID: 1483397584454175980}
|
||||||
- {fileID: 8411741261202548534}
|
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
@ -3449,8 +3364,9 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
startBeat: 0
|
startBeat: 0
|
||||||
flyType: 0
|
lengthBeat: 0
|
||||||
flyAnim: {fileID: 6799900630987709906}
|
flyAnim: {fileID: 6799900630987709906}
|
||||||
|
wingAnim: {fileID: 4509423242586505778}
|
||||||
--- !u!95 &6799900630987709906
|
--- !u!95 &6799900630987709906
|
||||||
Animator:
|
Animator:
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
|
|
BIN
Assets/Resources/Sprites/Editor/GameIcons/chameleon.png
Normal file
BIN
Assets/Resources/Sprites/Editor/GameIcons/chameleon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
123
Assets/Resources/Sprites/Editor/GameIcons/chameleon.png.meta
Normal file
123
Assets/Resources/Sprites/Editor/GameIcons/chameleon.png.meta
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bbf1cea897518fe41ac7241472e96a8d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
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
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 2
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 256
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -78,58 +78,6 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1102 &-6711584185864509779
|
|
||||||
AnimatorState:
|
|
||||||
serializedVersion: 6
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: moveLoopClose
|
|
||||||
m_Speed: 1
|
|
||||||
m_CycleOffset: 0
|
|
||||||
m_Transitions: []
|
|
||||||
m_StateMachineBehaviours: []
|
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
|
||||||
m_IKOnFeet: 0
|
|
||||||
m_WriteDefaultValues: 1
|
|
||||||
m_Mirror: 0
|
|
||||||
m_SpeedParameterActive: 0
|
|
||||||
m_MirrorParameterActive: 0
|
|
||||||
m_CycleOffsetParameterActive: 0
|
|
||||||
m_TimeParameterActive: 0
|
|
||||||
m_Motion: {fileID: 7400000, guid: 078804f896f79324fa7c793f8dbc4b31, type: 2}
|
|
||||||
m_Tag:
|
|
||||||
m_SpeedParameter:
|
|
||||||
m_MirrorParameter:
|
|
||||||
m_CycleOffsetParameter:
|
|
||||||
m_TimeParameter:
|
|
||||||
--- !u!1102 &-6696898983186624443
|
|
||||||
AnimatorState:
|
|
||||||
serializedVersion: 6
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: fly
|
|
||||||
m_Speed: 1
|
|
||||||
m_CycleOffset: 0
|
|
||||||
m_Transitions: []
|
|
||||||
m_StateMachineBehaviours: []
|
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
|
||||||
m_IKOnFeet: 0
|
|
||||||
m_WriteDefaultValues: 1
|
|
||||||
m_Mirror: 0
|
|
||||||
m_SpeedParameterActive: 0
|
|
||||||
m_MirrorParameterActive: 0
|
|
||||||
m_CycleOffsetParameterActive: 0
|
|
||||||
m_TimeParameterActive: 0
|
|
||||||
m_Motion: {fileID: 7400000, guid: 74aa2d71e2a7a294aa020957525d7817, type: 2}
|
|
||||||
m_Tag:
|
|
||||||
m_SpeedParameter:
|
|
||||||
m_MirrorParameter:
|
|
||||||
m_CycleOffsetParameter:
|
|
||||||
m_TimeParameter:
|
|
||||||
--- !u!1102 &-5922147104933799174
|
--- !u!1102 &-5922147104933799174
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
@ -167,19 +115,7 @@ AnimatorController:
|
||||||
m_AnimatorParameters: []
|
m_AnimatorParameters: []
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
m_Name: Wing Layer
|
m_Name: Base Layer
|
||||||
m_StateMachine: {fileID: 7264832967013319914}
|
|
||||||
m_Mask: {fileID: 0}
|
|
||||||
m_Motions: []
|
|
||||||
m_Behaviours: []
|
|
||||||
m_BlendingMode: 0
|
|
||||||
m_SyncedLayerIndex: -1
|
|
||||||
m_DefaultWeight: 1
|
|
||||||
m_IKPass: 0
|
|
||||||
m_SyncedLayerAffectsTiming: 0
|
|
||||||
m_Controller: {fileID: 9100000}
|
|
||||||
- serializedVersion: 5
|
|
||||||
m_Name: Move Layer
|
|
||||||
m_StateMachine: {fileID: 5269894196936690212}
|
m_StateMachine: {fileID: 5269894196936690212}
|
||||||
m_Mask: {fileID: 0}
|
m_Mask: {fileID: 0}
|
||||||
m_Motions: []
|
m_Motions: []
|
||||||
|
@ -190,14 +126,14 @@ AnimatorController:
|
||||||
m_IKPass: 0
|
m_IKPass: 0
|
||||||
m_SyncedLayerAffectsTiming: 0
|
m_SyncedLayerAffectsTiming: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 9100000}
|
||||||
--- !u!1102 &411134394842004055
|
--- !u!1102 &1004444980128489754
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: idle
|
m_Name: moveEndFar
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions: []
|
m_Transitions: []
|
||||||
|
@ -210,7 +146,7 @@ AnimatorState:
|
||||||
m_MirrorParameterActive: 0
|
m_MirrorParameterActive: 0
|
||||||
m_CycleOffsetParameterActive: 0
|
m_CycleOffsetParameterActive: 0
|
||||||
m_TimeParameterActive: 0
|
m_TimeParameterActive: 0
|
||||||
m_Motion: {fileID: 0}
|
m_Motion: {fileID: 7400000, guid: 2a29ba9845aef114f8b23ab662fda406, type: 2}
|
||||||
m_Tag:
|
m_Tag:
|
||||||
m_SpeedParameter:
|
m_SpeedParameter:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
|
@ -353,7 +289,7 @@ AnimatorStateMachine:
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: Move Layer
|
m_Name: Base Layer
|
||||||
m_ChildStates:
|
m_ChildStates:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 1444428680978530896}
|
m_State: {fileID: 1444428680978530896}
|
||||||
|
@ -382,12 +318,12 @@ AnimatorStateMachine:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -5922147104933799174}
|
m_State: {fileID: -5922147104933799174}
|
||||||
m_Position: {x: 430, y: 0, z: 0}
|
m_Position: {x: 430, y: 0, z: 0}
|
||||||
- serializedVersion: 1
|
|
||||||
m_State: {fileID: -6711584185864509779}
|
|
||||||
m_Position: {x: 650, y: 20, z: 0}
|
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 3574830805167585039}
|
m_State: {fileID: 3574830805167585039}
|
||||||
m_Position: {x: 640, y: -40, z: 0}
|
m_Position: {x: 430, y: -50, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1004444980128489754}
|
||||||
|
m_Position: {x: 210, y: -50, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
@ -424,28 +360,3 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1107 &7264832967013319914
|
|
||||||
AnimatorStateMachine:
|
|
||||||
serializedVersion: 6
|
|
||||||
m_ObjectHideFlags: 1
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_Name: Wing Layer
|
|
||||||
m_ChildStates:
|
|
||||||
- serializedVersion: 1
|
|
||||||
m_State: {fileID: -6696898983186624443}
|
|
||||||
m_Position: {x: 260, y: 110, z: 0}
|
|
||||||
- serializedVersion: 1
|
|
||||||
m_State: {fileID: 411134394842004055}
|
|
||||||
m_Position: {x: 250, y: 10, z: 0}
|
|
||||||
m_ChildStateMachines: []
|
|
||||||
m_AnyStateTransitions: []
|
|
||||||
m_EntryTransitions: []
|
|
||||||
m_StateMachineTransitions: {}
|
|
||||||
m_StateMachineBehaviours: []
|
|
||||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
|
||||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
|
||||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
|
||||||
m_DefaultState: {fileID: -6696898983186624443}
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ AnimatorStateMachine:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -1179836612212821551}
|
m_State: {fileID: -1179836612212821551}
|
||||||
m_Position: {x: 200, y: 0, z: 0}
|
m_Position: {x: 200, y: 0, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 8241254822964275247}
|
||||||
|
m_Position: {x: 240, y: 60, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
@ -70,3 +73,29 @@ AnimatorController:
|
||||||
m_IKPass: 0
|
m_IKPass: 0
|
||||||
m_SyncedLayerAffectsTiming: 0
|
m_SyncedLayerAffectsTiming: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!1102 &8241254822964275247
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: idle
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 0}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
|
|
@ -14,7 +14,23 @@ AnimationClip:
|
||||||
m_RotationCurves: []
|
m_RotationCurves: []
|
||||||
m_CompressedRotationCurves: []
|
m_CompressedRotationCurves: []
|
||||||
m_EulerCurves: []
|
m_EulerCurves: []
|
||||||
m_PositionCurves: []
|
m_PositionCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: {x: 1.5, y: -0.25, z: 0}
|
||||||
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
path:
|
||||||
m_ScaleCurves: []
|
m_ScaleCurves: []
|
||||||
m_FloatCurves: []
|
m_FloatCurves: []
|
||||||
m_PPtrCurves: []
|
m_PPtrCurves: []
|
||||||
|
@ -24,14 +40,21 @@ AnimationClip:
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
m_Extent: {x: 0, y: 0, z: 0}
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
m_ClipBindingConstant:
|
m_ClipBindingConstant:
|
||||||
genericBindings: []
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 0
|
||||||
|
attribute: 1
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 4
|
||||||
|
customType: 0
|
||||||
|
isPPtrCurve: 0
|
||||||
pptrCurveMapping: []
|
pptrCurveMapping: []
|
||||||
m_AnimationClipSettings:
|
m_AnimationClipSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
m_AdditiveReferencePoseTime: 0
|
m_AdditiveReferencePoseTime: 0
|
||||||
m_StartTime: 0
|
m_StartTime: 0
|
||||||
m_StopTime: 1
|
m_StopTime: 0
|
||||||
m_OrientationOffsetY: 0
|
m_OrientationOffsetY: 0
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
|
@ -46,8 +69,65 @@ AnimationClip:
|
||||||
m_KeepOriginalPositionXZ: 0
|
m_KeepOriginalPositionXZ: 0
|
||||||
m_HeightFromFeet: 0
|
m_HeightFromFeet: 0
|
||||||
m_Mirror: 0
|
m_Mirror: 0
|
||||||
m_EditorCurves: []
|
m_EditorCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1.5
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.x
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: -0.25
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.y
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.z
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
m_EulerEditorCurves: []
|
m_EulerEditorCurves: []
|
||||||
m_HasGenericRootTransform: 0
|
m_HasGenericRootTransform: 1
|
||||||
m_HasMotionFloatCurves: 0
|
m_HasMotionFloatCurves: 0
|
||||||
m_Events: []
|
m_Events: []
|
||||||
|
|
|
@ -248,7 +248,7 @@ AnimationClip:
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_HasAdditiveReferencePose: 0
|
m_HasAdditiveReferencePose: 0
|
||||||
m_LoopTime: 1
|
m_LoopTime: 0
|
||||||
m_LoopBlend: 0
|
m_LoopBlend: 0
|
||||||
m_LoopBlendOrientation: 0
|
m_LoopBlendOrientation: 0
|
||||||
m_LoopBlendPositionY: 0
|
m_LoopBlendPositionY: 0
|
||||||
|
|
|
@ -14,24 +14,47 @@ AnimationClip:
|
||||||
m_RotationCurves: []
|
m_RotationCurves: []
|
||||||
m_CompressedRotationCurves: []
|
m_CompressedRotationCurves: []
|
||||||
m_EulerCurves: []
|
m_EulerCurves: []
|
||||||
m_PositionCurves: []
|
m_PositionCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: {x: 5.15, y: 1.6, z: 0}
|
||||||
|
inSlope: {x: 0, y: 0, z: 0}
|
||||||
|
outSlope: {x: 0, y: 0, z: 0}
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
path:
|
||||||
m_ScaleCurves: []
|
m_ScaleCurves: []
|
||||||
m_FloatCurves: []
|
m_FloatCurves: []
|
||||||
m_PPtrCurves: []
|
m_PPtrCurves: []
|
||||||
m_SampleRate: 60
|
m_SampleRate: 30
|
||||||
m_WrapMode: 0
|
m_WrapMode: 0
|
||||||
m_Bounds:
|
m_Bounds:
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
m_Extent: {x: 0, y: 0, z: 0}
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
m_ClipBindingConstant:
|
m_ClipBindingConstant:
|
||||||
genericBindings: []
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 0
|
||||||
|
attribute: 1
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 4
|
||||||
|
customType: 0
|
||||||
|
isPPtrCurve: 0
|
||||||
pptrCurveMapping: []
|
pptrCurveMapping: []
|
||||||
m_AnimationClipSettings:
|
m_AnimationClipSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
m_AdditiveReferencePoseTime: 0
|
m_AdditiveReferencePoseTime: 0
|
||||||
m_StartTime: 0
|
m_StartTime: 0
|
||||||
m_StopTime: 1
|
m_StopTime: 0
|
||||||
m_OrientationOffsetY: 0
|
m_OrientationOffsetY: 0
|
||||||
m_Level: 0
|
m_Level: 0
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
|
@ -46,8 +69,65 @@ AnimationClip:
|
||||||
m_KeepOriginalPositionXZ: 0
|
m_KeepOriginalPositionXZ: 0
|
||||||
m_HeightFromFeet: 0
|
m_HeightFromFeet: 0
|
||||||
m_Mirror: 0
|
m_Mirror: 0
|
||||||
m_EditorCurves: []
|
m_EditorCurves:
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 5.15
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.x
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1.6
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.y
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
|
- curve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 136
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
attribute: m_LocalPosition.z
|
||||||
|
path:
|
||||||
|
classID: 4
|
||||||
|
script: {fileID: 0}
|
||||||
m_EulerEditorCurves: []
|
m_EulerEditorCurves: []
|
||||||
m_HasGenericRootTransform: 0
|
m_HasGenericRootTransform: 1
|
||||||
m_HasMotionFloatCurves: 0
|
m_HasMotionFloatCurves: 0
|
||||||
m_Events: []
|
m_Events: []
|
||||||
|
|
|
@ -22,10 +22,11 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
preFunction = delegate {
|
preFunction = delegate {
|
||||||
var e = eventCaller.currentEntity;
|
var e = eventCaller.currentEntity;
|
||||||
Chameleon.PreSpawnFly(e.beat, 7, (int)Scripts_Chameleon.FlyType.Far);
|
Chameleon.PreSpawnFly(e.beat, e.length - 4, (int)Scripts_Chameleon.FlyType.Far);
|
||||||
if (e["countIn"]) Chameleon.CountIn(e.beat);
|
if (e["countIn"]) Chameleon.CountIn(e.beat);
|
||||||
},
|
},
|
||||||
defaultLength = 8f,
|
defaultLength = 8f,
|
||||||
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("countIn", false, "Count-In"),
|
new Param("countIn", false, "Count-In"),
|
||||||
|
@ -35,10 +36,11 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
preFunction = delegate {
|
preFunction = delegate {
|
||||||
var e = eventCaller.currentEntity;
|
var e = eventCaller.currentEntity;
|
||||||
Chameleon.PreSpawnFly(e.beat, 7, (int)Scripts_Chameleon.FlyType.Close);
|
Chameleon.PreSpawnFly(e.beat, e.length - 4, (int)Scripts_Chameleon.FlyType.Close);
|
||||||
if (e["countIn"]) Chameleon.CountIn(e.beat);
|
if (e["countIn"]) Chameleon.CountIn(e.beat);
|
||||||
},
|
},
|
||||||
defaultLength = 8f,
|
defaultLength = 8f,
|
||||||
|
resizable = true,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
new Param("countIn", false, "Count-In"),
|
new Param("countIn", false, "Count-In"),
|
||||||
|
@ -207,13 +209,21 @@ namespace HeavenStudio.Games
|
||||||
moveEyeTime = 0;
|
moveEyeTime = 0;
|
||||||
if (currentFly is not null)
|
if (currentFly is not null)
|
||||||
{
|
{
|
||||||
if (cond.songPositionInBeatsAsDouble >= currentFly.startBeat)
|
if (cond.songPositionInBeatsAsDouble >= currentFly.startBeat + 1)
|
||||||
{
|
{
|
||||||
Vector3 relative = currentFly.gameObject.transform.InverseTransformPoint(chameleonEye.transform.position);
|
Vector3 relative = currentFly.gameObject.transform.InverseTransformPoint(chameleonEye.transform.position);
|
||||||
float currentAngle = chameleonEye.eulerAngles.z;
|
float currentAngle = chameleonEye.eulerAngles.z;
|
||||||
currentAngle = currentAngle > 180 ? currentAngle - 360 : currentAngle;
|
currentAngle = currentAngle > 180 ? currentAngle - 360 : currentAngle;
|
||||||
float nextAngle = 165 + Mathf.Atan2(relative.y, relative.x) * Mathf.Rad2Deg;
|
float nextAngle = 165 + Mathf.Atan2(relative.y, relative.x) * Mathf.Rad2Deg;
|
||||||
nextAngle = nextAngle > 180 ? nextAngle - 360 : nextAngle;
|
nextAngle = nextAngle > 180 ? nextAngle - 360 : nextAngle;
|
||||||
|
if (currentFly.isFall)
|
||||||
|
{
|
||||||
|
nextAngle = currentFly.flyType switch {
|
||||||
|
FlyType.Far => (nextAngle < -70) ? -70 : nextAngle,
|
||||||
|
FlyType.Close => (nextAngle < -100) ? -100 : nextAngle,
|
||||||
|
_ => throw new System.NotImplementedException()
|
||||||
|
};
|
||||||
|
}
|
||||||
float angle = Mathf.Lerp(currentAngle, nextAngle, 0.05f);
|
float angle = Mathf.Lerp(currentAngle, nextAngle, 0.05f);
|
||||||
chameleonEye.eulerAngles = new Vector3(0, 0, angle);
|
chameleonEye.eulerAngles = new Vector3(0, 0, angle);
|
||||||
}
|
}
|
||||||
|
@ -250,8 +260,10 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public void SpawnFly(double beat, double length, int type)
|
public void SpawnFly(double beat, double length, int type)
|
||||||
{
|
{
|
||||||
|
if (length <= 0) length = 4;
|
||||||
var newFly = Instantiate(baseFly, transform).GetComponent<Fly>();
|
var newFly = Instantiate(baseFly, transform).GetComponent<Fly>();
|
||||||
newFly.startBeat = beat;
|
newFly.startBeat = beat;
|
||||||
|
newFly.lengthBeat = length;
|
||||||
newFly.flyType = (FlyType)type;
|
newFly.flyType = (FlyType)type;
|
||||||
|
|
||||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||||
|
|
|
@ -15,15 +15,17 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
|
|
||||||
public class Fly : MonoBehaviour
|
public class Fly : MonoBehaviour
|
||||||
{
|
{
|
||||||
public double startBeat;
|
public double startBeat, lengthBeat;
|
||||||
private double currentBeat;
|
private double currentBeat;
|
||||||
public FlyType flyType;
|
[System.NonSerialized] public FlyType flyType;
|
||||||
[SerializeField] private Animator flyAnim, wingAnim;
|
[SerializeField] private Animator flyAnim, wingAnim;
|
||||||
|
public bool isFall { get; private set; }
|
||||||
|
|
||||||
private Sound loopSound;
|
private Sound loopSound;
|
||||||
|
|
||||||
float randomAngle = 0;
|
float randomAngle = 0;
|
||||||
Vector2 moveCurrentPos, moveNextPos, moveEndPos;
|
Vector2 moveCurrentPos, moveNextPos, moveEndPos;
|
||||||
|
bool moveFast;
|
||||||
|
|
||||||
private Chameleon game;
|
private Chameleon game;
|
||||||
|
|
||||||
|
@ -50,15 +52,17 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
FlyType.Close => new Vector2(1.5f, -0.25f),
|
FlyType.Close => new Vector2(1.5f, -0.25f),
|
||||||
_ => throw new System.NotImplementedException()
|
_ => throw new System.NotImplementedException()
|
||||||
};
|
};
|
||||||
|
randomAngle = UnityEngine.Random.Range(0, 2 * Mathf.PI);
|
||||||
|
moveNextPos = new Vector2(Mathf.Cos(randomAngle), Mathf.Sin(randomAngle)) + moveEndPos;
|
||||||
|
|
||||||
currentBeat = startBeat;
|
currentBeat = startBeat;
|
||||||
|
|
||||||
loopSound = SoundByte.PlayOneShotGame("chameleon/fly" + typePrefix + "Loop", -1, 1, 1, true);
|
loopSound = SoundByte.PlayOneShotGame("chameleon/fly" + typePrefix + "Loop", -1, 1, 1, true);
|
||||||
MultiSound.Play(
|
MultiSound.Play(
|
||||||
new MultiSound.Sound[] {
|
new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("chameleon/fly" + typePrefix + "1", startBeat + 4),
|
new MultiSound.Sound("chameleon/fly" + typePrefix + "1", startBeat + lengthBeat),
|
||||||
new MultiSound.Sound("chameleon/fly" + typePrefix + "2", startBeat + 5),
|
new MultiSound.Sound("chameleon/fly" + typePrefix + "2", startBeat + lengthBeat + 1),
|
||||||
new MultiSound.Sound("chameleon/fly" + typePrefix + "3", startBeat + 6),
|
new MultiSound.Sound("chameleon/fly" + typePrefix + "3", startBeat + lengthBeat + 2),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -69,10 +73,10 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
// var currentBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
// var currentBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||||
// flyAnim.DoScaledAnimationAsync("move" + typePrefix, 0.5f, (float)((currentBeat - startBeat)/8));
|
// flyAnim.DoScaledAnimationAsync("move" + typePrefix, 0.5f, (float)((currentBeat - startBeat)/8));
|
||||||
// }),
|
// }),
|
||||||
new BeatAction.Action(startBeat + 4, delegate {
|
new BeatAction.Action(startBeat + lengthBeat, delegate {
|
||||||
loopSoundRelease();
|
loopSoundRelease();
|
||||||
}),
|
}),
|
||||||
new BeatAction.Action(startBeat + 7, delegate {
|
new BeatAction.Action(startBeat + lengthBeat + 3, delegate {
|
||||||
if (!flyAnim.enabled)
|
if (!flyAnim.enabled)
|
||||||
{
|
{
|
||||||
flyAnim.enabled = true;
|
flyAnim.enabled = true;
|
||||||
|
@ -87,11 +91,11 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
FlyType.Close => Chameleon.InputAction_Close,
|
FlyType.Close => Chameleon.InputAction_Close,
|
||||||
_ => throw new System.NotImplementedException()
|
_ => throw new System.NotImplementedException()
|
||||||
};
|
};
|
||||||
game.ScheduleInput(startBeat + 4, 3, InputAction, JustCatch, MissCatch, Empty);
|
game.ScheduleInput(startBeat + lengthBeat, 3, InputAction, JustCatch, MissCatch, Empty);
|
||||||
|
|
||||||
BeatAction.New(this, new List<BeatAction.Action>()
|
BeatAction.New(this, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
new BeatAction.Action(startBeat + 10, delegate {
|
new BeatAction.Action(startBeat + lengthBeat + 6, delegate {
|
||||||
Destroy();
|
Destroy();
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
@ -104,28 +108,30 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
{
|
{
|
||||||
if (!flyAnim.enabled)
|
if (!flyAnim.enabled)
|
||||||
{
|
{
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, 0.5, ignoreSwing: true);
|
float startBeatPosition = Conductor.instance.GetPositionFromBeat(startBeat, 2, ignoreSwing: true);
|
||||||
|
|
||||||
if (normalizedBeat <= 1)
|
if (startBeatPosition <= 1)
|
||||||
{
|
{
|
||||||
transform.position = Vector2.Lerp(moveCurrentPos, moveEndPos, normalizedBeat);
|
startBeatPosition = (startBeatPosition < 0.5) ? 0 : startBeatPosition * 2 - 1;
|
||||||
|
transform.position = Vector2.Lerp(moveCurrentPos, moveNextPos, startBeatPosition);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
normalizedBeat = Conductor.instance.GetPositionFromBeat(currentBeat, 0.25, ignoreSwing: true);
|
float currentBeatPosition = Conductor.instance.GetPositionFromBeat(currentBeat, moveFast ? 0.17: 0.5, ignoreSwing: true);;
|
||||||
if (normalizedBeat >= 1)
|
if (currentBeatPosition > 1)
|
||||||
{
|
{
|
||||||
|
if (startBeatPosition > 1.5) moveFast = true;
|
||||||
|
|
||||||
currentBeat = cond.songPositionInBeatsAsDouble;
|
currentBeat = cond.songPositionInBeatsAsDouble;
|
||||||
moveCurrentPos = moveNextPos;
|
moveCurrentPos = moveNextPos;
|
||||||
randomAngle = randomAngle + UnityEngine.Random.Range(1f, 1.5f * Mathf.PI);
|
randomAngle = randomAngle + UnityEngine.Random.Range(0.7f, 1.3f * Mathf.PI);
|
||||||
moveNextPos = new Vector2(Mathf.Cos(randomAngle), Mathf.Sin(randomAngle)) + moveEndPos;
|
moveNextPos = (moveFast ? 0.5f : 1) * new Vector2(Mathf.Cos(randomAngle), Mathf.Sin(randomAngle)) + moveEndPos;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float newPosX = EasingFunction.EaseInOutSine(moveCurrentPos.x, moveNextPos.x, normalizedBeat);
|
float newPosX = EasingFunction.EaseInOutSine(moveCurrentPos.x, moveNextPos.x, currentBeatPosition);
|
||||||
float newPosY = EasingFunction.EaseInOutSine(moveCurrentPos.y, moveNextPos.y, normalizedBeat);
|
float newPosY = EasingFunction.EaseInOutSine(moveCurrentPos.y, moveNextPos.y, currentBeatPosition);
|
||||||
transform.position = new Vector2(newPosX, newPosY);
|
transform.position = new Vector2(newPosX, newPosY);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -144,17 +150,18 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
game.chameleonAnim.DoScaledAnimationAsync("tongue" + typePrefix, 0.5f);
|
game.chameleonAnim.DoScaledAnimationAsync("tongue" + typePrefix, 0.5f);
|
||||||
if (state <= -1f || state >= 1f)
|
if (state <= -1f || state >= 1f)
|
||||||
{
|
{
|
||||||
|
isFall = true;
|
||||||
flyAnim.DoScaledAnimationAsync("fall" + typePrefix, 0.5f);
|
flyAnim.DoScaledAnimationAsync("fall" + typePrefix, 0.5f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
game.currentFly = null;
|
game.currentFly = null;
|
||||||
SoundByte.PlayOneShotGame("chameleon/eatCatch");
|
SoundByte.PlayOneShotGame("chameleon/eatCatch");
|
||||||
SoundByte.PlayOneShotGame("chameleon/eatGulp", startBeat + 7.25);
|
SoundByte.PlayOneShotGame("chameleon/eatGulp", startBeat + lengthBeat + 3.25);
|
||||||
wingAnim.Play("idle", 0, 0);
|
wingAnim.Play("idle", 0, 0);
|
||||||
flyAnim.DoScaledAnimationAsync("catch" + typePrefix, 0.5f);
|
flyAnim.DoScaledAnimationAsync("catch" + typePrefix, 0.5f);
|
||||||
BeatAction.New(game, new List<BeatAction.Action>()
|
BeatAction.New(game, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
new BeatAction.Action(startBeat + 7.25, delegate {
|
new BeatAction.Action(startBeat + lengthBeat + 3.25, delegate {
|
||||||
game.chameleonAnim.DoScaledAnimationAsync("gurp", 0.5f);
|
game.chameleonAnim.DoScaledAnimationAsync("gurp", 0.5f);
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
@ -185,7 +192,7 @@ namespace HeavenStudio.Games.Scripts_Chameleon
|
||||||
|
|
||||||
private void Destroy()
|
private void Destroy()
|
||||||
{
|
{
|
||||||
game.currentFly = null;
|
if (game.currentFly == this) game.currentFly = null;
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue