bear bop + cut + whiff visuals implemented
This commit is contained in:
parent
deeb638be6
commit
b8a844530f
|
|
@ -1774,7 +1774,7 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 32640a26a175a5d4baa5ba61b5446e33, type: 3}
|
m_Script: {fileID: 11500000, guid: 32640a26a175a5d4baa5ba61b5446e33, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_anim: {fileID: 0}
|
_anim: {fileID: 4680509007873141790}
|
||||||
--- !u!95 &4680509007873141790
|
--- !u!95 &4680509007873141790
|
||||||
Animator:
|
Animator:
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@ AnimatorState:
|
||||||
m_Name: BeastCut
|
m_Name: BeastCut
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions: []
|
m_Transitions:
|
||||||
|
- {fileID: -310257695249618307}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
m_IKOnFeet: 0
|
m_IKOnFeet: 0
|
||||||
|
|
@ -52,32 +53,28 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1102 &-6629927776154218313
|
--- !u!1101 &-7380376842307841197
|
||||||
AnimatorState:
|
AnimatorStateTransition:
|
||||||
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: BeastHuh
|
m_Name:
|
||||||
m_Speed: 1
|
m_Conditions: []
|
||||||
m_CycleOffset: 0
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_Transitions: []
|
m_DstState: {fileID: 5837131744991549186}
|
||||||
m_StateMachineBehaviours: []
|
m_Solo: 0
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Mute: 0
|
||||||
m_IKOnFeet: 0
|
m_IsExit: 0
|
||||||
m_WriteDefaultValues: 1
|
serializedVersion: 3
|
||||||
m_Mirror: 0
|
m_TransitionDuration: 0
|
||||||
m_SpeedParameterActive: 0
|
m_TransitionOffset: 0
|
||||||
m_MirrorParameterActive: 0
|
m_ExitTime: 1
|
||||||
m_CycleOffsetParameterActive: 0
|
m_HasExitTime: 1
|
||||||
m_TimeParameterActive: 0
|
m_HasFixedDuration: 1
|
||||||
m_Motion: {fileID: 0}
|
m_InterruptionSource: 0
|
||||||
m_Tag:
|
m_OrderedInterruption: 1
|
||||||
m_SpeedParameter:
|
m_CanTransitionToSelf: 1
|
||||||
m_MirrorParameter:
|
|
||||||
m_CycleOffsetParameter:
|
|
||||||
m_TimeParameter:
|
|
||||||
--- !u!1107 &-1674582069573944675
|
--- !u!1107 &-1674582069573944675
|
||||||
AnimatorStateMachine:
|
AnimatorStateMachine:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
|
@ -92,34 +89,28 @@ AnimatorStateMachine:
|
||||||
m_Position: {x: 200, y: 0, z: 0}
|
m_Position: {x: 200, y: 0, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 4188533250333047070}
|
m_State: {fileID: 4188533250333047070}
|
||||||
m_Position: {x: 235, y: 65, z: 0}
|
m_Position: {x: 320, y: -130, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -8280373705725307176}
|
m_State: {fileID: -8280373705725307176}
|
||||||
m_Position: {x: 270, y: 130, z: 0}
|
m_Position: {x: 500, y: -60, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 149483240485607696}
|
m_State: {fileID: 149483240485607696}
|
||||||
m_Position: {x: 305, y: 195, z: 0}
|
m_Position: {x: 510, y: 20, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 1406334409964640660}
|
m_State: {fileID: 1406334409964640660}
|
||||||
m_Position: {x: 340, y: 260, z: 0}
|
m_Position: {x: 320, y: 80, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -8311457463122348759}
|
m_State: {fileID: -8311457463122348759}
|
||||||
m_Position: {x: 375, y: 325, z: 0}
|
m_Position: {x: 570, y: 180, z: 0}
|
||||||
- serializedVersion: 1
|
|
||||||
m_State: {fileID: -6629927776154218313}
|
|
||||||
m_Position: {x: 410, y: 390, z: 0}
|
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 6337212225718637190}
|
m_State: {fileID: 6337212225718637190}
|
||||||
m_Position: {x: 445, y: 455, z: 0}
|
m_Position: {x: 340, y: 360, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 3952486420741322194}
|
m_State: {fileID: 3952486420741322194}
|
||||||
m_Position: {x: 480, y: 520, z: 0}
|
m_Position: {x: 570, y: 360, z: 0}
|
||||||
- serializedVersion: 1
|
|
||||||
m_State: {fileID: 9178769677766401103}
|
|
||||||
m_Position: {x: 515, y: 585, z: 0}
|
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 7127408352164357007}
|
m_State: {fileID: 7127408352164357007}
|
||||||
m_Position: {x: 550, y: 650, z: 0}
|
m_Position: {x: 570, y: 260, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
|
@ -130,6 +121,28 @@ AnimatorStateMachine:
|
||||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
m_DefaultState: {fileID: 5837131744991549186}
|
m_DefaultState: {fileID: 5837131744991549186}
|
||||||
|
--- !u!1101 &-310257695249618307
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions: []
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 5837131744991549186}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 1
|
||||||
|
m_HasExitTime: 1
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
--- !u!91 &9100000
|
--- !u!91 &9100000
|
||||||
AnimatorController:
|
AnimatorController:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -162,7 +175,8 @@ AnimatorState:
|
||||||
m_Name: BeastWhiff
|
m_Name: BeastWhiff
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions: []
|
m_Transitions:
|
||||||
|
- {fileID: 8103048759882901255}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
m_IKOnFeet: 0
|
m_IKOnFeet: 0
|
||||||
|
|
@ -188,7 +202,8 @@ AnimatorState:
|
||||||
m_Name: BeastCutMid
|
m_Name: BeastCutMid
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions: []
|
m_Transitions:
|
||||||
|
- {fileID: 3711997017831868963}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
m_IKOnFeet: 0
|
m_IKOnFeet: 0
|
||||||
|
|
@ -204,6 +219,28 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
|
--- !u!1101 &3711997017831868963
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions: []
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: 5837131744991549186}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 1
|
||||||
|
m_HasExitTime: 1
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
--- !u!1102 &3952486420741322194
|
--- !u!1102 &3952486420741322194
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
|
|
@ -240,7 +277,8 @@ AnimatorState:
|
||||||
m_Name: BeastBop
|
m_Name: BeastBop
|
||||||
m_Speed: 1
|
m_Speed: 1
|
||||||
m_CycleOffset: 0
|
m_CycleOffset: 0
|
||||||
m_Transitions: []
|
m_Transitions:
|
||||||
|
- {fileID: -7380376842307841197}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
m_IKOnFeet: 0
|
m_IKOnFeet: 0
|
||||||
|
|
@ -334,29 +372,25 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
--- !u!1102 &9178769677766401103
|
--- !u!1101 &8103048759882901255
|
||||||
AnimatorState:
|
AnimatorStateTransition:
|
||||||
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: BeastSigh
|
m_Name:
|
||||||
m_Speed: 1
|
m_Conditions: []
|
||||||
m_CycleOffset: 0
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_Transitions: []
|
m_DstState: {fileID: 5837131744991549186}
|
||||||
m_StateMachineBehaviours: []
|
m_Solo: 0
|
||||||
m_Position: {x: 50, y: 50, z: 0}
|
m_Mute: 0
|
||||||
m_IKOnFeet: 0
|
m_IsExit: 0
|
||||||
m_WriteDefaultValues: 1
|
serializedVersion: 3
|
||||||
m_Mirror: 0
|
m_TransitionDuration: 0
|
||||||
m_SpeedParameterActive: 0
|
m_TransitionOffset: 0
|
||||||
m_MirrorParameterActive: 0
|
m_ExitTime: 1
|
||||||
m_CycleOffsetParameterActive: 0
|
m_HasExitTime: 1
|
||||||
m_TimeParameterActive: 0
|
m_HasFixedDuration: 1
|
||||||
m_Motion: {fileID: 7400000, guid: 7764ee7dc8d498148b01e4d98ce2bc84, type: 2}
|
m_InterruptionSource: 0
|
||||||
m_Tag:
|
m_OrderedInterruption: 1
|
||||||
m_SpeedParameter:
|
m_CanTransitionToSelf: 1
|
||||||
m_MirrorParameter:
|
|
||||||
m_CycleOffsetParameter:
|
|
||||||
m_TimeParameter:
|
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,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
|
||||||
|
|
|
||||||
|
|
@ -797,7 +797,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
|
||||||
|
|
|
||||||
|
|
@ -908,7 +908,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
|
||||||
|
|
|
||||||
|
|
@ -641,7 +641,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
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,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
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,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
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,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
|
||||||
|
|
|
||||||
|
|
@ -996,7 +996,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
|
||||||
|
|
|
||||||
|
|
@ -725,7 +725,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
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,35 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
[Header("Components")]
|
[Header("Components")]
|
||||||
[SerializeField] private Animator _anim;
|
[SerializeField] private Animator _anim;
|
||||||
|
|
||||||
public void SwingWhiff()
|
public void SwingWhiff(bool sound = true, bool force = false)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("lumbearjack/swing", -1, SoundByte.GetPitchFromCents(Random.Range(-200, 201), false));
|
if (_anim.IsPlayingAnimationNames("BeastWhiff", "BeastCut", "BeastCutMid", "BeastHalfCut") && !force) return;
|
||||||
|
if (sound) SoundByte.PlayOneShotGame("lumbearjack/swing", -1, SoundByte.GetPitchFromCents(Random.Range(-200, 201), false));
|
||||||
|
_anim.DoScaledAnimationAsync("BeastWhiff", 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Cut(double beat, bool huh, bool huhL)
|
||||||
|
{
|
||||||
|
_anim.DoScaledAnimationAsync(huh ? "BeastHalfCut" : "BeastCut", 0.5f);
|
||||||
|
if (!huh) return;
|
||||||
|
BeatAction.New(this, new()
|
||||||
|
{
|
||||||
|
new(beat + 1, delegate
|
||||||
|
{
|
||||||
|
_anim.DoScaledAnimationAsync(huhL ? "BeastHuhL" : "BeastHuhR", 0.5f);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CutMid()
|
||||||
|
{
|
||||||
|
_anim.DoScaledAnimationAsync("BeastCutMid", 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Bop()
|
||||||
|
{
|
||||||
|
if (_anim.IsPlayingAnimationNames("BeastWhiff")) return;
|
||||||
|
_anim.DoScaledAnimationAsync("BeastBop", 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
{
|
{
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f || state <= -1f)
|
||||||
{
|
{
|
||||||
// Barely
|
_bear.SwingWhiff(false, true);
|
||||||
|
Miss(caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -37,13 +38,15 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
_ => throw new System.NotImplementedException(),
|
_ => throw new System.NotImplementedException(),
|
||||||
};
|
};
|
||||||
SoundByte.PlayOneShotGame("lumbearjack/" + hitSound);
|
SoundByte.PlayOneShotGame("lumbearjack/" + hitSound);
|
||||||
|
_bear.CutMid();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void JustCut(PlayerActionEvent caller, float state)
|
private void JustCut(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f || state <= -1f)
|
||||||
{
|
{
|
||||||
// Barely
|
_bear.SwingWhiff(false, true);
|
||||||
|
Miss(caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,6 +58,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
_ => throw new System.NotImplementedException(),
|
_ => throw new System.NotImplementedException(),
|
||||||
};
|
};
|
||||||
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
||||||
|
_bear.Cut(caller.startBeat + caller.timer, false, false);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
{
|
{
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f || state <= -1f)
|
||||||
{
|
{
|
||||||
// Barely
|
_bear.SwingWhiff(false, true);
|
||||||
|
Miss(caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,13 +57,15 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
_ => throw new System.NotImplementedException(),
|
_ => throw new System.NotImplementedException(),
|
||||||
};
|
};
|
||||||
SoundByte.PlayOneShotGame("lumbearjack/" + hitSound);
|
SoundByte.PlayOneShotGame("lumbearjack/" + hitSound);
|
||||||
|
_bear.CutMid();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void JustCut(PlayerActionEvent caller, float state)
|
private void JustCut(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f || state <= -1f)
|
||||||
{
|
{
|
||||||
// Barely
|
_bear.SwingWhiff(false, true);
|
||||||
|
Miss(caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,6 +79,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
_ => throw new System.NotImplementedException(),
|
_ => throw new System.NotImplementedException(),
|
||||||
};
|
};
|
||||||
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
||||||
|
_bear.Cut(caller.startBeat + caller.timer, false, false);
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
{
|
{
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f || state <= -1f)
|
||||||
{
|
{
|
||||||
// Barely
|
_bear.SwingWhiff(false, true);
|
||||||
|
Miss(caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,6 +40,7 @@ namespace HeavenStudio.Games.Scripts_LumBEARjack
|
||||||
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
SoundByte.PlayOneShotGame("lumbearjack/" + cutSound);
|
||||||
|
|
||||||
if (_type != LumBEARjack.SmallType.log) SoundByte.PlayOneShotGame("lumbearjack/huh", caller.startBeat + caller.timer + 1);
|
if (_type != LumBEARjack.SmallType.log) SoundByte.PlayOneShotGame("lumbearjack/huh", caller.startBeat + caller.timer + 1);
|
||||||
|
_bear.Cut(caller.startBeat + caller.timer, _type != LumBEARjack.SmallType.log, false); // Add proper logic for direction
|
||||||
|
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,20 @@ namespace HeavenStudio.Games.Loaders
|
||||||
{
|
{
|
||||||
return new Minigame("lumbearjack", "LumBEARjack", "ffffff", false, false, new List<GameAction>()
|
return new Minigame("lumbearjack", "LumBEARjack", "ffffff", false, false, new List<GameAction>()
|
||||||
{
|
{
|
||||||
|
new("bop", "Bop")
|
||||||
|
{
|
||||||
|
function = delegate
|
||||||
|
{
|
||||||
|
var e = eventCaller.currentEntity;
|
||||||
|
LumBEARjack.instance.Bop(e.beat, e.length, (LumBEARjack.WhoBops)e["bop"]);
|
||||||
|
},
|
||||||
|
resizable = true,
|
||||||
|
parameters = new()
|
||||||
|
{
|
||||||
|
new("bop", LumBEARjack.WhoBops.Both, "Bop"),
|
||||||
|
new("auto", LumBEARjack.WhoBops.None, "Bop (Auto)")
|
||||||
|
}
|
||||||
|
},
|
||||||
new("small", "Small Object")
|
new("small", "Small Object")
|
||||||
{
|
{
|
||||||
preFunction = delegate
|
preFunction = delegate
|
||||||
|
|
@ -80,7 +94,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new("sound", true, "Cue Sound")
|
new("sound", true, "Cue Sound")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new("sigh", "Sigh")
|
new("sigh", "Rest")
|
||||||
{
|
{
|
||||||
preFunction = delegate
|
preFunction = delegate
|
||||||
{
|
{
|
||||||
|
|
@ -185,17 +199,28 @@ namespace HeavenStudio.Games
|
||||||
peach
|
peach
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum WhoBops
|
||||||
|
{
|
||||||
|
Both = 0,
|
||||||
|
Bear = 1,
|
||||||
|
Cats = 2,
|
||||||
|
None = 3
|
||||||
|
}
|
||||||
|
|
||||||
[Header("Components")]
|
[Header("Components")]
|
||||||
[SerializeField] private LBJBear _bear;
|
[SerializeField] private LBJBear _bear;
|
||||||
[SerializeField] private LBJSmallObject _smallObjectPrefab;
|
[SerializeField] private LBJSmallObject _smallObjectPrefab;
|
||||||
[SerializeField] private LBJBigObject _bigObjectPrefab;
|
[SerializeField] private LBJBigObject _bigObjectPrefab;
|
||||||
[SerializeField] private LBJHugeObject _hugeObjectPrefab;
|
[SerializeField] private LBJHugeObject _hugeObjectPrefab;
|
||||||
|
|
||||||
|
private List<double> _bearNoBopBeats = new();
|
||||||
|
|
||||||
public static LumBEARjack instance;
|
public static LumBEARjack instance;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
|
SetupBopRegion("lumbearjack", "bop", "auto", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Update
|
#region Update
|
||||||
|
|
@ -255,11 +280,13 @@ namespace HeavenStudio.Games
|
||||||
public override void OnGameSwitch(double beat)
|
public override void OnGameSwitch(double beat)
|
||||||
{
|
{
|
||||||
PersistObjects(beat);
|
PersistObjects(beat);
|
||||||
|
HandleBops(beat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnPlay(double beat)
|
public override void OnPlay(double beat)
|
||||||
{
|
{
|
||||||
PersistObjects(beat);
|
PersistObjects(beat);
|
||||||
|
HandleBops(beat);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PersistObjects(double beat)
|
private void PersistObjects(double beat)
|
||||||
|
|
@ -291,6 +318,96 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleBops(double beat)
|
||||||
|
{
|
||||||
|
List<RiqEntity> allCutEvents = EventCaller.GetAllInGameManagerList("lumbearjack", new string[] { "small", "big", "huge", "smallS", "bigS", "hugeS" });
|
||||||
|
|
||||||
|
for (int i = 0; i < allCutEvents.Count; i++)
|
||||||
|
{
|
||||||
|
var e = allCutEvents[i];
|
||||||
|
|
||||||
|
switch (e.datamodel.Split(1))
|
||||||
|
{
|
||||||
|
case "small":
|
||||||
|
case "smallS":
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 3 * 2));
|
||||||
|
if ((SmallType)e["type"] != SmallType.log) _bearNoBopBeats.Add(e.beat + e.length);
|
||||||
|
break;
|
||||||
|
case "big":
|
||||||
|
case "bigS":
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 4 * 2));
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 4 * 3));
|
||||||
|
break;
|
||||||
|
case "huge":
|
||||||
|
case "hugeS":
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 6 * 2));
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 6 * 3));
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 6 * 4));
|
||||||
|
_bearNoBopBeats.Add(e.beat + (e.length / 6 * 5));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<RiqEntity> allEligibleBops = EventCaller.GetAllInGameManagerList("lumbearjack", new string[] { "bop" }).FindAll(x => x.beat < beat && x.beat + x.length > beat);
|
||||||
|
|
||||||
|
foreach (var e in allEligibleBops)
|
||||||
|
{
|
||||||
|
Bop(e.beat, e.length, (WhoBops)e["bop"], beat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Bop
|
||||||
|
|
||||||
|
public override void OnLateBeatPulse(double beat)
|
||||||
|
{
|
||||||
|
switch ((WhoBops)BeatIsInBopRegionInt(beat))
|
||||||
|
{
|
||||||
|
case WhoBops.Both:
|
||||||
|
if (!_bearNoBopBeats.Contains(beat)) _bear.Bop();
|
||||||
|
break;
|
||||||
|
case WhoBops.Bear:
|
||||||
|
if (!_bearNoBopBeats.Contains(beat)) _bear.Bop();
|
||||||
|
break;
|
||||||
|
case WhoBops.Cats:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Bop(double beat, float length, WhoBops who, double startUpBeat = -1)
|
||||||
|
{
|
||||||
|
if (who == WhoBops.None) return;
|
||||||
|
|
||||||
|
List<BeatAction.Action> actions = new();
|
||||||
|
|
||||||
|
for (int i = 0; i < length; i++)
|
||||||
|
{
|
||||||
|
if (beat + i < startUpBeat) continue;
|
||||||
|
|
||||||
|
actions.Add(new(beat + i, delegate
|
||||||
|
{
|
||||||
|
switch (who)
|
||||||
|
{
|
||||||
|
case WhoBops.Both:
|
||||||
|
_bear.Bop();
|
||||||
|
break;
|
||||||
|
case WhoBops.Bear:
|
||||||
|
_bear.Bop();
|
||||||
|
break;
|
||||||
|
case WhoBops.Cats:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actions.Count > 0) BeatAction.New(this, actions);
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region PreSounds
|
#region PreSounds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue