fix air rally swing on pad release
This commit is contained in:
parent
1d68f621d8
commit
cf56756267
|
|
@ -151,7 +151,7 @@ namespace HeavenStudio
|
|||
time = startPos;
|
||||
firstBeatOffset = offset;
|
||||
|
||||
SeekMusicToTime(startPos);
|
||||
SeekMusicToTime(startPos, offset);
|
||||
|
||||
songPosBeat = GetBeatFromSongPos(time);
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ namespace HeavenStudio
|
|||
|
||||
if (musicSource.clip != null && startPos < musicSource.clip.length - offset)
|
||||
{
|
||||
SeekMusicToTime(startPos);
|
||||
SeekMusicToTime(startPos, offset);
|
||||
double musicStartDelay = -offset - startPos;
|
||||
if (musicStartDelay > 0)
|
||||
{
|
||||
|
|
@ -274,9 +274,8 @@ namespace HeavenStudio
|
|||
StopOnlyAudio();
|
||||
}
|
||||
|
||||
void SeekMusicToTime(double fStartPos)
|
||||
void SeekMusicToTime(double fStartPos, double offset)
|
||||
{
|
||||
double offset = GameManager.instance.Beatmap.data.offset;
|
||||
if (musicSource.clip != null && fStartPos < musicSource.clip.length - offset)
|
||||
{
|
||||
// https://www.desmos.com/calculator/81ywfok6xk
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ namespace HeavenStudio.Games
|
|||
Baxter.DoScaledAnimationAsync("Idle", 0.5f);
|
||||
}
|
||||
}
|
||||
if (PlayerInput.GetIsAction(InputAction_FlickRelease) && !IsExpectingInputNow(InputAction_FlickRelease))
|
||||
if (PlayerInput.GetIsAction(InputAction_FlickPress) && !IsExpectingInputNow(InputAction_FlickPress))
|
||||
{
|
||||
Baxter.DoScaledAnimationAsync("Hit", 0.5f);
|
||||
SoundByte.PlayOneShotGame("airRally/swing");
|
||||
|
|
|
|||
Loading…
Reference in a new issue