Loads of Input Stuff
Making bops not overwrite other animations, making the input system correct with all styles (hopefully), added barelies
This commit is contained in:
parent
d5ad219e80
commit
5b7add8761
BIN
Assets/Resources/Sfx/games/manzai/miss1.ogg
Normal file
BIN
Assets/Resources/Sfx/games/manzai/miss1.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/manzai/miss1.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/manzai/miss1.ogg.meta
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d3b164677295009459d689d536dd40f9
|
||||||
|
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:
|
||||||
BIN
Assets/Resources/Sfx/games/manzai/miss2.ogg
Normal file
BIN
Assets/Resources/Sfx/games/manzai/miss2.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/manzai/miss2.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/manzai/miss2.ogg.meta
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4773c3c9e9fd537439d0929e88890b6c
|
||||||
|
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:
|
||||||
BIN
Assets/Resources/Sfx/games/manzai/missClick.ogg
Normal file
BIN
Assets/Resources/Sfx/games/manzai/missClick.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/manzai/missClick.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/manzai/missClick.ogg.meta
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1c03395d675ccd74f81368af36f952df
|
||||||
|
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:
|
||||||
BIN
Assets/Resources/Sfx/games/manzai/missWrongButton.ogg
Normal file
BIN
Assets/Resources/Sfx/games/manzai/missWrongButton.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Sfx/games/manzai/missWrongButton.ogg.meta
Normal file
22
Assets/Resources/Sfx/games/manzai/missWrongButton.ogg.meta
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c89b71bf930dbfa43b9c000afaf38c05
|
||||||
|
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:
|
||||||
|
|
@ -112,12 +112,19 @@ namespace HeavenStudio.Games
|
||||||
bool ravenBop = true;
|
bool ravenBop = true;
|
||||||
bool vultureBop = true;
|
bool vultureBop = true;
|
||||||
|
|
||||||
|
bool ravenCanBop = true;
|
||||||
|
bool vultureCanBop = true;
|
||||||
|
|
||||||
bool isMoving;
|
bool isMoving;
|
||||||
double movingStartBeat;
|
double movingStartBeat;
|
||||||
double movingLength;
|
double movingLength;
|
||||||
string moveAnim;
|
string moveAnim;
|
||||||
EasingFunction.Ease lastEase;
|
EasingFunction.Ease lastEase;
|
||||||
|
|
||||||
|
bool isPreparingForBoing = false;
|
||||||
|
bool missedWithWrongButton = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public enum WhoBops
|
public enum WhoBops
|
||||||
{
|
{
|
||||||
|
|
@ -191,6 +198,29 @@ namespace HeavenStudio.Games
|
||||||
Outside,
|
Outside,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int IAAltDownCat = IAMAXCAT;
|
||||||
|
|
||||||
|
protected static bool IA_TouchAltPress(out double dt)
|
||||||
|
{
|
||||||
|
return PlayerInput.GetTouchDown(InputController.ActionsTouch.Tap, out dt)
|
||||||
|
&& instance.IsExpectingInputNow(InputAction_Alt);
|
||||||
|
}
|
||||||
|
protected static bool IA_PadAltPress(out double dt)
|
||||||
|
{
|
||||||
|
return PlayerInput.GetPadDown(InputController.ActionsPad.South, out dt);
|
||||||
|
}
|
||||||
|
protected static bool IA_BatonAltPress(out double dt)
|
||||||
|
{
|
||||||
|
return PlayerInput.GetSqueezeDown(out dt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PlayerInput.InputAction InputAction_Alt =
|
||||||
|
new("RvlComediansAlt", new int[] { IAAltDownCat, IAAltDownCat, IAAltDownCat },
|
||||||
|
IA_PadAltPress, IA_TouchFlick, IA_BatonAltPress);
|
||||||
|
public static PlayerInput.InputAction InputAction_TouchRelease =
|
||||||
|
new("RvlDateTouchRelease", new int[] { IAEmptyCat, IAReleaseCat, IAEmptyCat },
|
||||||
|
IA_Empty, IA_TouchBasicRelease, IA_Empty);
|
||||||
|
|
||||||
|
|
||||||
public static Manzai instance;
|
public static Manzai instance;
|
||||||
|
|
||||||
|
|
@ -198,15 +228,16 @@ namespace HeavenStudio.Games
|
||||||
public void Awake()
|
public void Awake()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
|
SetupBopRegion("manzai", "bop", "auto");
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnLateBeatPulse(double beat)
|
public override void OnLateBeatPulse(double beat)
|
||||||
{
|
{
|
||||||
if (vultureBop)
|
if (BeatIsInBopRegion(beat))
|
||||||
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
{
|
||||||
|
if (ravenBop) BopAnimationRaven();
|
||||||
if (ravenBop)
|
if (vultureBop) BopAnimationVulture();
|
||||||
RavenAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Bop(double beat, float length, int whoBops, bool bop, bool autoBop)
|
public void Bop(double beat, float length, int whoBops, bool bop, bool autoBop)
|
||||||
|
|
@ -219,13 +250,25 @@ namespace HeavenStudio.Games
|
||||||
var actions = new List<BeatAction.Action>();
|
var actions = new List<BeatAction.Action>();
|
||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
if (whoBops is (int)WhoBops.Kasuke or (int)WhoBops.Both) actions.Add(new(beat + i, delegate { RavenAnim.DoScaledAnimationAsync("Bop", 0.5f); }));
|
if (whoBops is (int)WhoBops.Kasuke or (int)WhoBops.Both) actions.Add(new(beat + i, delegate { BopAnimationRaven(); }));
|
||||||
if (whoBops is (int)WhoBops.Kosuke or (int)WhoBops.Both) actions.Add(new(beat + i, delegate { VultureAnim.DoScaledAnimationAsync("Bop", 0.5f); }));
|
if (whoBops is (int)WhoBops.Kosuke or (int)WhoBops.Both) actions.Add(new(beat + i, delegate { BopAnimationVulture(); }));
|
||||||
}
|
}
|
||||||
BeatAction.New(this, actions);
|
BeatAction.New(this, actions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void BopAnimationRaven()
|
||||||
|
{
|
||||||
|
if (ravenCanBop)
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BopAnimationVulture()
|
||||||
|
{
|
||||||
|
if (vultureCanBop)
|
||||||
|
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
public void DoPun(double beat, int isBoing, int whichPun)
|
public void DoPun(double beat, int isBoing, int whichPun)
|
||||||
{
|
{
|
||||||
int punOrBoing = isBoing;
|
int punOrBoing = isBoing;
|
||||||
|
|
@ -272,6 +315,7 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public void DoPunHai(double beat, int whichPun)
|
public void DoPunHai(double beat, int whichPun)
|
||||||
{
|
{
|
||||||
|
vultureCanBop = false;
|
||||||
int bubbleAnimation = UnityEngine.Random.Range(0, 2);
|
int bubbleAnimation = UnityEngine.Random.Range(0, 2);
|
||||||
var punName= Enum.GetName(typeof(Puns), whichPun);
|
var punName= Enum.GetName(typeof(Puns), whichPun);
|
||||||
|
|
||||||
|
|
@ -282,26 +326,38 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
new BeatAction.Action(beat + 0.0f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 0.5f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
|
new BeatAction.Action(beat + 2.25f, delegate { ravenCanBop = false; }),
|
||||||
|
new BeatAction.Action(beat + 3.25f, delegate { vultureCanBop = true; ravenCanBop = true; }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BeatAction.New(instance, new List<BeatAction.Action>()
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||||
{
|
{
|
||||||
new BeatAction.Action(beat + 0.0f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 0.5f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 1.0f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 1.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 1.5f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 1.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
|
new BeatAction.Action(beat + 2.25f, delegate { ravenCanBop = false; }),
|
||||||
|
new BeatAction.Action(beat + 3.25f, delegate { vultureCanBop = true; ravenCanBop = true; }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HaiJustFull()
|
public void HaiJustFull(float state)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("manzai/hai", pitch: Conductor.instance.songBpm/98);
|
SoundByte.PlayOneShotGame("manzai/hai", pitch: Conductor.instance.songBpm/98);
|
||||||
SoundByte.PlayOneShotGame("manzai/haiAccent");
|
if (state >= 1f || state <= -1f)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/miss1");
|
||||||
|
SoundByte.PlayOneShotGame("manzai/missClick");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/HaiAccent");
|
||||||
|
}
|
||||||
RavenAnim.DoScaledAnimationAsync("Talk", 0.5f);
|
RavenAnim.DoScaledAnimationAsync("Talk", 0.5f);
|
||||||
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
}
|
}
|
||||||
|
|
@ -313,13 +369,13 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
|
|
||||||
HaiBubbleL.DoScaledAnimationAsync("HaiL", 0.5f);
|
HaiBubbleL.DoScaledAnimationAsync("HaiL", 0.5f);
|
||||||
HaiJustFull();
|
HaiJustFull(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HaiJustR(PlayerActionEvent caller, float state)
|
public void HaiJustR(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
HaiBubbleR.DoScaledAnimationAsync("HaiR", 0.5f);
|
HaiBubbleR.DoScaledAnimationAsync("HaiR", 0.5f);
|
||||||
HaiJustFull();
|
HaiJustFull(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -332,12 +388,21 @@ namespace HeavenStudio.Games
|
||||||
//VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
//VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SlapReady()
|
||||||
|
{
|
||||||
|
if (PlayerInput.CurrentControlStyle != InputController.ControlStyles.Touch)
|
||||||
|
{
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Ready", 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void DoPunBoing(double beat, int whichPun)
|
public void DoPunBoing(double beat, int whichPun)
|
||||||
{
|
{
|
||||||
|
vultureCanBop = false;
|
||||||
int bubbleAnimation = UnityEngine.Random.Range(0, 2);
|
int bubbleAnimation = UnityEngine.Random.Range(0, 2);
|
||||||
var punName= Enum.GetName(typeof(Puns), whichPun);
|
var punName= Enum.GetName(typeof(Puns), whichPun);
|
||||||
|
|
||||||
ScheduleInput(beat, 2.5f, InputAction_BasicPress, BoingJust, BoingMiss, Nothing);
|
ScheduleInput(beat, 2.5f, InputAction_Alt, BoingJust, BoingMiss, Nothing);
|
||||||
|
|
||||||
if ((punName == "DenwariDenwa") || (punName == "IkugawaIkura") || (punName == "KusagaKusai") || (punName == "SarugaSaru"))
|
if ((punName == "DenwariDenwa") || (punName == "IkugawaIkura") || (punName == "KusagaKusai") || (punName == "SarugaSaru"))
|
||||||
{
|
{
|
||||||
|
|
@ -346,7 +411,11 @@ namespace HeavenStudio.Games
|
||||||
new BeatAction.Action(beat + 0.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 0.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 1.25f, delegate { VultureAnim.DoScaledAnimationAsync("Boing", 0.5f); }),
|
new BeatAction.Action(beat + 1.25f, delegate { VultureAnim.DoScaledAnimationAsync("Boing", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 2.00f, delegate { RavenAnim.DoScaledAnimationAsync("Ready", 0.5f); }),
|
new BeatAction.Action(beat + 1.25f, delegate { isPreparingForBoing = true; }),
|
||||||
|
new BeatAction.Action(beat + 2.00f, delegate { SlapReady(); }),
|
||||||
|
new BeatAction.Action(beat + 2.25f, delegate { ravenCanBop = false; }),
|
||||||
|
new BeatAction.Action(beat + 3.20f, delegate { isPreparingForBoing = false; }),
|
||||||
|
new BeatAction.Action(beat + 3.25f, delegate { vultureCanBop = true; ravenCanBop = true; }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -357,7 +426,11 @@ namespace HeavenStudio.Games
|
||||||
new BeatAction.Action(beat + 0.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 0.50f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 1.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
new BeatAction.Action(beat + 1.00f, delegate { VultureAnim.DoScaledAnimationAsync("Talk", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 1.25f, delegate { VultureAnim.DoScaledAnimationAsync("Boing", 0.5f); }),
|
new BeatAction.Action(beat + 1.25f, delegate { VultureAnim.DoScaledAnimationAsync("Boing", 0.5f); }),
|
||||||
new BeatAction.Action(beat + 2.00f, delegate { RavenAnim.DoScaledAnimationAsync("Ready", 0.5f); }),
|
new BeatAction.Action(beat + 1.25f, delegate { isPreparingForBoing = true; }),
|
||||||
|
new BeatAction.Action(beat + 2.00f, delegate { SlapReady(); }),
|
||||||
|
new BeatAction.Action(beat + 2.25f, delegate { ravenCanBop = false; }),
|
||||||
|
new BeatAction.Action(beat + 3.20f, delegate { isPreparingForBoing = false; }),
|
||||||
|
new BeatAction.Action(beat + 3.25f, delegate { vultureCanBop = true; ravenCanBop = true; }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -365,14 +438,26 @@ namespace HeavenStudio.Games
|
||||||
public void BoingJust(PlayerActionEvent caller, float state)
|
public void BoingJust(PlayerActionEvent caller, float state)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("manzai/donaiyanen", pitch: Conductor.instance.songBpm/98);
|
SoundByte.PlayOneShotGame("manzai/donaiyanen", pitch: Conductor.instance.songBpm/98);
|
||||||
SoundByte.PlayOneShotGame("manzai/donaiyanenAccent");
|
if (state >= 1f || state <= -1f)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/miss1");
|
||||||
|
SoundByte.PlayOneShotGame("manzai/missClick");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/donaiyanenAccent");
|
||||||
|
}
|
||||||
RavenAnim.DoScaledAnimationAsync("Attack", 0.5f);
|
RavenAnim.DoScaledAnimationAsync("Attack", 0.5f);
|
||||||
VultureAnim.DoScaledAnimationAsync("Damage", 0.5f);
|
VultureAnim.DoScaledAnimationAsync("Damage", 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BoingMiss(PlayerActionEvent caller)
|
public void BoingMiss(PlayerActionEvent caller)
|
||||||
{
|
{
|
||||||
SoundByte.PlayOneShotGame("manzai/disappointed");
|
if (!missedWithWrongButton)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/disappointed");
|
||||||
|
}
|
||||||
|
missedWithWrongButton = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CustomBoing(double beat)
|
public void CustomBoing(double beat)
|
||||||
|
|
@ -388,6 +473,8 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
public void BirdsSlide(double beat, double length, int goToSide, int ease, bool animation)
|
public void BirdsSlide(double beat, double length, int goToSide, int ease, bool animation)
|
||||||
{
|
{
|
||||||
|
vultureCanBop = false;
|
||||||
|
ravenCanBop = false;
|
||||||
if (animation)
|
if (animation)
|
||||||
{
|
{
|
||||||
RavenAnim.DoScaledAnimationAsync("Move", 0.5f);
|
RavenAnim.DoScaledAnimationAsync("Move", 0.5f);
|
||||||
|
|
@ -398,6 +485,10 @@ namespace HeavenStudio.Games
|
||||||
moveAnim = (goToSide == 0 ? "SlideIn" : "SlideOut");
|
moveAnim = (goToSide == 0 ? "SlideIn" : "SlideOut");
|
||||||
isMoving = true;
|
isMoving = true;
|
||||||
lastEase = (EasingFunction.Ease)ease;
|
lastEase = (EasingFunction.Ease)ease;
|
||||||
|
BeatAction.New(instance, new List<BeatAction.Action>()
|
||||||
|
{
|
||||||
|
new BeatAction.Action(beat + 0.75f, delegate { vultureCanBop = true; ravenCanBop = true; }),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
|
|
@ -409,6 +500,49 @@ namespace HeavenStudio.Games
|
||||||
BothBirdsAnim.DoNormalizedAnimation(moveAnim, newPos);
|
BothBirdsAnim.DoNormalizedAnimation(moveAnim, newPos);
|
||||||
if (normalizedBeat >= 1f) isMoving = false;
|
if (normalizedBeat >= 1f) isMoving = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_Alt))
|
||||||
|
{
|
||||||
|
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch)
|
||||||
|
{
|
||||||
|
if (isPreparingForBoing)
|
||||||
|
{
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Ready", 0.5f);
|
||||||
|
ravenCanBop = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/hai");
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Talk", 0.5f);
|
||||||
|
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/hai");
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Talk", 0.5f);
|
||||||
|
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch && PlayerInput.GetIsAction(InputAction_BasicRelease) && isPreparingForBoing)
|
||||||
|
{
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
|
ravenCanBop = true;
|
||||||
|
}
|
||||||
|
if (PlayerInput.GetIsAction(InputAction_Alt) && !IsExpectingInputNow(InputAction_Alt))
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/miss2");
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Spin", 0.5f);
|
||||||
|
VultureAnim.DoScaledAnimationAsync("Dodge", 0.5f);
|
||||||
|
}
|
||||||
|
if (PlayerInput.GetIsAction(InputAction_BasicPress) && IsExpectingInputNow(InputAction_Alt) && PlayerInput.CurrentControlStyle != InputController.ControlStyles.Touch)
|
||||||
|
{
|
||||||
|
SoundByte.PlayOneShotGame("manzai/missWrongButton");
|
||||||
|
SoundByte.PlayOneShotGame("manzai/hai");
|
||||||
|
RavenAnim.DoScaledAnimationAsync("Talk", 0.5f);
|
||||||
|
VultureAnim.DoScaledAnimationAsync("Bop", 0.5f);
|
||||||
|
missedWithWrongButton = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnGameSwitch(double beat)
|
public override void OnGameSwitch(double beat)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue