mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-25 19:15:16 +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")]
|
[Header("Properties")]
|
||||||
public float dispensedBeat = 0;
|
public float dispensedBeat = 0;
|
||||||
public bool dispensing;
|
public bool dispensing;
|
||||||
public int hitTimes;
|
public float hitTimes;
|
||||||
private float lastSpriteRot;
|
private float lastSpriteRot;
|
||||||
public bool canKick;
|
public bool canKick;
|
||||||
public GameEvent kicked = new GameEvent();
|
public GameEvent kicked = new GameEvent();
|
||||||
|
@ -38,8 +38,8 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
||||||
|
|
||||||
dispensing = false;
|
dispensing = false;
|
||||||
kicked.enabled = true;
|
kicked.enabled = true;
|
||||||
kicked.startBeat = Conductor.instance.songPositionInBeats;
|
// kicked.startBeat = Conductor.instance.songPositionInBeats;
|
||||||
// kicked.startBeat = dispensedBeat + 2 + hitTimes;
|
kicked.startBeat = dispensedBeat + 2 + hitTimes;
|
||||||
|
|
||||||
hitTimes++;
|
hitTimes++;
|
||||||
|
|
||||||
|
@ -58,6 +58,8 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
||||||
|
|
||||||
public void HighKick()
|
public void HighKick()
|
||||||
{
|
{
|
||||||
|
hitTimes += 1.5f;
|
||||||
|
|
||||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||||
|
|
||||||
dispensing = false;
|
dispensing = false;
|
||||||
|
@ -70,6 +72,8 @@ namespace RhythmHeavenMania.Games.SpaceSoccer
|
||||||
|
|
||||||
public void Toe()
|
public void Toe()
|
||||||
{
|
{
|
||||||
|
hitTimes += 1.5f;
|
||||||
|
|
||||||
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
lastSpriteRot = spriteHolder.transform.eulerAngles.z;
|
||||||
|
|
||||||
highKicked.enabled = false;
|
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)
|
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
||||||
{
|
{
|
||||||
|
print("bruh");
|
||||||
canHighKick = true;
|
canHighKick = true;
|
||||||
canKick = false;
|
canKick = false;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue