mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-09 19:25:10 +00:00
Fixed a space soccer bug that slowly desyncs
This commit is contained in:
parent
8268936e6d
commit
197fbbeb7d
2 changed files with 8 additions and 3 deletions
|
@ -22,7 +22,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
[Header("Properties")]
|
||||
public float dispensedBeat = 0;
|
||||
public bool dispensing;
|
||||
public int hitTimes;
|
||||
public float hitTimes;
|
||||
private float lastSpriteRot;
|
||||
public bool canKick;
|
||||
public GameEvent kicked = new GameEvent();
|
||||
|
@ -38,8 +38,8 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
|
||||
dispensing = false;
|
||||
kicked.enabled = true;
|
||||
kicked.startBeat = Conductor.instance.songPositionInBeats;
|
||||
// kicked.startBeat = dispensedBeat + 2 + hitTimes;
|
||||
// kicked.startBeat = Conductor.instance.songPositionInBeats;
|
||||
kicked.startBeat = dispensedBeat + 2 + hitTimes;
|
||||
|
||||
hitTimes++;
|
||||
|
||||
|
@ -58,6 +58,8 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
|
||||
public void HighKick()
|
||||
{
|
||||
hitTimes += 1.5f;
|
||||
|
||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||
|
||||
dispensing = false;
|
||||
|
@ -70,6 +72,8 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
|
||||
public void Toe()
|
||||
{
|
||||
hitTimes += 1.5f;
|
||||
|
||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||
|
||||
highKicked.enabled = false;
|
||||
|
|
|
@ -171,6 +171,7 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
|||
{
|
||||
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
||||
{
|
||||
print("bruh");
|
||||
canHighKick = true;
|
||||
canKick = false;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue