mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-25 19:15:16 +00:00
OKAY TIME TO SHIP IT
This commit is contained in:
parent
e4a9bca393
commit
006b2a873f
1 changed files with 28 additions and 2 deletions
|
@ -211,6 +211,18 @@ namespace HeavenStudio.Games
|
||||||
private Faces girlFaceCurrent;
|
private Faces girlFaceCurrent;
|
||||||
private Faces monkeyFaceCurrent;
|
private Faces monkeyFaceCurrent;
|
||||||
|
|
||||||
|
public static PlayerInput.InputAction InputAction_Press =
|
||||||
|
new("PcoDressPress", new int[] { IAPressCat, IAFlickCat, IAPressCat },
|
||||||
|
IA_PadAny, IA_TouchBasicPress, IA_BatonBasicPress);
|
||||||
|
|
||||||
|
protected static bool IA_PadAny(out double dt)
|
||||||
|
{
|
||||||
|
return PlayerInput.GetPadDown(InputController.ActionsPad.East, out dt)
|
||||||
|
|| PlayerInput.GetPadDown(InputController.ActionsPad.Up, out dt)
|
||||||
|
|| PlayerInput.GetPadDown(InputController.ActionsPad.Down, out dt)
|
||||||
|
|| PlayerInput.GetPadDown(InputController.ActionsPad.Left, out dt)
|
||||||
|
|| PlayerInput.GetPadDown(InputController.ActionsPad.Right, out dt);
|
||||||
|
}
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
@ -223,7 +235,7 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
bgSpriteRenderer.color = bgColorEase.GetColor();
|
bgSpriteRenderer.color = bgColorEase.GetColor();
|
||||||
|
|
||||||
if (PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress)) {
|
if (PlayerInput.GetIsAction(InputAction_Press) && !IsExpectingInputNow(InputAction_Press)) {
|
||||||
ChangeEmotion(Characters.Girl, Faces.Sad);
|
ChangeEmotion(Characters.Girl, Faces.Sad);
|
||||||
sewingAnim.DoScaledAnimationAsync("Miss", 0.5f);
|
sewingAnim.DoScaledAnimationAsync("Miss", 0.5f);
|
||||||
SoundByte.PlayOneShotGame("dressYourBest/whiff_hit");
|
SoundByte.PlayOneShotGame("dressYourBest/whiff_hit");
|
||||||
|
@ -232,6 +244,8 @@ namespace HeavenStudio.Games
|
||||||
if (conductor.songPositionInBeatsAsDouble >= startIntervalEndBeat) {
|
if (conductor.songPositionInBeatsAsDouble >= startIntervalEndBeat) {
|
||||||
hasMissed = true;
|
hasMissed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScoreMiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,12 +266,14 @@ namespace HeavenStudio.Games
|
||||||
{
|
{
|
||||||
StoreAllCallEntities();
|
StoreAllCallEntities();
|
||||||
PersistPreviousEntities(beat);
|
PersistPreviousEntities(beat);
|
||||||
|
DoInactiveStartInterval(beat, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnPlay(double beat)
|
public override void OnPlay(double beat)
|
||||||
{
|
{
|
||||||
StoreAllCallEntities();
|
StoreAllCallEntities();
|
||||||
PersistPreviousEntities(beat);
|
PersistPreviousEntities(beat);
|
||||||
|
DoInactiveStartInterval(beat, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StoreAllCallEntities()
|
private void StoreAllCallEntities()
|
||||||
|
@ -287,6 +303,16 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DoInactiveStartInterval(double beat, bool fromPlay)
|
||||||
|
{
|
||||||
|
RiqEntity startIntervalEntity = gameManager.Beatmap.Entities.FindLast(e => (fromPlay ? e.beat : e.beat - 2) < beat && e.beat + e.length >= beat && e.datamodel == "dressYourBest/start interval");
|
||||||
|
Debug.Log("startIntervalEntity.beat : " + (startIntervalEntity?.beat ?? -1));
|
||||||
|
if (startIntervalEntity != null) {
|
||||||
|
RiqEntity e = startIntervalEntity;
|
||||||
|
QueueStartInterval(e.beat, e.length, e["autoPass"], e["autoReact"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SetLightFromState(LightState state)
|
private void SetLightFromState(LightState state)
|
||||||
{
|
{
|
||||||
ColorPair colorPair = lightStates[(int)state];
|
ColorPair colorPair = lightStates[(int)state];
|
||||||
|
@ -406,7 +432,7 @@ namespace HeavenStudio.Games
|
||||||
foreach (RiqEntity call in neededCalls)
|
foreach (RiqEntity call in neededCalls)
|
||||||
{
|
{
|
||||||
double relativeBeat = call.beat - startIntervalBeat;
|
double relativeBeat = call.beat - startIntervalBeat;
|
||||||
_ = ScheduleInput(beat, relativeBeat + 1, InputAction_BasicPress, OnHit, OnMiss, null);
|
_ = ScheduleInput(beat, relativeBeat + 1, InputAction_Press, OnHit, OnMiss, null);
|
||||||
}
|
}
|
||||||
if (autoReact) {
|
if (autoReact) {
|
||||||
double reactBeat = (beat * 2) - startIntervalBeat + 1;
|
double reactBeat = (beat * 2) - startIntervalBeat + 1;
|
||||||
|
|
Loading…
Reference in a new issue