Nail Carpenter Swing Support (#829)

* BurstLinq

make BGM resync when changing pitch (to test)

* autoswing

some game implementations, most games already work fine

* more game tweaks

* 16th note swing

more game fixes
make pitch change resync optional in the API

* suppress some common warnings

* Update Credits.txt

* nail carpenter swing support
This commit is contained in:
minenice55 2024-04-07 00:56:37 -04:00 committed by GitHub
parent fd1df6687e
commit 44d9ab096d
6 changed files with 11 additions and 8 deletions

View file

@ -3,5 +3,5 @@ guid: 3ca4cc3a8f8bda94cb89a0b7ff76e9d7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: ctrbear/common
assetBundleName: agbcalligraphy/common
assetBundleVariant:

View file

@ -3,5 +3,5 @@ guid: 6d72fff7cc3bd794db624e2bc63f9856
PrefabImporter:
externalObjects: {}
userData:
assetBundleName: ctrbear/common
assetBundleName: agbsickbeats/common
assetBundleVariant:

View file

@ -24,6 +24,7 @@ namespace HeavenStudio.Games.Scripts_NailCarpenter
{
game.ScheduleUserInput(targetBeat, 0, NailCarpenter.InputAction_RegPress, WeakHammmerJust, null, null);
}
targetBeat = Conductor.instance.GetUnSwungBeat(targetBeat);
Update();
}
@ -69,7 +70,7 @@ namespace HeavenStudio.Games.Scripts_NailCarpenter
if (cond.isPlaying && !cond.isPaused)
{
double beat = cond.songPositionInBeats;
double beat = cond.unswungSongPositionInBeatsAsDouble;
Vector3 pos = transform.position;
pos.x = targetX + (float)((beat - targetBeat) * metresPerSecond);
transform.position = pos;

View file

@ -24,6 +24,7 @@ namespace HeavenStudio.Games.Scripts_NailCarpenter
{
game.ScheduleUserInput(targetBeat, 0, NailCarpenter.InputAction_AltPress, StrongHammmerJust, null, null);
}
targetBeat = Conductor.instance.GetUnSwungBeat(targetBeat);
Update();
}
@ -67,7 +68,7 @@ namespace HeavenStudio.Games.Scripts_NailCarpenter
if (cond.isPlaying && !cond.isPaused)
{
double beat = cond.songPositionInBeats;
double beat = cond.unswungSongPositionInBeatsAsDouble;
Vector3 pos = transform.position;
pos.x = targetX + (float)((beat - targetBeat) * metresPerSecond);
transform.position = pos;

View file

@ -214,7 +214,7 @@ namespace HeavenStudio.Games
void Update()
{
var currentBeat = conductor.songPositionInBeatsAsDouble;
double currentBeat = conductor.unswungSongPositionInBeatsAsDouble;
if (!conductor.isPlaying) return;
@ -234,8 +234,8 @@ namespace HeavenStudio.Games
}
// Board scroll.
var boardPos = boardTrans.localPosition;
var newBoardX = currentBeat * scrollMetresPerBeat;
Vector3 boardPos = boardTrans.localPosition;
double newBoardX = currentBeat * scrollMetresPerBeat;
newBoardX %= boardWidth;
boardTrans.localPosition = new Vector3((float)newBoardX, boardPos.y, boardPos.z);

View file

@ -34,6 +34,7 @@ namespace HeavenStudio.Games.Scripts_NailCarpenter
AwakeAnim();
game.ScheduleUserInput(targetBeat, 0, NailCarpenter.InputAction_SweetsHit, HammmerJust, null, null);
targetBeat = Conductor.instance.GetUnSwungBeat(targetBeat);
Update();
if (sweetType == sweetsType.Pudding)
@ -109,7 +110,7 @@ namespace HeavenStudio.Games.Scripts_NailCarpenter
if (cond.isPlaying && !cond.isPaused)
{
double beat = cond.songPositionInBeats;
double beat = cond.unswungSongPositionInBeatsAsDouble;
Vector3 pos = transform.position;
pos.x = targetX + (float)((beat - targetBeat) * metresPerSecond);
transform.position = pos;