Merge branch 'megaminerjenny:master' into master
This commit is contained in:
commit
68cde9c26d
|
@ -1351,7 +1351,7 @@ SpriteRenderer:
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 20
|
m_SortingOrder: 20
|
||||||
m_Sprite: {fileID: 21300000, guid: 9cd3b6e1f65b8924cb61f2bff440c703, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 9a0b0e8ac9906194b855397e01ca63f9, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 0.5254902}
|
m_Color: {r: 1, g: 1, b: 1, a: 0.5254902}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
|
|
Binary file not shown.
BIN
Assets/Resources/Sfx/games/marchingOrders/faceTurnOther.ogg
Normal file
BIN
Assets/Resources/Sfx/games/marchingOrders/faceTurnOther.ogg
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 072598f0f25ee574098a1c1a912d02b0
|
guid: 216fb1053a001094682f72154e4c5b74
|
||||||
AudioImporter:
|
AudioImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
BIN
Assets/Resources/Sfx/games/marchingOrders/faceTurnPlayer.ogg
Normal file
BIN
Assets/Resources/Sfx/games/marchingOrders/faceTurnPlayer.ogg
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 68bc11fbde502954bac98356e27ebf0a
|
guid: 3d783a872d3761248b36d824b1e55d88
|
||||||
AudioImporter:
|
AudioImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Assets/Resources/Sfx/games/marchingOrders/stepOther.ogg
Normal file
BIN
Assets/Resources/Sfx/games/marchingOrders/stepOther.ogg
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a309c402deb4cec409b80f448812886f
|
guid: 501dcb9853aa30e4090a8084b37b1db5
|
||||||
AudioImporter:
|
AudioImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
BIN
Assets/Resources/Sfx/games/marchingOrders/stepPlayer.ogg
Normal file
BIN
Assets/Resources/Sfx/games/marchingOrders/stepPlayer.ogg
Normal file
Binary file not shown.
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dff60d5367d760c4ea0f4d492a5a0748
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1510,13 +1510,7 @@ AnimationClip:
|
||||||
- time: 0
|
- time: 0
|
||||||
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- time: 0.033333335
|
- time: 0.033333335
|
||||||
value: {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- time: 0.06666667
|
|
||||||
value: {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.8333333
|
|
||||||
value: {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.8666667
|
|
||||||
value: {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.9
|
- time: 0.9
|
||||||
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
attribute: m_Sprite
|
attribute: m_Sprite
|
||||||
|
@ -1757,10 +1751,7 @@ AnimationClip:
|
||||||
- {fileID: -7998149598989480986, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: -7998149598989480986, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: -7998149598989480986, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: -7998149598989480986, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: -854871192670245052, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
m_AnimationClipSettings:
|
m_AnimationClipSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
|
@ -1806,16 +1806,6 @@ AnimationClip:
|
||||||
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- time: 0.033333335
|
- time: 0.033333335
|
||||||
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- time: 0.06666667
|
|
||||||
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.1
|
|
||||||
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.8333333
|
|
||||||
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.8666667
|
|
||||||
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.9
|
|
||||||
value: {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- time: 0.93333334
|
- time: 0.93333334
|
||||||
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
value: {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
attribute: m_Sprite
|
attribute: m_Sprite
|
||||||
|
@ -2072,11 +2062,6 @@ AnimationClip:
|
||||||
- {fileID: -7998149598989480986, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: -7998149598989480986, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: 3603139382469830057, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
|
||||||
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
- {fileID: 9063607464200046497, guid: 07a712fc3a8592248b24d4108837306c, type: 3}
|
||||||
m_AnimationClipSettings:
|
m_AnimationClipSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
|
|
@ -94,6 +94,7 @@ namespace HeavenStudio.Games
|
||||||
var entities = GameManager.instance.Beatmap.entities;
|
var entities = GameManager.instance.Beatmap.entities;
|
||||||
|
|
||||||
float startBeat = cond.songPositionInBeats;
|
float startBeat = cond.songPositionInBeats;
|
||||||
|
float endBeat = Single.MaxValue;
|
||||||
|
|
||||||
if (inactiveStart == -1f)
|
if (inactiveStart == -1f)
|
||||||
{
|
{
|
||||||
|
@ -136,6 +137,21 @@ namespace HeavenStudio.Games
|
||||||
inactiveStart = -1f;
|
inactiveStart = -1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// find out when the next game switch (or remix end) happens
|
||||||
|
var allEnds = EventCaller.GetAllInGameManagerList("gameManager", new string[] { "switchGame", "end" });
|
||||||
|
allEnds.Sort((x, y) => x.beat.CompareTo(y.beat));
|
||||||
|
|
||||||
|
//get the beat of the closest end event
|
||||||
|
foreach (var end in allEnds)
|
||||||
|
{
|
||||||
|
if (end.datamodel.Split(2) == "cropStomp") continue;
|
||||||
|
if (end.beat > startBeat)
|
||||||
|
{
|
||||||
|
endBeat = end.beat;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Veggie and mole events.
|
// Veggie and mole events.
|
||||||
var vegEvents = entities.FindAll(v => v.datamodel == "cropStomp/veggies");
|
var vegEvents = entities.FindAll(v => v.datamodel == "cropStomp/veggies");
|
||||||
var moleEvents = entities.FindAll(m => m.datamodel == "cropStomp/mole");
|
var moleEvents = entities.FindAll(m => m.datamodel == "cropStomp/mole");
|
||||||
|
@ -154,7 +170,7 @@ namespace HeavenStudio.Games
|
||||||
for (int b = 0; b < veggiesInEvent; b++)
|
for (int b = 0; b < veggiesInEvent; b++)
|
||||||
{
|
{
|
||||||
var targetVeggieBeat = vegBeat + 2f * b;
|
var targetVeggieBeat = vegBeat + 2f * b;
|
||||||
if (startBeat <= targetVeggieBeat)
|
if (startBeat <= targetVeggieBeat && targetVeggieBeat < endBeat)
|
||||||
{
|
{
|
||||||
SpawnVeggie(targetVeggieBeat, startBeat, false);
|
SpawnVeggie(targetVeggieBeat, startBeat, false);
|
||||||
}
|
}
|
||||||
|
@ -167,7 +183,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
var moleBeat = moleEvents[i].beat;
|
var moleBeat = moleEvents[i].beat;
|
||||||
|
|
||||||
if (startBeat <= moleBeat)
|
if (startBeat <= moleBeat && moleBeat < endBeat)
|
||||||
{
|
{
|
||||||
SpawnVeggie(moleBeat, startBeat, true);
|
SpawnVeggie(moleBeat, startBeat, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,7 @@ namespace HeavenStudio.Games.Scripts_CropStomp
|
||||||
|
|
||||||
stompedBeat = cond.songPositionInBeats;
|
stompedBeat = cond.songPositionInBeats;
|
||||||
|
|
||||||
landBeat = targetBeat + (float)cond.BeatsToSecs(Minigame.EndTime()-1, cond.GetBpmAtBeat(targetBeat));
|
landBeat = targetBeat + (float)cond.SecsToBeats(Minigame.EndTime()-1, cond.GetBpmAtBeat(targetBeat));
|
||||||
|
|
||||||
if (autoTriggered)
|
if (autoTriggered)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
//notes:
|
//notes:
|
||||||
// BEFORE NEW PROPS
|
// CURRENT STATE
|
||||||
// - minenice will also use this to test out randomly named parameters so coding has to rest until the new props update [DONE]
|
// - rework on the marching cadet code (it sucks)
|
||||||
// - see fan club for separate prefabs (cadets) [DONE]
|
|
||||||
// - temporarily take sounds from rhre, wait until someone records the full code, including misses, or record it myself (unlikely) [IN PROGRESS]
|
|
||||||
// AFTER NEW PROPS
|
|
||||||
// - testmod marching orders using speed
|
|
||||||
// - see space soccer, mr upbeat, tunnel for keep-the-beat codes
|
// - see space soccer, mr upbeat, tunnel for keep-the-beat codes
|
||||||
// - figure how to do custom bg changes when the upscaled textures are finished (see karate man, launch party once it releases)
|
// - figure how to do custom bg changes when the upscaled textures are finished (see karate man, launch party once it releases)
|
||||||
// - will use a textbox without going through the visual options but i wonder how..?? (see first contact if ever textboxes are implemented in said minigame)
|
// - will use a textbox without going through the visual options but i wonder how..?? (see first contact if ever textboxes are implemented in said minigame)
|
||||||
// AFTER FEATURE COMPLETION
|
// AFTER FEATURE COMPLETION
|
||||||
// - delete all notes once the minigame is considered feature-complete
|
// - delete all notes once the minigame is considered feature-complete
|
||||||
|
// - polish. like a lot of polish
|
||||||
|
// - of course, assetbundles!
|
||||||
|
|
||||||
using HeavenStudio.Util;
|
using HeavenStudio.Util;
|
||||||
using System;
|
using System;
|
||||||
|
@ -144,7 +142,7 @@ namespace HeavenStudio.Games
|
||||||
marchOtherCount += 1;
|
marchOtherCount += 1;
|
||||||
var marchOtherAnim = (marchOtherCount % 2 != 0 ? "MarchR" : "MarchL");
|
var marchOtherAnim = (marchOtherCount % 2 != 0 ? "MarchR" : "MarchL");
|
||||||
|
|
||||||
Jukebox.PlayOneShotGame("marchingOrders/step1");
|
Jukebox.PlayOneShotGame("marchingOrders/stepOther");
|
||||||
Cadet1.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
Cadet1.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
||||||
Cadet2.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
Cadet2.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
||||||
Cadet3.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
Cadet3.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
||||||
|
@ -160,7 +158,7 @@ namespace HeavenStudio.Games
|
||||||
marchPlayerCount += 1;
|
marchPlayerCount += 1;
|
||||||
var marchPlayerAnim = (marchPlayerCount % 2 != 0 ? "MarchR" : "MarchL");
|
var marchPlayerAnim = (marchPlayerCount % 2 != 0 ? "MarchR" : "MarchL");
|
||||||
|
|
||||||
Jukebox.PlayOneShotGame("marchingOrders/step1");
|
Jukebox.PlayOneShotGame("marchingOrders/stepOther");
|
||||||
CadetPlayer.DoScaledAnimationAsync(marchPlayerAnim, 0.5f);
|
CadetPlayer.DoScaledAnimationAsync(marchPlayerAnim, 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,7 +214,7 @@ namespace HeavenStudio.Games
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("marchingOrders/halt1", beat),
|
new MultiSound.Sound("marchingOrders/halt1", beat),
|
||||||
new MultiSound.Sound("marchingOrders/halt2", beat + 1f),
|
new MultiSound.Sound("marchingOrders/halt2", beat + 1f),
|
||||||
new MultiSound.Sound("marchingOrders/step1", beat + 1f),
|
new MultiSound.Sound("marchingOrders/stepOther", beat + 1f),
|
||||||
}, forcePlay:true);
|
}, forcePlay:true);
|
||||||
|
|
||||||
BeatAction.New(Player, new List<BeatAction.Action>()
|
BeatAction.New(Player, new List<BeatAction.Action>()
|
||||||
|
@ -244,12 +242,12 @@ namespace HeavenStudio.Games
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case (int) MarchingOrders.DirectionFaceTurn.Left:
|
case (int) MarchingOrders.DirectionFaceTurn.Left:
|
||||||
//ScheduleInput(beat, turnLength + 2f, InputType.DIRECTION_RIGHT_DOWN, LeftSuccess, LeftMiss, LeftEmpty);
|
ScheduleInput(beat, turnLength + 2f, InputType.DIRECTION_LEFT_DOWN, LeftSuccess, LeftMiss, LeftThrough);
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("marchingOrders/leftFaceTurn1", beat),
|
new MultiSound.Sound("marchingOrders/leftFaceTurn1", beat),
|
||||||
new MultiSound.Sound("marchingOrders/leftFaceTurn2", beat + 0.5f),
|
new MultiSound.Sound("marchingOrders/leftFaceTurn2", beat + 0.5f),
|
||||||
new MultiSound.Sound("marchingOrders/leftFaceTurn3", beat + turnLength + 1f),
|
new MultiSound.Sound("marchingOrders/leftFaceTurn3", beat + turnLength + 1f),
|
||||||
new MultiSound.Sound("marchingOrders/leftFaceTurn4", beat + turnLength + 2f),
|
new MultiSound.Sound("marchingOrders/faceTurnOther", beat + turnLength + 2f),
|
||||||
}, forcePlay:true);
|
}, forcePlay:true);
|
||||||
|
|
||||||
BeatAction.New(Player, new List<BeatAction.Action>()
|
BeatAction.New(Player, new List<BeatAction.Action>()
|
||||||
|
@ -260,11 +258,12 @@ namespace HeavenStudio.Games
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
ScheduleInput(beat, turnLength + 2f, InputType.DIRECTION_RIGHT_DOWN, RightSuccess, RightMiss, RightThrough);
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
new MultiSound.Sound("marchingOrders/rightFaceTurn1", beat),
|
new MultiSound.Sound("marchingOrders/rightFaceTurn1", beat),
|
||||||
new MultiSound.Sound("marchingOrders/rightFaceTurn2", beat + 0.5f),
|
new MultiSound.Sound("marchingOrders/rightFaceTurn2", beat + 0.5f),
|
||||||
new MultiSound.Sound("marchingOrders/rightFaceTurn3", beat + turnLength + 1f),
|
new MultiSound.Sound("marchingOrders/rightFaceTurn3", beat + turnLength + 1f),
|
||||||
new MultiSound.Sound("marchingOrders/rightFaceTurn4", beat + turnLength + 2f),
|
new MultiSound.Sound("marchingOrders/faceTurnOther", beat + turnLength + 2f),
|
||||||
}, forcePlay:true);
|
}, forcePlay:true);
|
||||||
|
|
||||||
BeatAction.New(Player, new List<BeatAction.Action>()
|
BeatAction.New(Player, new List<BeatAction.Action>()
|
||||||
|
@ -284,6 +283,7 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void AttentionSound(float beat)
|
public static void AttentionSound(float beat)
|
||||||
{
|
{
|
||||||
MultiSound.Play(new MultiSound.Sound[] {
|
MultiSound.Play(new MultiSound.Sound[] {
|
||||||
|
@ -308,6 +308,42 @@ namespace HeavenStudio.Games
|
||||||
new MultiSound.Sound("marchingOrders/halt2", beat + 1f),
|
new MultiSound.Sound("marchingOrders/halt2", beat + 1f),
|
||||||
}, forcePlay:true);
|
}, forcePlay:true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void LeftSuccess(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
Jukebox.PlayOneShotGame("marchingOrders/faceTurnPlayer");
|
||||||
|
CadetHeadPlayer.DoScaledAnimationAsync("FaceL", 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LeftMiss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
//Jukebox.PlayOneShotGame("spaceDance/inputBad2");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LeftThrough(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void RightSuccess(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
Jukebox.PlayOneShotGame("marchingOrders/faceTurnPlayer");
|
||||||
|
CadetHeadPlayer.DoScaledAnimationAsync("FaceR", 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RightMiss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
//Jukebox.PlayOneShotGame("spaceDance/inputBad2");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RightThrough(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,5 +249,12 @@ namespace HeavenStudio.Games
|
||||||
Debug.LogWarning($"Sound sequence {name} not found in game {game} (did you build AssetBundles?)");
|
Debug.LogWarning($"Sound sequence {name} not found in game {game} (did you build AssetBundles?)");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnDestroy() {
|
||||||
|
foreach (var evt in scheduledInputs)
|
||||||
|
{
|
||||||
|
evt.Disable();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,38 +27,10 @@ namespace HeavenStudio.Games.Scripts_RhythmRally
|
||||||
{
|
{
|
||||||
if (!game.served || game.missed || !game.started) return;
|
if (!game.served || game.missed || !game.started) return;
|
||||||
|
|
||||||
var cond = Conductor.instance;
|
if (PlayerInput.Pressed() && !game.IsExpectingInputNow(InputType.STANDARD_DOWN))
|
||||||
|
|
||||||
float stateBeat = cond.GetPositionFromMargin(game.targetBeat, 1f);
|
|
||||||
StateCheck(stateBeat);
|
|
||||||
|
|
||||||
if (PlayerInput.Pressed())
|
|
||||||
{
|
{
|
||||||
if (state.perfect)
|
// Play "whoosh" sound here
|
||||||
{
|
playerAnim.Play("Swing", 0, 0);
|
||||||
Ace();
|
|
||||||
}
|
|
||||||
else if (state.notPerfect())
|
|
||||||
{
|
|
||||||
Miss();
|
|
||||||
Jukebox.PlayOneShot("miss");
|
|
||||||
playerAnim.Play("Swing", 0, 0);
|
|
||||||
|
|
||||||
game.missCurve.KeyPoints[0].Position = game.ball.transform.position;
|
|
||||||
game.missCurve.transform.localScale = new Vector3(state.early ? 1f : -1f, 1f, 1f);
|
|
||||||
game.missBeat = cond.songPositionInBeats;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Play "whoosh" sound here
|
|
||||||
playerAnim.Play("Swing", 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stateBeat > Minigame.EndTime())
|
|
||||||
{
|
|
||||||
Miss();
|
|
||||||
game.ball.SetActive(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,36 +40,49 @@ namespace HeavenStudio.Games.Scripts_RhythmRally
|
||||||
|
|
||||||
var hitBeat = cond.songPositionInBeats;
|
var hitBeat = cond.songPositionInBeats;
|
||||||
|
|
||||||
var bounceBeat = game.targetBeat + 1f;
|
var bounceBeat = game.serveBeat + game.targetBeat + 1f;
|
||||||
|
|
||||||
if (game.rallySpeed == RhythmRally.RallySpeed.Slow)
|
if (game.rallySpeed == RhythmRally.RallySpeed.Slow)
|
||||||
{
|
{
|
||||||
bounceBeat = game.targetBeat + 2f;
|
bounceBeat = game.serveBeat + game.targetBeat + 2f;
|
||||||
}
|
}
|
||||||
else if (game.rallySpeed == RhythmRally.RallySpeed.SuperFast)
|
else if (game.rallySpeed == RhythmRally.RallySpeed.SuperFast)
|
||||||
{
|
{
|
||||||
bounceBeat = game.targetBeat + 0.5f;
|
bounceBeat = game.serveBeat + game.targetBeat + 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerAnim.Play("Swing", 0, 0);
|
playerAnim.Play("Swing", 0, 0);
|
||||||
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Return", hitBeat), new MultiSound.Sound("rhythmRally/ReturnBounce", bounceBeat) });
|
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Return", hitBeat), new MultiSound.Sound("rhythmRally/ReturnBounce", bounceBeat) });
|
||||||
BounceFX(bounceBeat);
|
BounceFX(bounceBeat);
|
||||||
|
game.ball.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Miss()
|
void NearMiss(float state)
|
||||||
|
{
|
||||||
|
MissBall();
|
||||||
|
Jukebox.PlayOneShot("miss");
|
||||||
|
playerAnim.Play("Swing", 0, 0);
|
||||||
|
|
||||||
|
game.missCurve.KeyPoints[0].Position = game.ball.transform.position;
|
||||||
|
game.missCurve.transform.localScale = new Vector3(-state, 1f, 1f);
|
||||||
|
game.missBeat = cond.songPositionInBeats;
|
||||||
|
game.ball.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MissBall()
|
||||||
{
|
{
|
||||||
game.served = false;
|
game.served = false;
|
||||||
game.missed = true;
|
game.missed = true;
|
||||||
|
|
||||||
var whistleBeat = game.targetBeat + 1f;
|
var whistleBeat = game.serveBeat + game.targetBeat + 1f;
|
||||||
|
|
||||||
if (game.rallySpeed == RhythmRally.RallySpeed.Slow)
|
if (game.rallySpeed == RhythmRally.RallySpeed.Slow)
|
||||||
{
|
{
|
||||||
whistleBeat = game.targetBeat + 2f;
|
whistleBeat = game.serveBeat + game.targetBeat + 2f;
|
||||||
}
|
}
|
||||||
else if (game.rallySpeed == RhythmRally.RallySpeed.SuperFast)
|
else if (game.rallySpeed == RhythmRally.RallySpeed.SuperFast)
|
||||||
{
|
{
|
||||||
whistleBeat = game.targetBeat + 0.5f;
|
whistleBeat = game.serveBeat + game.targetBeat + 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Whistle", whistleBeat) });
|
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Whistle", whistleBeat) });
|
||||||
|
@ -117,9 +102,20 @@ namespace HeavenStudio.Games.Scripts_RhythmRally
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAce()
|
public void Just(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
|
if (state >= 1f || state <= -1f) {
|
||||||
|
NearMiss(state);
|
||||||
|
return;
|
||||||
|
}
|
||||||
Ace();
|
Ace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Miss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
MissBall();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Out(PlayerActionEvent caller) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,8 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new GameAction("toss ball", "Toss Ball")
|
new GameAction("toss ball", "Toss Ball")
|
||||||
{
|
{
|
||||||
function = delegate { RhythmRally.instance.Toss(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, 6f, true); },
|
function = delegate { RhythmRally.instance.Toss(eventCaller.currentEntity.beat, eventCaller.currentEntity.length, 6f, true); },
|
||||||
defaultLength = 2f
|
defaultLength = 2f,
|
||||||
|
resizable = true
|
||||||
},
|
},
|
||||||
new GameAction("rally", "Rally")
|
new GameAction("rally", "Rally")
|
||||||
{
|
{
|
||||||
|
@ -375,16 +376,16 @@ namespace HeavenStudio.Games
|
||||||
switch (rallySpeed)
|
switch (rallySpeed)
|
||||||
{
|
{
|
||||||
case RallySpeed.Normal:
|
case RallySpeed.Normal:
|
||||||
targetBeat = serveBeat + 2f;
|
targetBeat = 2f;
|
||||||
bounceBeat = serveBeat + 1f;
|
bounceBeat = serveBeat + 1f;
|
||||||
break;
|
break;
|
||||||
case RallySpeed.Fast:
|
case RallySpeed.Fast:
|
||||||
case RallySpeed.SuperFast:
|
case RallySpeed.SuperFast:
|
||||||
targetBeat = serveBeat + 1f;
|
targetBeat = 1f;
|
||||||
bounceBeat = serveBeat + 0.5f;
|
bounceBeat = serveBeat + 0.5f;
|
||||||
break;
|
break;
|
||||||
case RallySpeed.Slow:
|
case RallySpeed.Slow:
|
||||||
targetBeat = serveBeat + 4f;
|
targetBeat = 4f;
|
||||||
bounceBeat = serveBeat + 2f;
|
bounceBeat = serveBeat + 2f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +394,7 @@ namespace HeavenStudio.Games
|
||||||
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Serve", serveBeat), new MultiSound.Sound("rhythmRally/ServeBounce", bounceBeat) });
|
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("rhythmRally/Serve", serveBeat), new MultiSound.Sound("rhythmRally/ServeBounce", bounceBeat) });
|
||||||
paddlers.BounceFX(bounceBeat);
|
paddlers.BounceFX(bounceBeat);
|
||||||
|
|
||||||
paddlers.ResetState();
|
ScheduleInput(serveBeat, targetBeat, InputType.STANDARD_DOWN, paddlers.Just, paddlers.Miss, paddlers.Out);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Toss(float beat, float length, float height, bool firstToss = false)
|
public void Toss(float beat, float length, float height, bool firstToss = false)
|
||||||
|
@ -401,6 +402,9 @@ namespace HeavenStudio.Games
|
||||||
// Hide trail while tossing to prevent weirdness while teleporting ball.
|
// Hide trail while tossing to prevent weirdness while teleporting ball.
|
||||||
ballTrail.gameObject.SetActive(false);
|
ballTrail.gameObject.SetActive(false);
|
||||||
|
|
||||||
|
if (firstToss)
|
||||||
|
height *= length/2f;
|
||||||
|
|
||||||
tossCurve.transform.localScale = new Vector3(1f, height, 1f);
|
tossCurve.transform.localScale = new Vector3(1f, height, 1f);
|
||||||
tossBeat = beat;
|
tossBeat = beat;
|
||||||
tossLength = length;
|
tossLength = length;
|
||||||
|
|
|
@ -21,24 +21,12 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
|
||||||
tweezers = game.Tweezers;
|
tweezers = game.Tweezers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
|
game.ScheduleInput(createBeat, game.tweezerBeatOffset + game.beatInterval, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Just, Miss, Out);
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (plucked) return;
|
|
||||||
|
|
||||||
float stateBeat = Conductor.instance.GetPositionFromMargin(createBeat + game.tweezerBeatOffset + game.beatInterval, 1f);
|
|
||||||
StateCheck(stateBeat);
|
|
||||||
|
|
||||||
if (PlayerInput.Pressed(true))
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
Ace();
|
|
||||||
}
|
|
||||||
else if (state.notPerfect())
|
|
||||||
{
|
|
||||||
Miss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Ace()
|
public void Ace()
|
||||||
|
@ -48,16 +36,27 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
|
||||||
plucked = true;
|
plucked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Miss()
|
public void NearMiss()
|
||||||
{
|
{
|
||||||
tweezers.Pluck(false, this);
|
tweezers.Pluck(false, this);
|
||||||
tweezers.hitOnFrame++;
|
tweezers.hitOnFrame++;
|
||||||
plucked = true;
|
plucked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAce()
|
private void Just(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
|
if (state >= 1f || state <= -1f) {
|
||||||
|
NearMiss();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Ace();
|
Ace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Miss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
// this is where perfect challenge breaks
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Out(PlayerActionEvent caller) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,6 +21,9 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
|
||||||
|
|
||||||
private Sound pullSound;
|
private Sound pullSound;
|
||||||
|
|
||||||
|
PlayerActionEvent endEvent;
|
||||||
|
InputType endInput;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
game = RhythmTweezers.instance;
|
game = RhythmTweezers.instance;
|
||||||
|
@ -28,70 +31,23 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
|
||||||
tweezers = game.Tweezers;
|
tweezers = game.Tweezers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
|
game.ScheduleInput(createBeat, game.tweezerBeatOffset + game.beatInterval, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, StartJust, StartMiss, Out);
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
float stateBeat;
|
|
||||||
|
|
||||||
switch (pluckState)
|
|
||||||
{
|
|
||||||
// Able to be held.
|
|
||||||
case 0:
|
|
||||||
stateBeat = Conductor.instance.GetPositionFromMargin(createBeat + game.tweezerBeatOffset + game.beatInterval, 1f);
|
|
||||||
StateCheck(stateBeat);
|
|
||||||
|
|
||||||
if (PlayerInput.Pressed(true))
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
pullSound = Jukebox.PlayOneShotGame($"rhythmTweezers/longPull{UnityEngine.Random.Range(1, 5)}");
|
|
||||||
pluckState = 1;
|
|
||||||
ResetState();
|
|
||||||
}
|
|
||||||
else if (state.notPerfect())
|
|
||||||
{
|
|
||||||
// I don't know what happens if you mess up here.
|
|
||||||
pluckState = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// In held state. Able to be released.
|
|
||||||
case 1:
|
|
||||||
stateBeat = Conductor.instance.GetPositionFromMargin(createBeat + game.tweezerBeatOffset + game.beatInterval + 0.5f, 1f);
|
|
||||||
StateCheck(stateBeat);
|
|
||||||
|
|
||||||
if (PlayerInput.PressedUp(true))
|
|
||||||
{
|
|
||||||
// It's possible to release earlier than earlyTime,
|
|
||||||
// and the hair will automatically be released before lateTime,
|
|
||||||
// so standard state checking isn't applied here
|
|
||||||
// (though StateCheck is still used for autoplay).
|
|
||||||
if (stateBeat >= Minigame.perfectTime)
|
|
||||||
{
|
|
||||||
Ace();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var normalized = Conductor.instance.GetPositionFromBeat(createBeat + game.tweezerBeatOffset + game.beatInterval, 0.5f);
|
|
||||||
// Hair gets released early and returns whoops.
|
|
||||||
anim.Play("LoopPullReverse", 0, normalized);
|
|
||||||
tweezers.anim.Play("Idle", 0, 0);
|
|
||||||
|
|
||||||
if (pullSound != null)
|
|
||||||
pullSound.Stop();
|
|
||||||
|
|
||||||
pluckState = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Released or missed. Can't be held or released.
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pluckState == 1)
|
if (pluckState == 1)
|
||||||
{
|
{
|
||||||
|
bool input = PlayerInput.PressedUp();
|
||||||
|
if (endInput == InputType.DIRECTION_UP) input = PlayerInput.GetAnyDirectionUp();
|
||||||
|
if (input && !game.IsExpectingInputNow(endInput))
|
||||||
|
{
|
||||||
|
endEvent.MakeInEligible();
|
||||||
|
EndEarly();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Vector3 tst = tweezers.tweezerSpriteTrans.position;
|
Vector3 tst = tweezers.tweezerSpriteTrans.position;
|
||||||
var hairDirection = new Vector3(tst.x + 0.173f, tst.y) - holder.transform.position;
|
var hairDirection = new Vector3(tst.x + 0.173f, tst.y) - holder.transform.position;
|
||||||
holder.transform.rotation = Quaternion.FromToRotation(Vector3.down, hairDirection);
|
holder.transform.rotation = Quaternion.FromToRotation(Vector3.down, hairDirection);
|
||||||
|
@ -102,13 +58,13 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
|
||||||
|
|
||||||
// Auto-release if holding at release time.
|
// Auto-release if holding at release time.
|
||||||
if (normalizedBeat >= 1f)
|
if (normalizedBeat >= 1f)
|
||||||
Ace();
|
endEvent.Hit(0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
loop.transform.localScale = Vector2.one / holder.transform.localScale;
|
loop.transform.localScale = Vector2.one / holder.transform.localScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Ace()
|
public void EndAce()
|
||||||
{
|
{
|
||||||
tweezers.LongPluck(true, this);
|
tweezers.LongPluck(true, this);
|
||||||
tweezers.hitOnFrame++;
|
tweezers.hitOnFrame++;
|
||||||
|
@ -119,18 +75,52 @@ namespace HeavenStudio.Games.Scripts_RhythmTweezers
|
||||||
pluckState = -1;
|
pluckState = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAce()
|
public void EndEarly()
|
||||||
{
|
{
|
||||||
if (pluckState == 0)
|
var normalized = Conductor.instance.GetPositionFromBeat(createBeat + game.tweezerBeatOffset + game.beatInterval, 0.5f);
|
||||||
{
|
anim.Play("LoopPullReverse", 0, normalized);
|
||||||
pullSound = Jukebox.PlayOneShotGame($"rhythmTweezers/longPull{UnityEngine.Random.Range(1, 5)}");
|
tweezers.anim.Play("Idle", 0, 0);
|
||||||
pluckState = 1;
|
|
||||||
ResetState();
|
if (pullSound != null)
|
||||||
|
pullSound.Stop();
|
||||||
|
|
||||||
|
pluckState = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StartJust(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
// don't count near misses
|
||||||
|
if (state >= 1f || state <= -1f) {
|
||||||
|
pluckState = -1;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (pluckState == 1)
|
if (PlayerInput.GetAnyDirectionDown())
|
||||||
{
|
{
|
||||||
Ace();
|
endInput = InputType.DIRECTION_UP;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
endInput = InputType.STANDARD_UP;
|
||||||
|
}
|
||||||
|
pullSound = Jukebox.PlayOneShotGame($"rhythmTweezers/longPull{UnityEngine.Random.Range(1, 5)}");
|
||||||
|
pluckState = 1;
|
||||||
|
endEvent = game.ScheduleInput(createBeat, game.tweezerBeatOffset + game.beatInterval + 0.5f, endInput, EndJust, Out, Out);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StartMiss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
// this is where perfect challenge breaks
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Out(PlayerActionEvent caller) {}
|
||||||
|
|
||||||
|
private void EndJust(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
if (state <= -1f) {
|
||||||
|
EndEarly();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
EndAce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,7 +27,8 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
public float nextAnimBeat;
|
public float nextAnimBeat;
|
||||||
public float highKickSwing = 0f;
|
public float highKickSwing = 0f;
|
||||||
private float lastSpriteRot;
|
private float lastSpriteRot;
|
||||||
public bool canKick; //unused
|
public bool canKick;
|
||||||
|
public bool waitKickRelease;
|
||||||
private bool lastKickLeft;
|
private bool lastKickLeft;
|
||||||
|
|
||||||
public void Init(Kicker kicker, float dispensedBeat)
|
public void Init(Kicker kicker, float dispensedBeat)
|
||||||
|
@ -182,14 +183,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
|
|
||||||
holder.transform.localPosition = dispenseCurve.GetPoint(normalizedBeatAnim);
|
holder.transform.localPosition = dispenseCurve.GetPoint(normalizedBeatAnim);
|
||||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(0f, -1440f, normalizedBeatAnim));
|
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(0f, -1440f, normalizedBeatAnim));
|
||||||
|
|
||||||
/*if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
Kick();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case State.Kicked:
|
case State.Kicked:
|
||||||
|
@ -208,22 +201,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.transform.localPosition = kickCurve.GetPoint(normalizedBeatAnim);
|
holder.transform.localPosition = kickCurve.GetPoint(normalizedBeatAnim);
|
||||||
|
|
||||||
/*if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
if (kicker.canHighKick)
|
|
||||||
{
|
|
||||||
HighKick();
|
|
||||||
}
|
|
||||||
else if (kicker.canKick)
|
|
||||||
{
|
|
||||||
Kick();
|
|
||||||
}
|
|
||||||
// print(normalizedBeat);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case State.HighKicked:
|
case State.HighKicked:
|
||||||
|
@ -234,24 +211,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
|
|
||||||
holder.transform.localPosition = highKickCurve.GetPoint(normalizedBeatAnim);
|
holder.transform.localPosition = highKickCurve.GetPoint(normalizedBeatAnim);
|
||||||
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, lastSpriteRot + 360f, normalizedBeatAnim));
|
spriteHolder.transform.eulerAngles = new Vector3(0, 0, Mathf.Lerp(lastSpriteRot, lastSpriteRot + 360f, normalizedBeatAnim));
|
||||||
|
|
||||||
// if (state.perfect) Debug.Break();
|
|
||||||
|
|
||||||
/*if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
kickPrepare = true;
|
|
||||||
kicker.Kick(this);
|
|
||||||
}
|
|
||||||
if (kickPrepare)
|
|
||||||
{
|
|
||||||
if (PlayerInput.PressedUp())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
Toe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case State.Toe:
|
case State.Toe:
|
||||||
|
|
|
@ -8,6 +8,8 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
{
|
{
|
||||||
public class Kicker : PlayerActionObject
|
public class Kicker : PlayerActionObject
|
||||||
{
|
{
|
||||||
|
SpaceSoccer game;
|
||||||
|
|
||||||
[Header("Properties")]
|
[Header("Properties")]
|
||||||
public bool canKick = true; //why was this false by default???
|
public bool canKick = true; //why was this false by default???
|
||||||
public bool canHighKick;
|
public bool canHighKick;
|
||||||
|
@ -21,40 +23,25 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
private Animator anim;
|
private Animator anim;
|
||||||
public Ball ball;
|
public Ball ball;
|
||||||
|
|
||||||
|
PlayerActionEvent nextHit;
|
||||||
|
PlayerActionEvent nextAutoKick;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
game = SpaceSoccer.instance;
|
||||||
anim = GetComponent<Animator>();
|
anim = GetComponent<Animator>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAce()
|
public void DispenseBall(float beat)
|
||||||
{
|
{
|
||||||
if (ball.state == Ball.State.HighKicked)
|
if (player)
|
||||||
{
|
{
|
||||||
if (!kickPrepare)
|
nextHit = game.ScheduleInput(beat, ball.GetAnimLength(Ball.State.Dispensing), InputType.STANDARD_DOWN, KickJust, Miss, Out);
|
||||||
{
|
|
||||||
Kick(false, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Toe(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (canHighKick)
|
|
||||||
{
|
|
||||||
HighKick(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Kick(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Kick(bool hit, bool highKick = false)
|
public void Kick(bool hit, bool highKick = false)
|
||||||
{
|
{
|
||||||
kickTimes++;
|
|
||||||
aceTimes = 0;
|
aceTimes = 0;
|
||||||
|
|
||||||
if (player)
|
if (player)
|
||||||
|
@ -87,6 +74,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
|
|
||||||
if (highKick == false)
|
if (highKick == false)
|
||||||
{
|
{
|
||||||
|
kickTimes++;
|
||||||
if (ball != null && hit)
|
if (ball != null && hit)
|
||||||
ball.Kick(player);
|
ball.Kick(player);
|
||||||
}
|
}
|
||||||
|
@ -94,8 +82,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
{
|
{
|
||||||
kickPrepare = true;
|
kickPrepare = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HighKick(bool hit)
|
public void HighKick(bool hit)
|
||||||
|
@ -123,8 +109,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
if (player)
|
if (player)
|
||||||
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe1");
|
Jukebox.PlayOneShotGame("spaceSoccer/highkicktoe1");
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Toe(bool hit)
|
public void Toe(bool hit)
|
||||||
|
@ -153,8 +137,8 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
if (hit && ball)
|
if (hit && ball)
|
||||||
ball.Toe();
|
ball.Toe();
|
||||||
|
|
||||||
|
kickTimes++;
|
||||||
kickPrepare = false;
|
kickPrepare = false;
|
||||||
ResetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
@ -168,21 +152,6 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
kickLeft = true;
|
kickLeft = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// List<Beatmap.Entity> keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up");
|
|
||||||
// for (int i = 0; i < keepUps.Count; i++)
|
|
||||||
// {
|
|
||||||
// if ((keepUps[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (keepUps[i].beat + keepUps[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
|
||||||
// {
|
|
||||||
// canKick = true;
|
|
||||||
// canHighKick = false;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// canKick = false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
var highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
var highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
||||||
for (int i = 0; i < highKicks.Count; i++)
|
for (int i = 0; i < highKicks.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -206,128 +175,29 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ball)
|
if (player)
|
||||||
{
|
{
|
||||||
switch (ball.state)
|
if (PlayerInput.Pressed() && !game.IsExpectingInputNow(InputType.STANDARD_DOWN))
|
||||||
{
|
{
|
||||||
case Ball.State.Dispensing:
|
if (ball == null)
|
||||||
{
|
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromBeat(ball.startBeat, ball.GetAnimLength(Ball.State.Dispensing));
|
|
||||||
StateCheck(normalizedBeat, !player);
|
|
||||||
CheckIfFall(normalizedBeat);
|
|
||||||
|
|
||||||
if (player)
|
|
||||||
{
|
|
||||||
if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
KickCheck(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
KickCheck(false, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case Ball.State.Kicked:
|
|
||||||
{
|
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromBeat(ball.startBeat, ball.GetAnimLength(Ball.State.Kicked));
|
|
||||||
StateCheck(normalizedBeat, !player);
|
|
||||||
CheckIfFall(normalizedBeat);
|
|
||||||
|
|
||||||
if (player)
|
|
||||||
{
|
|
||||||
if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
KickCheck(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
KickCheck(false, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case Ball.State.HighKicked:
|
|
||||||
{
|
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromMargin(ball.startBeat + ball.GetAnimLength(Ball.State.HighKicked), 1f);
|
|
||||||
if (!kickPrepare)
|
|
||||||
{
|
|
||||||
float normalizedBeatPrepare = Conductor.instance.GetPositionFromBeat(ball.startBeat, 1f);
|
|
||||||
StateCheck(normalizedBeatPrepare, !player);
|
|
||||||
CheckIfFall(normalizedBeat);
|
|
||||||
|
|
||||||
if (player)
|
|
||||||
{
|
|
||||||
if (PlayerInput.Pressed() || PlayerInput.AltPressed())
|
|
||||||
{
|
|
||||||
Kick(false, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
StateCheck(normalizedBeat, !player);
|
|
||||||
CheckIfFall(normalizedBeat);
|
|
||||||
|
|
||||||
if (player)
|
|
||||||
{
|
|
||||||
if (PlayerInput.PressedUp() || PlayerInput.AltPressedUp())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
Toe(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Toe(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case Ball.State.Toe:
|
|
||||||
{
|
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromMargin(ball.startBeat + ball.GetAnimLength(Ball.State.Toe), 1f);
|
|
||||||
StateCheck(normalizedBeat, !player);
|
|
||||||
CheckIfFall(normalizedBeat);
|
|
||||||
|
|
||||||
if (player)
|
|
||||||
{
|
|
||||||
if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
KickCheck(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
KickCheck(false, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (player)
|
|
||||||
{
|
|
||||||
if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
KickCheck(false, true);
|
KickCheck(false, true);
|
||||||
|
else
|
||||||
|
Kick(false, ball.canKick);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (PlayerInput.PressedUp() && ball != null)
|
||||||
|
{
|
||||||
|
if (ball.waitKickRelease)
|
||||||
|
{
|
||||||
|
ball.waitKickRelease = false;
|
||||||
|
}
|
||||||
|
else if (ball.canKick && !game.IsExpectingInputNow(InputType.STANDARD_UP))
|
||||||
|
{
|
||||||
|
ball.canKick = false;
|
||||||
|
Kick(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void KickCheck(bool hit, bool overrideState = false)
|
private void KickCheck(bool hit, bool overrideState = false)
|
||||||
|
@ -346,14 +216,71 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckIfFall(float normalizedBeat)
|
void MissBall(float targetBeat)
|
||||||
{
|
{
|
||||||
if (normalizedBeat > Minigame.LateTime() && (!GameManager.instance.autoplay || !GameManager.instance.canInput))
|
var cond = Conductor.instance;
|
||||||
{
|
ball = null;
|
||||||
Jukebox.PlayOneShotGame("spaceSoccer/missNeutral");
|
// queue the miss sound
|
||||||
ball = null;
|
MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("spaceSoccer/missNeutral", targetBeat + (float)cond.SecsToBeats(Minigame.EndTime()-1, cond.GetBpmAtBeat(targetBeat))) });
|
||||||
ResetState();
|
}
|
||||||
|
|
||||||
|
private void KickJust(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
if (ball == null || state >= 1f || state <= -1f) { //todo: proper near miss feedback
|
||||||
|
KickCheck(false, true);
|
||||||
|
MissBall(caller.startBeat + caller.timer);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
KickCheck(true);
|
||||||
|
if (canHighKick)
|
||||||
|
{
|
||||||
|
// queue high kick inputs
|
||||||
|
nextHit = game.ScheduleInput(caller.startBeat + caller.timer, ball.GetAnimLength(Ball.State.Toe), InputType.STANDARD_UP, ToeJust, Miss, Out);
|
||||||
|
nextAutoKick = game.ScheduleAutoplayInput(caller.startBeat + caller.timer, ball.GetAnimLength(Ball.State.Kicked), InputType.STANDARD_DOWN, ToePrepareJust, Out, Out);
|
||||||
|
ball.canKick = true;
|
||||||
|
ball.waitKickRelease = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// queue normal kick input
|
||||||
|
nextHit = game.ScheduleInput(caller.startBeat + caller.timer, ball.GetAnimLength(Ball.State.Kicked), InputType.STANDARD_DOWN, KickJust, Miss, Out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Miss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
if (ball != null)
|
||||||
|
MissBall(caller.startBeat + caller.timer);
|
||||||
|
|
||||||
|
// if this were any other keep the beat game you'd cue the next input here
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ToeJust(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
if (ball == null || (!ball.canKick) || state >= 1f || state <= -1f) { //todo: proper near miss feedback
|
||||||
|
Toe(false);
|
||||||
|
MissBall(caller.startBeat + caller.timer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Toe(true);
|
||||||
|
nextHit = game.ScheduleInput(caller.startBeat, 3f, InputType.STANDARD_DOWN, KickJust, Miss, Out);
|
||||||
|
ball.canKick = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ToePrepareJust(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
//autoplay only
|
||||||
|
Kick(true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Out(PlayerActionEvent caller) {}
|
||||||
|
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
if (nextHit != null)
|
||||||
|
nextHit.Disable();
|
||||||
|
if (nextAutoKick != null)
|
||||||
|
nextAutoKick.Disable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -116,6 +116,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
DispenseSound(beat);
|
DispenseSound(beat);
|
||||||
}
|
}
|
||||||
|
kicker.DispenseBall(beat);
|
||||||
|
|
||||||
kicker.canKick = true;
|
kicker.canKick = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,15 +35,12 @@ namespace HeavenStudio.Games.Scripts_Spaceball
|
||||||
float rot = Random.Range(0, 360);
|
float rot = Random.Range(0, 360);
|
||||||
Sprite.gameObject.transform.eulerAngles = new Vector3(0, 0, rot);
|
Sprite.gameObject.transform.eulerAngles = new Vector3(0, 0, rot);
|
||||||
|
|
||||||
|
|
||||||
// PlayerActionInit(this.gameObject, startBeat, Spaceball.instance.EligibleHits);
|
|
||||||
|
|
||||||
isEligible = true;
|
isEligible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAce()
|
private void Start()
|
||||||
{
|
{
|
||||||
this.Hit();
|
Spaceball.instance.ScheduleInput(startBeat, high ? 2f : 1f, InputType.STANDARD_DOWN, Just, Miss, Out);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Hit()
|
private void Hit()
|
||||||
|
@ -67,7 +64,7 @@ namespace HeavenStudio.Games.Scripts_Spaceball
|
||||||
SpaceballPlayer.instance.Swing(this);
|
SpaceballPlayer.instance.Swing(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Miss()
|
private void NearMiss()
|
||||||
{
|
{
|
||||||
Holder.transform.GetChild(0).gameObject.AddComponent<Rotate>().rotateSpeed = -55;
|
Holder.transform.GetChild(0).gameObject.AddComponent<Rotate>().rotateSpeed = -55;
|
||||||
|
|
||||||
|
@ -85,9 +82,10 @@ namespace HeavenStudio.Games.Scripts_Spaceball
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
var cond = Conductor.instance;
|
||||||
if (hit)
|
if (hit)
|
||||||
{
|
{
|
||||||
float nba = Conductor.instance.GetPositionFromBeat(hitBeat, 14);
|
float nba = cond.GetPositionFromBeat(hitBeat, 14);
|
||||||
Holder.transform.localPosition = Vector3.Lerp(hitPos, new Vector3(randomEndPosX, 0f, -600f), nba);
|
Holder.transform.localPosition = Vector3.Lerp(hitPos, new Vector3(randomEndPosX, 0f, -600f), nba);
|
||||||
Holder.transform.eulerAngles = Vector3.Lerp(new Vector3(0, 0, hitRot), new Vector3(0, 0, -2260), nba);
|
Holder.transform.eulerAngles = Vector3.Lerp(new Vector3(0, 0, hitRot), new Vector3(0, 0, -2260), nba);
|
||||||
}
|
}
|
||||||
|
@ -96,8 +94,7 @@ namespace HeavenStudio.Games.Scripts_Spaceball
|
||||||
float beatLength = 1f;
|
float beatLength = 1f;
|
||||||
if (high) beatLength = 2f;
|
if (high) beatLength = 2f;
|
||||||
|
|
||||||
float normalizedBeatAnim = Conductor.instance.GetPositionFromBeat(startBeat, beatLength + 0.15f);
|
float normalizedBeatAnim = cond.GetPositionFromBeat(startBeat, beatLength + (float)cond.SecsToBeats(Minigame.EndTime()-1, cond.GetBpmAtBeat(startBeat + beatLength)));
|
||||||
// print(normalizedBeatAnim + " " + Time.frameCount);
|
|
||||||
|
|
||||||
if (high)
|
if (high)
|
||||||
{
|
{
|
||||||
|
@ -109,35 +106,25 @@ namespace HeavenStudio.Games.Scripts_Spaceball
|
||||||
}
|
}
|
||||||
|
|
||||||
anim.speed = 0;
|
anim.speed = 0;
|
||||||
|
|
||||||
float normalizedBeat = Conductor.instance.GetPositionFromBeat(startBeat, beatLength);
|
|
||||||
|
|
||||||
StateCheck(normalizedBeat);
|
|
||||||
|
|
||||||
if (PlayerInput.Pressed())
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
Hit();
|
|
||||||
}
|
|
||||||
else if (state.notPerfect())
|
|
||||||
{
|
|
||||||
Miss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// too lazy to make a proper fix for this
|
|
||||||
float endTime = 1.2f;
|
|
||||||
if (high) endTime = 1.1f;
|
|
||||||
|
|
||||||
if (normalizedBeat > endTime)
|
|
||||||
{
|
|
||||||
Jukebox.PlayOneShotGame("spaceball/fall");
|
|
||||||
Instantiate(Spaceball.instance.Dust, Spaceball.instance.Dust.transform.parent).SetActive(true);
|
|
||||||
Destroy(this.gameObject);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
private void Just(PlayerActionEvent caller, float state)
|
||||||
|
{
|
||||||
|
if (state >= 1f || state <= -1f) {
|
||||||
|
NearMiss();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Hit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Miss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
Jukebox.PlayOneShotGame("spaceball/fall");
|
||||||
|
Instantiate(Spaceball.instance.Dust, Spaceball.instance.Dust.transform.parent).SetActive(true);
|
||||||
|
Destroy(this.gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Out(PlayerActionEvent caller) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,10 @@ namespace HeavenStudio.Games.Scripts_WizardsWaltz
|
||||||
animator.Play("Appear", 0, 0);
|
animator.Play("Appear", 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Start() {
|
||||||
|
game.ScheduleInput(createBeat, game.beatInterval, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, Just, Miss, Out);
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (!passed && Conductor.instance.songPositionInBeats > createBeat + game.beatInterval)
|
if (!passed && Conductor.instance.songPositionInBeats > createBeat + game.beatInterval)
|
||||||
|
@ -31,23 +35,6 @@ namespace HeavenStudio.Games.Scripts_WizardsWaltz
|
||||||
StartCoroutine(FadeOut());
|
StartCoroutine(FadeOut());
|
||||||
passed = true;
|
passed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hit) return;
|
|
||||||
|
|
||||||
float stateBeat = Conductor.instance.GetPositionFromMargin(createBeat + game.beatInterval, 1f);
|
|
||||||
StateCheck(stateBeat);
|
|
||||||
|
|
||||||
if (PlayerInput.Pressed(true))
|
|
||||||
{
|
|
||||||
if (state.perfect)
|
|
||||||
{
|
|
||||||
Ace();
|
|
||||||
} else if (state.notPerfect())
|
|
||||||
{
|
|
||||||
Miss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Bloom()
|
public void Bloom()
|
||||||
|
@ -81,17 +68,28 @@ namespace HeavenStudio.Games.Scripts_WizardsWaltz
|
||||||
hit = true;
|
hit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Miss()
|
public void NearMiss()
|
||||||
{
|
{
|
||||||
game.wizard.Magic(this, false);
|
game.wizard.Magic(this, false);
|
||||||
hit = true;
|
hit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnAce()
|
private void Just(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
|
if (state >= 1f || state <= -1f) {
|
||||||
|
NearMiss();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Ace();
|
Ace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Miss(PlayerActionEvent caller)
|
||||||
|
{
|
||||||
|
// this is where perfect challenge breaks
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Out(PlayerActionEvent caller) {}
|
||||||
|
|
||||||
public IEnumerator FadeOut()
|
public IEnumerator FadeOut()
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(Conductor.instance.secPerBeat * game.beatInterval / 2f);
|
yield return new WaitForSeconds(Conductor.instance.secPerBeat * game.beatInterval / 2f);
|
||||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
||||||
ManifestFileVersion: 0
|
ManifestFileVersion: 0
|
||||||
CRC: 67804883
|
CRC: 3583203723
|
||||||
Hashes:
|
Hashes:
|
||||||
AssetFileHash:
|
AssetFileHash:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
Hash: 12b838a94c79042ad1655edbf842a8f6
|
Hash: 590369c115e99f9279a3225b566e911b
|
||||||
TypeTreeHash:
|
TypeTreeHash:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
Hash: 9a2ca7bdbd1871f7131daf57de908e0c
|
Hash: 9a2ca7bdbd1871f7131daf57de908e0c
|
||||||
|
@ -13,21 +13,21 @@ ClassTypes:
|
||||||
Script: {instanceID: 0}
|
Script: {instanceID: 0}
|
||||||
SerializeReferenceClassIdentifiers: []
|
SerializeReferenceClassIdentifiers: []
|
||||||
Assets:
|
Assets:
|
||||||
- Assets/Resources/Sfx/games/karateman/punchKick4.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchKick4.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/one.ogg
|
- Assets/Resources/Sfx/games/karateman/en/one.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchy2.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchy2.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/threeAlt.wav
|
- Assets/Resources/Sfx/games/karateman/en/threeAlt.wav
|
||||||
- Assets/Resources/Sfx/games/karateman/hitAlt.wav
|
- Assets/Resources/Sfx/games/karateman/en/hitAlt.wav
|
||||||
- Assets/Resources/Sfx/games/karateman/two.ogg
|
- Assets/Resources/Sfx/games/karateman/en/two.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchKick3.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchKick3.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/four.ogg
|
- Assets/Resources/Sfx/games/karateman/en/four.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchKick1.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchKick1.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/pow.ogg
|
- Assets/Resources/Sfx/games/karateman/en/pow.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchy3.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchy3.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/ko.ogg
|
- Assets/Resources/Sfx/games/karateman/en/ko.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchy1.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchy1.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchy4.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchy4.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/hit.ogg
|
- Assets/Resources/Sfx/games/karateman/en/hit.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/three.ogg
|
- Assets/Resources/Sfx/games/karateman/en/three.ogg
|
||||||
- Assets/Resources/Sfx/games/karateman/punchKick2.ogg
|
- Assets/Resources/Sfx/games/karateman/en/punchKick2.ogg
|
||||||
Dependencies: []
|
Dependencies: []
|
||||||
|
|
|
@ -51,7 +51,7 @@ PlayerSettings:
|
||||||
m_MTRendering: 1
|
m_MTRendering: 1
|
||||||
mipStripping: 0
|
mipStripping: 0
|
||||||
numberOfMipsStripped: 0
|
numberOfMipsStripped: 0
|
||||||
m_StackTraceTypes: 020000000200000002000000020000000200000001000000
|
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
||||||
iosShowActivityIndicatorOnLoading: -1
|
iosShowActivityIndicatorOnLoading: -1
|
||||||
androidShowActivityIndicatorOnLoading: -1
|
androidShowActivityIndicatorOnLoading: -1
|
||||||
iosUseCustomAppBackgroundBehavior: 0
|
iosUseCustomAppBackgroundBehavior: 0
|
||||||
|
|
Loading…
Reference in a new issue