Fallyan :(
This commit is contained in:
parent
a61b10ca3a
commit
1c8000c581
|
|
@ -84,6 +84,60 @@ SpriteRenderer:
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &142440390168805750
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2747914681378034359}
|
||||||
|
- component: {fileID: 4668342034789925710}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: playYanFall
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &2747914681378034359
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 142440390168805750}
|
||||||
|
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: 6493820165791078172}
|
||||||
|
m_Father: {fileID: 9016694733661613840}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!95 &4668342034789925710
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 142440390168805750}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: f14668a359da86d41b7c37f7bfcd9bee, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_StabilizeFeet: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorStateOnDisable: 0
|
||||||
|
m_WriteDefaultValuesOnDisable: 0
|
||||||
--- !u!1 &1815905863429998752
|
--- !u!1 &1815905863429998752
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -116,6 +170,7 @@ Transform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 6382310734157045642}
|
- {fileID: 6382310734157045642}
|
||||||
- {fileID: 5627634713630652290}
|
- {fileID: 5627634713630652290}
|
||||||
|
- {fileID: 2747914681378034359}
|
||||||
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}
|
||||||
|
|
@ -132,6 +187,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
platform: {fileID: 8602790381015410525}
|
platform: {fileID: 8602790381015410525}
|
||||||
|
fallYan: {fileID: 142440390168805750}
|
||||||
--- !u!95 &4653690538679061971
|
--- !u!95 &4653690538679061971
|
||||||
Animator:
|
Animator:
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
|
|
@ -237,6 +293,90 @@ SpriteRenderer:
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &3753066587449230801
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6493820165791078172}
|
||||||
|
- component: {fileID: 7035386695832814852}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Sprite
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6493820165791078172
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3753066587449230801}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1.02, y: 5.67, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 2747914681378034359}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &7035386695832814852
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3753066587449230801}
|
||||||
|
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: -2087613087, guid: 425aa48453840844d9f049d7ebd849ce, 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.42, y: 2.94}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
--- !u!1 &4717417375749839996
|
--- !u!1 &4717417375749839996
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!74 &7400000
|
||||||
|
AnimationClip:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: FallIdle
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Legacy: 0
|
||||||
|
m_Compressed: 0
|
||||||
|
m_UseHighQualityCurve: 1
|
||||||
|
m_RotationCurves: []
|
||||||
|
m_CompressedRotationCurves: []
|
||||||
|
m_EulerCurves: []
|
||||||
|
m_PositionCurves: []
|
||||||
|
m_ScaleCurves: []
|
||||||
|
m_FloatCurves: []
|
||||||
|
m_PPtrCurves:
|
||||||
|
- curve:
|
||||||
|
- time: 0
|
||||||
|
value: {fileID: -2087613087, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
- time: 0.083333336
|
||||||
|
value: {fileID: 1736942892, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
- time: 0.16666667
|
||||||
|
value: {fileID: 1997566507, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
- time: 0.25
|
||||||
|
value: {fileID: 1997566507, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
attribute: m_Sprite
|
||||||
|
path: Sprite
|
||||||
|
classID: 212
|
||||||
|
script: {fileID: 0}
|
||||||
|
m_SampleRate: 60
|
||||||
|
m_WrapMode: 0
|
||||||
|
m_Bounds:
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
|
m_ClipBindingConstant:
|
||||||
|
genericBindings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
path: 850496168
|
||||||
|
attribute: 0
|
||||||
|
script: {fileID: 0}
|
||||||
|
typeID: 212
|
||||||
|
customType: 23
|
||||||
|
isPPtrCurve: 1
|
||||||
|
pptrCurveMapping:
|
||||||
|
- {fileID: -2087613087, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
- {fileID: 1736942892, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
- {fileID: 1997566507, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
- {fileID: 1997566507, guid: 425aa48453840844d9f049d7ebd849ce, type: 3}
|
||||||
|
m_AnimationClipSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||||
|
m_AdditiveReferencePoseTime: 0
|
||||||
|
m_StartTime: 0
|
||||||
|
m_StopTime: 0.26666668
|
||||||
|
m_OrientationOffsetY: 0
|
||||||
|
m_Level: 0
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_HasAdditiveReferencePose: 0
|
||||||
|
m_LoopTime: 1
|
||||||
|
m_LoopBlend: 0
|
||||||
|
m_LoopBlendOrientation: 0
|
||||||
|
m_LoopBlendPositionY: 0
|
||||||
|
m_LoopBlendPositionXZ: 0
|
||||||
|
m_KeepOriginalOrientation: 0
|
||||||
|
m_KeepOriginalPositionY: 1
|
||||||
|
m_KeepOriginalPositionXZ: 0
|
||||||
|
m_HeightFromFeet: 0
|
||||||
|
m_Mirror: 0
|
||||||
|
m_EditorCurves: []
|
||||||
|
m_EulerEditorCurves: []
|
||||||
|
m_HasGenericRootTransform: 0
|
||||||
|
m_HasMotionFloatCurves: 0
|
||||||
|
m_Events: []
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8acb883da6f2b2e419891d84026c3df9
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1102 &-6580808414806314879
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: FallIdle
|
||||||
|
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: 8acb883da6f2b2e419891d84026c3df9, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &-409956144612154501
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: -6580808414806314879}
|
||||||
|
m_Position: {x: 200, y: 0, 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: -6580808414806314879}
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: playYanFall
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters: []
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: -409956144612154501}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f14668a359da86d41b7c37f7bfcd9bee
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 9100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -336,7 +336,7 @@ TextureImporter:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: NightWalkGBA_11
|
name: fall1
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 967
|
x: 967
|
||||||
|
|
@ -357,7 +357,7 @@ TextureImporter:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: NightWalkGBA_12
|
name: fall2
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 1191
|
x: 1191
|
||||||
|
|
@ -378,7 +378,7 @@ TextureImporter:
|
||||||
edges: []
|
edges: []
|
||||||
weights: []
|
weights: []
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
name: NightWalkGBA_13
|
name: fall3
|
||||||
rect:
|
rect:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
x: 1437
|
x: 1437
|
||||||
|
|
@ -1610,9 +1610,6 @@ TextureImporter:
|
||||||
NightWalkGBA_0: 130521762
|
NightWalkGBA_0: 130521762
|
||||||
NightWalkGBA_1: 1507133511
|
NightWalkGBA_1: 1507133511
|
||||||
NightWalkGBA_10: 379567741
|
NightWalkGBA_10: 379567741
|
||||||
NightWalkGBA_11: -2087613087
|
|
||||||
NightWalkGBA_12: 1736942892
|
|
||||||
NightWalkGBA_13: 1997566507
|
|
||||||
NightWalkGBA_14: -2114634637
|
NightWalkGBA_14: -2114634637
|
||||||
NightWalkGBA_15: 950189746
|
NightWalkGBA_15: 950189746
|
||||||
NightWalkGBA_16: 1245348893
|
NightWalkGBA_16: 1245348893
|
||||||
|
|
@ -1663,6 +1660,9 @@ TextureImporter:
|
||||||
bp: 529839015
|
bp: 529839015
|
||||||
br: 592522720
|
br: 592522720
|
||||||
by: 2115022471
|
by: 2115022471
|
||||||
|
fall1: -2087613087
|
||||||
|
fall2: 1736942892
|
||||||
|
fall3: 1997566507
|
||||||
jumpImpact: -938550924
|
jumpImpact: -938550924
|
||||||
jumplat2: 2115410046
|
jumplat2: 2115410046
|
||||||
jumplat3: -199434903
|
jumplat3: -199434903
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,19 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
private bool canKick;
|
private bool canKick;
|
||||||
private bool doFillStartSound = false;
|
private bool doFillStartSound = false;
|
||||||
|
|
||||||
|
private PlayerActionEvent inputEvent;
|
||||||
|
private bool stopped;
|
||||||
|
private Sound kickSound;
|
||||||
|
[SerializeField] private GameObject fallYan;
|
||||||
|
|
||||||
public void StartInput(double beat, double hitBeat)
|
public void StartInput(double beat, double hitBeat)
|
||||||
{
|
{
|
||||||
if (game == null) game = AgbNightWalk.instance;
|
if (game == null) game = AgbNightWalk.instance;
|
||||||
lastAdditionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat);
|
lastAdditionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat);
|
||||||
additionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat + 1);
|
additionalHeightInUnits = game.FindHeightUnitsAtBeat(hitBeat + 1);
|
||||||
additionalHeight = lastAdditionalHeightInUnits * handler.heightAmount;
|
additionalHeight = lastAdditionalHeightInUnits * handler.heightAmount;
|
||||||
platform.SetActive(lastAdditionalHeightInUnits == additionalHeightInUnits);
|
bool nextPlatformIsSameHeight = lastAdditionalHeightInUnits == additionalHeightInUnits;
|
||||||
|
platform.SetActive(nextPlatformIsSameHeight);
|
||||||
startBeat = beat;
|
startBeat = beat;
|
||||||
endBeat = hitBeat;
|
endBeat = hitBeat;
|
||||||
if (game.platformTypes.ContainsKey(hitBeat))
|
if (game.platformTypes.ContainsKey(hitBeat))
|
||||||
|
|
@ -64,36 +70,47 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
{
|
{
|
||||||
if (game.ShouldNotJumpOnBeat(endBeat))
|
if (game.ShouldNotJumpOnBeat(endBeat))
|
||||||
{
|
{
|
||||||
AgbNightWalk.instance.ScheduleUserInput(startBeat, endBeat - startBeat, InputType.STANDARD_DOWN, Just, Miss, Empty);
|
inputEvent = AgbNightWalk.instance.ScheduleUserInput(startBeat, endBeat - startBeat, InputType.STANDARD_DOWN, Just, Miss, Empty);
|
||||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
if (nextPlatformIsSameHeight)
|
||||||
{
|
{
|
||||||
new BeatAction.Action(endBeat, delegate
|
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
if (GameManager.instance.autoplay)
|
new BeatAction.Action(endBeat, delegate
|
||||||
{
|
{
|
||||||
game.playYan.Walk();
|
if (GameManager.instance.autoplay && !stopped)
|
||||||
}
|
{
|
||||||
}),
|
game.playYan.Walk();
|
||||||
new BeatAction.Action(endBeat + 0.5, delegate
|
}
|
||||||
{
|
}),
|
||||||
if (GameManager.instance.autoplay)
|
new BeatAction.Action(endBeat + 0.5, delegate
|
||||||
{
|
{
|
||||||
anim.DoScaledAnimationAsync("Note", 0.5f);
|
if (GameManager.instance.autoplay && !stopped)
|
||||||
SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type);
|
{
|
||||||
}
|
anim.DoScaledAnimationAsync("Note", 0.5f);
|
||||||
})
|
SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type);
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AgbNightWalk.instance.ScheduleInput(startBeat, endBeat - startBeat, InputType.STANDARD_DOWN, Just, Miss, Empty);
|
inputEvent = AgbNightWalk.instance.ScheduleInput(startBeat, endBeat - startBeat, InputType.STANDARD_DOWN, Just, Miss, Empty);
|
||||||
}
|
}
|
||||||
SoundByte.PlayOneShotGame("nightWalkAgb/boxKick", endBeat);
|
if (nextPlatformIsSameHeight)
|
||||||
canKick = true;
|
|
||||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
|
||||||
{
|
{
|
||||||
new BeatAction.Action(endBeat, delegate { if (canKick) anim.Play("Kick", 0, 0); })
|
kickSound = SoundByte.PlayOneShotGame("nightWalkAgb/boxKick", endBeat);
|
||||||
});
|
canKick = true;
|
||||||
|
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||||
|
{
|
||||||
|
new BeatAction.Action(endBeat, delegate { if (canKick && !stopped) anim.Play("Kick", 0, 0); })
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -109,19 +126,29 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
var cond = Conductor.instance;
|
var cond = Conductor.instance;
|
||||||
if (cond.isPlaying && !cond.isPaused)
|
if (cond.isPlaying && !cond.isPaused)
|
||||||
{
|
{
|
||||||
float normalizedBeat = cond.GetPositionFromBeat(startBeat, endBeat - startBeat);
|
if (!stopped)
|
||||||
|
|
||||||
float newPosX = Mathf.LerpUnclamped(handler.playerXPos + (float)((endBeat - startBeat) * handler.platformDistance), handler.playerXPos, normalizedBeat);
|
|
||||||
|
|
||||||
transform.localPosition = new Vector3(newPosX, handler.defaultYPos + additionalHeight);
|
|
||||||
|
|
||||||
if (cond.songPositionInBeats > endBeat + (handler.platformCount * 0.5f))
|
|
||||||
{
|
{
|
||||||
ResetInput();
|
float normalizedBeat = cond.GetPositionFromBeat(startBeat, endBeat - startBeat);
|
||||||
|
|
||||||
|
float newPosX = Mathf.LerpUnclamped(handler.playerXPos + (float)((endBeat - startBeat) * handler.platformDistance), handler.playerXPos, normalizedBeat);
|
||||||
|
|
||||||
|
transform.localPosition = new Vector3(newPosX, handler.defaultYPos + additionalHeight);
|
||||||
|
|
||||||
|
if (cond.songPositionInBeats > endBeat + (handler.platformCount * 0.5f))
|
||||||
|
{
|
||||||
|
ResetInput();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
stopped = true;
|
||||||
|
if (inputEvent != null) inputEvent.Disable();
|
||||||
|
if (kickSound != null) kickSound.Delete();
|
||||||
|
}
|
||||||
|
|
||||||
private void ResetInput()
|
private void ResetInput()
|
||||||
{
|
{
|
||||||
double newStartBeat = endBeat + (handler.platformCount * 0.5f);
|
double newStartBeat = endBeat + (handler.platformCount * 0.5f);
|
||||||
|
|
@ -155,12 +182,22 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
|
|
||||||
private void Miss(PlayerActionEvent caller)
|
private void Miss(PlayerActionEvent caller)
|
||||||
{
|
{
|
||||||
game.playYan.Walk();
|
if (platform.activeSelf)
|
||||||
SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type, caller.timer + caller.startBeat + 0.5);
|
|
||||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
|
||||||
{
|
{
|
||||||
new BeatAction.Action(caller.timer + caller.startBeat + 0.5, delegate { anim.DoScaledAnimationAsync("Note", 0.5f); })
|
game.playYan.Walk();
|
||||||
});
|
SoundByte.PlayOneShotGame("nightWalkAgb/open" + (int)type, caller.timer + caller.startBeat + 0.5);
|
||||||
|
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||||
|
{
|
||||||
|
new BeatAction.Action(caller.timer + caller.startBeat + 0.5, delegate { anim.DoScaledAnimationAsync("Note", 0.5f); })
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
handler.StopAll();
|
||||||
|
SoundByte.PlayOneShotGame("nightWalkAgb/wot");
|
||||||
|
game.playYan.Hide();
|
||||||
|
fallYan.SetActive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Empty(PlayerActionEvent caller) { }
|
private void Empty(PlayerActionEvent caller) { }
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
private float lastHeight = 0;
|
private float lastHeight = 0;
|
||||||
private float heightToRaiseTo = 0;
|
private float heightToRaiseTo = 0;
|
||||||
private double raiseBeat = -1;
|
private double raiseBeat = -1;
|
||||||
|
[NonSerialized] public List<AgbPlatform> allPlatforms = new();
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
|
@ -33,6 +34,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
for (int i = 0; i < platformCount; i++)
|
for (int i = 0; i < platformCount; i++)
|
||||||
{
|
{
|
||||||
AgbPlatform platform = Instantiate(platformRef, transform);
|
AgbPlatform platform = Instantiate(platformRef, transform);
|
||||||
|
allPlatforms.Add(platform);
|
||||||
platform.handler = this;
|
platform.handler = this;
|
||||||
platform.StartInput(game.countInBeat + i + 8 - (platformCount * 0.5), game.countInBeat + i + 8);
|
platform.StartInput(game.countInBeat + i + 8 - (platformCount * 0.5), game.countInBeat + i + 8);
|
||||||
platform.gameObject.SetActive(true);
|
platform.gameObject.SetActive(true);
|
||||||
|
|
@ -43,6 +45,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
for (int i = 0; i < platformCount; i++)
|
for (int i = 0; i < platformCount; i++)
|
||||||
{
|
{
|
||||||
AgbPlatform platform = Instantiate(platformRef, transform);
|
AgbPlatform platform = Instantiate(platformRef, transform);
|
||||||
|
allPlatforms.Add(platform);
|
||||||
platform.handler = this;
|
platform.handler = this;
|
||||||
platform.StartInput(beat, Math.Ceiling(beat) + i - platformCount);
|
platform.StartInput(beat, Math.Ceiling(beat) + i - platformCount);
|
||||||
platform.gameObject.SetActive(true);
|
platform.gameObject.SetActive(true);
|
||||||
|
|
@ -67,6 +70,14 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void StopAll()
|
||||||
|
{
|
||||||
|
foreach (var platform in allPlatforms)
|
||||||
|
{
|
||||||
|
platform.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void RaiseHeight(double beat, int lastUnits, int currentUnits)
|
public void RaiseHeight(double beat, int lastUnits, int currentUnits)
|
||||||
{
|
{
|
||||||
raiseBeat = beat;
|
raiseBeat = beat;
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,11 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
|
||||||
balloon.DoNormalizedAnimation("Pop", 1);
|
balloon.DoNormalizedAnimation("Pop", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Hide()
|
||||||
|
{
|
||||||
|
anim.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue