kaboom
This commit is contained in:
parent
c6c3cdb3c8
commit
1261c608c9
|
@ -518,6 +518,7 @@ GameObject:
|
||||||
- component: {fileID: 2070320588382753355}
|
- component: {fileID: 2070320588382753355}
|
||||||
- component: {fileID: 4290602135507938543}
|
- component: {fileID: 4290602135507938543}
|
||||||
- component: {fileID: 2237466706539414986}
|
- component: {fileID: 2237466706539414986}
|
||||||
|
- component: {fileID: 2683389436290257437}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Conveyer
|
m_Name: Conveyer
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -614,6 +615,17 @@ Animator:
|
||||||
m_AllowConstantClipSamplingOptimization: 1
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
m_KeepAnimatorStateOnDisable: 0
|
m_KeepAnimatorStateOnDisable: 0
|
||||||
m_WriteDefaultValuesOnDisable: 0
|
m_WriteDefaultValuesOnDisable: 0
|
||||||
|
--- !u!210 &2683389436290257437
|
||||||
|
SortingGroup:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3041902986915776654}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 1
|
||||||
--- !u!1 &3486375956011209790
|
--- !u!1 &3486375956011209790
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -625,6 +625,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 3566918977115226187}
|
- component: {fileID: 3566918977115226187}
|
||||||
- component: {fileID: 1884715170989137582}
|
- component: {fileID: 1884715170989137582}
|
||||||
|
- component: {fileID: 755017336671867292}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: MediumBot
|
m_Name: MediumBot
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -672,6 +673,17 @@ MonoBehaviour:
|
||||||
body: {fileID: 233663896046199226}
|
body: {fileID: 233663896046199226}
|
||||||
head: {fileID: 1555999227183591988}
|
head: {fileID: 1555999227183591988}
|
||||||
fillAnim: {fileID: 3960380650713155144}
|
fillAnim: {fileID: 3960380650713155144}
|
||||||
|
--- !u!210 &755017336671867292
|
||||||
|
SortingGroup:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7038732336128464859}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
--- !u!1 &7716400162364290482
|
--- !u!1 &7716400162364290482
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -76,6 +76,9 @@ AnimatorStateMachine:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 1401117769478955841}
|
m_State: {fileID: 1401117769478955841}
|
||||||
m_Position: {x: 340, y: 260, z: 0}
|
m_Position: {x: 340, y: 260, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 6577735940507864683}
|
||||||
|
m_Position: {x: 375, y: 325, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions: []
|
m_AnyStateTransitions: []
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
|
@ -186,3 +189,29 @@ AnimatorState:
|
||||||
m_MirrorParameter:
|
m_MirrorParameter:
|
||||||
m_CycleOffsetParameter:
|
m_CycleOffsetParameter:
|
||||||
m_TimeParameter:
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &6577735940507864683
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: ReleaseWhiff
|
||||||
|
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: 1c316d306bca6d04fa4ef85d2dd4d6d6, type: 2}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
|
1416
Assets/Resources/Sprites/Games/Fillbots/Animations/ReleaseWhiff.anim
Normal file
1416
Assets/Resources/Sprites/Games/Fillbots/Animations/ReleaseWhiff.anim
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1c316d306bca6d04fa4ef85d2dd4d6d6
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -86,7 +86,7 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
if (PlayerInput.PressedUp() && !IsExpectingInputNow(InputType.STANDARD_UP))
|
if (PlayerInput.PressedUp() && !IsExpectingInputNow(InputType.STANDARD_UP))
|
||||||
{
|
{
|
||||||
filler.DoScaledAnimationAsync("Release", 0.5f);
|
filler.DoScaledAnimationAsync("ReleaseWhiff", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("fillbots/armRetractionWhiff");
|
SoundByte.PlayOneShotGame("fillbots/armRetractionWhiff");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace HeavenStudio.Games
|
||||||
}),
|
}),
|
||||||
new BeatAction.Action(beat + 3, delegate
|
new BeatAction.Action(beat + 3, delegate
|
||||||
{
|
{
|
||||||
filler.DoScaledAnimationAsync("FillerPrepare", 0.5f);
|
if (!PlayerInput.Pressing()) filler.DoScaledAnimationAsync("FillerPrepare", 0.5f);
|
||||||
conveyerStartBeat = beat + 3;
|
conveyerStartBeat = beat + 3;
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -60,9 +60,9 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
|
|
||||||
private bool holding;
|
private bool holding;
|
||||||
|
|
||||||
private float lerpPosX;
|
private float lerpDistance;
|
||||||
|
|
||||||
private bool canStop = true;
|
private float normalizedFill;
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
|
@ -85,13 +85,19 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
bodyTrans.position = new Vector3(bodyTrans.position.x, bodyTrans.position.y + limbFallHeight);
|
bodyTrans.position = new Vector3(bodyTrans.position.x, bodyTrans.position.y + limbFallHeight);
|
||||||
|
|
||||||
startPosX = transform.position.x;
|
startPosX = transform.position.x;
|
||||||
|
|
||||||
|
lerpDistance = 0 - startPosX;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void MoveConveyer(float normalized)
|
public void MoveConveyer(float normalized)
|
||||||
{
|
{
|
||||||
|
if (holding)
|
||||||
|
{
|
||||||
|
StopConveyer();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!headHasFallen || !bodyHasFallen || !legsHaveFallen) return;
|
if (!headHasFallen || !bodyHasFallen || !legsHaveFallen) return;
|
||||||
canStop = true;
|
transform.position = new Vector3(Mathf.LerpUnclamped(startPosX, startPosX + lerpDistance, normalized), transform.position.y);
|
||||||
transform.position = new Vector3(Mathf.LerpUnclamped(startPosX, lerpPosX, normalized), transform.position.y);
|
|
||||||
|
|
||||||
if (normalized >= 4)
|
if (normalized >= 4)
|
||||||
{
|
{
|
||||||
|
@ -103,11 +109,7 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
public void StopConveyer()
|
public void StopConveyer()
|
||||||
{
|
{
|
||||||
if (!headHasFallen || !bodyHasFallen || !legsHaveFallen) return;
|
if (!headHasFallen || !bodyHasFallen || !legsHaveFallen) return;
|
||||||
if (!canStop) return;
|
|
||||||
float lerpDistance = lerpPosX - startPosX;
|
|
||||||
startPosX = transform.position.x;
|
startPosX = transform.position.x;
|
||||||
lerpPosX = startPosX + lerpDistance;
|
|
||||||
canStop = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(double beat)
|
public void Init(double beat)
|
||||||
|
@ -176,6 +178,11 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (holding)
|
||||||
|
{
|
||||||
|
float normalizedBeat = cond.GetPositionFromBeat(startBeat + 4, holdLength);
|
||||||
|
float normalizedExplodeBeat = cond.GetPositionFromBeat(startBeat + 4, holdLength + 2);
|
||||||
|
|
||||||
if (beepEvent != null && beepEvent.enabled && ReportBeat(ref beepEvent.lastReportedBeat))
|
if (beepEvent != null && beepEvent.enabled && ReportBeat(ref beepEvent.lastReportedBeat))
|
||||||
{
|
{
|
||||||
if (beepEvent.lastReportedBeat < beepEvent.startBeat + beepEvent.length)
|
if (beepEvent.lastReportedBeat < beepEvent.startBeat + beepEvent.length)
|
||||||
|
@ -186,22 +193,48 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
game.filler.DoScaledAnimationAsync("HoldBeat", 1f);
|
game.filler.DoScaledAnimationAsync("HoldBeat", 1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (holding)
|
|
||||||
{
|
|
||||||
float normalizedBeat = cond.GetPositionFromBeat(startBeat + 4, holdLength);
|
|
||||||
|
|
||||||
fillAnim.DoNormalizedAnimation("Fill", Mathf.Clamp(normalizedBeat, 0, 1));
|
fillAnim.DoNormalizedAnimation("Fill", Mathf.Clamp(normalizedBeat, 0, 1));
|
||||||
if (PlayerInput.PressedUp() && !game.IsExpectingInputNow(InputType.STANDARD_UP))
|
if (!game.IsExpectingInputNow(InputType.STANDARD_UP) && normalizedExplodeBeat >= 1f)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/explosion");
|
||||||
|
game.currentBots.Remove(this);
|
||||||
|
Destroy(gameObject);
|
||||||
|
}
|
||||||
|
else if (PlayerInput.PressedUp() && !game.IsExpectingInputNow(InputType.STANDARD_UP))
|
||||||
|
{
|
||||||
|
if (normalizedBeat < 1)
|
||||||
{
|
{
|
||||||
fullBody.Play("Dead", 0, 0);
|
fullBody.Play("Dead", 0, 0);
|
||||||
|
fillSound.KillLoop(0);
|
||||||
|
beepEvent.enabled = false;
|
||||||
holding = false;
|
holding = false;
|
||||||
|
normalizedFill = normalizedBeat;
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/miss");
|
||||||
|
if (game.conveyerStartBeat == -1) game.conveyerStartBeat = cond.songPositionInBeats + 1;
|
||||||
}
|
}
|
||||||
|
else if (normalizedBeat >= 1)
|
||||||
|
{
|
||||||
|
fullBody.Play("Dead", 0, 0);
|
||||||
|
fillSound.KillLoop(0);
|
||||||
|
beepEvent.enabled = false;
|
||||||
|
holding = false;
|
||||||
|
normalizedFill = normalizedBeat;
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/miss");
|
||||||
|
if (game.conveyerStartBeat == -1) game.conveyerStartBeat = cond.songPositionInBeats + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fillAnim.DoNormalizedAnimation("Fill", normalizedFill);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void JustHold(PlayerActionEvent caller, float state)
|
private void JustHold(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
|
game.filler.DoScaledAnimationAsync("Hold", 0.5f);
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/armExtension");
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f || state <= -1f)
|
||||||
{
|
{
|
||||||
fullBody.Play("HoldBarely", 0, 0);
|
fullBody.Play("HoldBarely", 0, 0);
|
||||||
|
@ -212,8 +245,6 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
transform.position = new Vector3(0, transform.position.y, 0);
|
transform.position = new Vector3(0, transform.position.y, 0);
|
||||||
holding = true;
|
holding = true;
|
||||||
fullBody.DoScaledAnimationAsync("Hold", 1f);
|
fullBody.DoScaledAnimationAsync("Hold", 1f);
|
||||||
game.filler.DoScaledAnimationAsync("Hold", 0.5f);
|
|
||||||
SoundByte.PlayOneShotGame("fillbots/armExtension");
|
|
||||||
SoundByte.PlayOneShotGame("fillbots/beep");
|
SoundByte.PlayOneShotGame("fillbots/beep");
|
||||||
fillSound = SoundByte.PlayOneShotGame("fillbots/water", -1, 1 / (float)(holdLength / 3), 1, true);
|
fillSound = SoundByte.PlayOneShotGame("fillbots/water", -1, 1 / (float)(holdLength / 3), 1, true);
|
||||||
releaseEvent = game.ScheduleInput(startBeat + 4, holdLength, InputType.STANDARD_UP, JustRelease, OutRelease, OutRelease);
|
releaseEvent = game.ScheduleInput(startBeat + 4, holdLength, InputType.STANDARD_UP, JustRelease, OutRelease, OutRelease);
|
||||||
|
@ -236,12 +267,22 @@ namespace HeavenStudio.Games.Scripts_Fillbots
|
||||||
fillSound.KillLoop(0);
|
fillSound.KillLoop(0);
|
||||||
beepEvent.enabled = false;
|
beepEvent.enabled = false;
|
||||||
holding = false;
|
holding = false;
|
||||||
game.filler.DoScaledAnimationAsync("Release", 0.5f);
|
|
||||||
if (game.conveyerStartBeat != -2) game.conveyerStartBeat = caller.timer + caller.startBeat + 1;
|
if (game.conveyerStartBeat != -2) game.conveyerStartBeat = caller.timer + caller.startBeat + 1;
|
||||||
if (state >= 1f || state <= -1f)
|
if (state >= 1f)
|
||||||
{
|
{
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/miss");
|
||||||
|
game.filler.DoScaledAnimationAsync("ReleaseWhiff", 0.5f);
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/armRetractionWhiff");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (state <= -1f)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/miss");
|
||||||
|
game.filler.DoScaledAnimationAsync("ReleaseWhiff", 0.5f);
|
||||||
|
SoundByte.PlayOneShotGame("fillbots/armRetractionWhiff");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
game.filler.DoScaledAnimationAsync("Release", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("fillbots/armRetraction");
|
SoundByte.PlayOneShotGame("fillbots/armRetraction");
|
||||||
fullBody.DoScaledAnimationAsync("Release", 1f);
|
fullBody.DoScaledAnimationAsync("Release", 1f);
|
||||||
string sizePrefix = size switch
|
string sizePrefix = size switch
|
||||||
|
|
Loading…
Reference in a new issue