mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 11:57:37 +02:00
Alternate Control Styles Support (#554)
* add mouse controller * support different control styles in options deprecate old input check methods * fully functional input actions system * btsds InputAction * blue bear InputAction * more games fix bugs with some input related systems * coin toss re-toss * cheer readers touch * dog ninja touch * multiple games * last of the easy games' touch * more specialized games * specialized games 2 * finish ktb games * remove legacy settings disclaimer * "only" two games left * karate man touch * rockers touch still needs fixes and bad judge strum * DSGuy flicking animation * playstyle chart property * improve performance of minigame preloading * improve look of cursor make assetbundles use chunk-based compression refactor assetbundle loading methods a bit * prime conductor stream playback to stabilize seeking operations * fix air rally swing on pad release * use virtual mouse pointer * add UniTask * make BeatAction use UniTask * implement UniTask to replace some coroutines * add touch style UI elements and effects games now support the ability to define two cursor colours if they need split screen touch inputs * update plugins and buildscript * implement thresholded pointer position clipping * fix clamping * instant show / hide fix discord game SDK crashes
This commit is contained in:
@ -96,7 +96,11 @@ namespace HeavenStudio.Games
|
||||
double playerBopStart = double.MinValue;
|
||||
double girlBopStart = double.MinValue;
|
||||
bool showBubble = true;
|
||||
bool playerReady;
|
||||
|
||||
public static PlayerInput.InputAction InputAction_TouchPressing =
|
||||
new("PcoTrickTouching", new int[] { IAEmptyCat, IAPressingCat, IAEmptyCat },
|
||||
IA_Empty, IA_TouchBasicPressing, IA_Empty);
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
@ -117,7 +121,7 @@ namespace HeavenStudio.Games
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1) && goBop)
|
||||
{
|
||||
if (cond.songPositionInBeatsAsDouble > playerBopStart)
|
||||
if ((!playerReady) && cond.songPositionInBeatsAsDouble > playerBopStart)
|
||||
playerAnim.DoScaledAnimationAsync("Bop");
|
||||
|
||||
if (cond.songPositionInBeatsAsDouble > girlBopStart)
|
||||
@ -155,7 +159,18 @@ namespace HeavenStudio.Games
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.Pressed() && !IsExpectingInputNow() && (playerCanDodge <= Conductor.instance.songPositionInBeatsAsDouble))
|
||||
if (PlayerInput.GetIsAction(InputAction_TouchPressing) && (!playerReady) && (playerCanDodge <= Conductor.instance.songPositionInBeatsAsDouble))
|
||||
{
|
||||
playerAnim.DoScaledAnimationAsync("Prepare");
|
||||
playerReady = true;
|
||||
}
|
||||
if ((!PlayerInput.GetIsAction(InputAction_TouchPressing)) && playerReady && (playerCanDodge <= Conductor.instance.songPositionInBeatsAsDouble))
|
||||
{
|
||||
playerAnim.DoScaledAnimationAsync("UnPrepare");
|
||||
playerReady = false;
|
||||
}
|
||||
|
||||
if (PlayerInput.GetIsAction(InputAction_FlickPress) && !IsExpectingInputNow(InputAction_FlickPress) && (playerCanDodge <= Conductor.instance.songPositionInBeatsAsDouble))
|
||||
{
|
||||
PlayerDodge(true);
|
||||
playerCanDodge = Conductor.instance.songPositionInBeatsAsDouble + 0.6f;
|
||||
@ -174,7 +189,7 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
new BeatAction.Action(beat + i, delegate
|
||||
{
|
||||
if (cond.songPositionInBeatsAsDouble > playerBopStart)
|
||||
if ((!playerReady) && cond.songPositionInBeatsAsDouble > playerBopStart)
|
||||
playerAnim.DoScaledAnimationAsync("Bop");
|
||||
|
||||
if (cond.songPositionInBeatsAsDouble > girlBopStart)
|
||||
@ -281,12 +296,14 @@ namespace HeavenStudio.Games
|
||||
SoundByte.PlayOneShotGame("trickClass/player_dodge");
|
||||
playerAnim.DoScaledAnimationAsync("Dodge", slow ? 0.6f : 1f);
|
||||
playerBopStart = Conductor.instance.songPositionInBeatsAsDouble + 0.75f;
|
||||
playerReady = false;
|
||||
|
||||
}
|
||||
|
||||
public void PlayerDodgeNg()
|
||||
{
|
||||
playerAnim.DoScaledAnimationAsync("DodgeNg");
|
||||
playerReady = false;
|
||||
playerBopStart = Conductor.instance.songPositionInBeatsAsDouble + 0.75f;
|
||||
playerCanDodge = Conductor.instance.songPositionInBeatsAsDouble + 0.15f;
|
||||
}
|
||||
@ -294,6 +311,7 @@ namespace HeavenStudio.Games
|
||||
public void PlayerThrough()
|
||||
{
|
||||
playerAnim.DoScaledAnimationAsync("Through");
|
||||
playerReady = false;
|
||||
playerBopStart = Conductor.instance.songPositionInBeatsAsDouble + 0.75f;
|
||||
playerCanDodge = Conductor.instance.songPositionInBeatsAsDouble + 0.15f;
|
||||
}
|
||||
|
Reference in New Issue
Block a user