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:
minenice55
2023-10-29 15:44:47 -04:00
committed by GitHub
parent 4afa1f646c
commit 3002e48350
220 changed files with 55447 additions and 8426 deletions

View File

@ -128,6 +128,10 @@ namespace HeavenStudio.Games
public static DJSchool instance { get; private set; }
public static PlayerInput.InputAction InputAction_TouchRelease =
new("NtrDjTouchRelease", new int[] { IAEmptyCat, IAReleaseCat, IAEmptyCat },
IA_Empty, IA_TouchBasicRelease, IA_Empty);
private void Awake()
{
instance = this;
@ -250,34 +254,31 @@ namespace HeavenStudio.Games
lastReportedBeat = Math.Round(Conductor.instance.songPositionInBeatsAsDouble);
}
if(PlayerInput.Pressed() && !IsExpectingInputNow() && !student.isHolding) //Start hold miss
if(PlayerInput.GetIsAction(InputAction_BasicPress) && !IsExpectingInputNow(InputAction_BasicPress) && !student.isHolding) //Start hold miss
{
student.OnMissHoldForPlayerInput();
student.isHolding = true;
ScoreMiss();
}
else if(PlayerInput.PressedUp() && !IsExpectingInputNow() && student.isHolding) //Let go during hold
else if(((PlayerInput.GetIsAction(InputAction_BasicRelease) && !IsExpectingInputNow(InputAction_FlickRelease))
|| PlayerInput.GetIsAction(InputAction_TouchRelease))
&& student.isHolding) //Let go during hold
{
student.UnHold();
shouldBeHolding = false;
}
else if (!GameManager.instance.autoplay && shouldBeHolding && !PlayerInput.Pressing() && !IsExpectingInputNow(InputType.STANDARD_UP))
else if(PlayerInput.GetIsAction(InputAction_FlickRelease) && !IsExpectingInputNow(InputAction_FlickRelease) && student.isHolding) //Flick during hold
{
student.OnFlickSwipe();
shouldBeHolding = false;
}
else if (!GameManager.instance.autoplay && shouldBeHolding && !PlayerInput.GetIsAction(InputAction_BasicPressing) && !IsExpectingInputNow(InputAction_FlickRelease))
{
student.UnHold();
shouldBeHolding = false;
}
//else if(PlayerInput.PressedUp() && !IsExpectingInputNow() && !student.isHolding)
//{
// student.OnMissSwipeForPlayerInput();
//}
}
//public void Bop(float beat, float length)
//{
// bop.startBeat = beat;
// bop.length = length;
//}
public void ForceHold()
{
student.ForceHold();
@ -401,7 +402,7 @@ namespace HeavenStudio.Games
}),
});
andStop = true;
ScheduleInput(beat, 2f, InputType.STANDARD_DOWN, student.OnHitHold, student.OnMissHold, student.OnEmpty);
ScheduleInput(beat, 2f, InputAction_BasicPress, student.OnHitHold, student.OnMissHold, student.OnEmpty);
}
public void AndStop(double beat, bool ooh, bool doSound = true)
@ -447,7 +448,7 @@ namespace HeavenStudio.Games
});
andStop = true;
ScheduleInput(beat, 1.5f, InputType.STANDARD_DOWN, student.OnHitHold, student.OnMissHold, student.OnEmpty);
ScheduleInput(beat, 1.5f, InputAction_BasicPress, student.OnHitHold, student.OnMissHold, student.OnEmpty);
}
public void ScratchoHey(double beat, int type, bool remix4, bool cheer)
@ -511,11 +512,11 @@ namespace HeavenStudio.Games
if (cheer)
{
ScheduleInput(beat, timing, InputType.STANDARD_UP, student.OnHitSwipeCheer, student.OnMissSwipe, student.OnEmpty);
ScheduleInput(beat, timing, InputAction_FlickRelease, student.OnHitSwipeCheer, student.OnMissSwipe, student.OnEmpty);
}
else
{
ScheduleInput(beat, timing, InputType.STANDARD_UP, student.OnHitSwipe, student.OnMissSwipe, student.OnEmpty);
ScheduleInput(beat, timing, InputAction_FlickRelease, student.OnHitSwipe, student.OnMissSwipe, student.OnEmpty);
}
andStop = false;