mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-23 01:55:16 +00:00
remove the need to use Space Soccer "keep-up" entity
This commit is contained in:
parent
1c95c317b8
commit
86b34fbb52
2 changed files with 20 additions and 16 deletions
|
@ -9,7 +9,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
|||
public class Kicker : PlayerActionObject
|
||||
{
|
||||
[Header("Properties")]
|
||||
public bool canKick;
|
||||
public bool canKick = true; //why was this false by default???
|
||||
public bool canHighKick;
|
||||
private bool kickPrepare = false;
|
||||
public bool kickLeft;
|
||||
|
@ -168,21 +168,22 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
|||
kickLeft = true;
|
||||
}
|
||||
|
||||
List<Beatmap.Entity> keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up");
|
||||
// List<Beatmap.Entity> keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up");
|
||||
// for (int i = 0; i < keepUps.Count; i++)
|
||||
// {
|
||||
// if ((keepUps[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (keepUps[i].beat + keepUps[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
||||
// {
|
||||
// canKick = true;
|
||||
// canHighKick = false;
|
||||
// break;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// canKick = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
List<Beatmap.Entity> highKicks = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/high kick-toe!");
|
||||
for (int i = 0; i < keepUps.Count; i++)
|
||||
{
|
||||
if ((keepUps[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && (keepUps[i].beat + keepUps[i].length) - 0.15f > Conductor.instance.songPositionInBeats)
|
||||
{
|
||||
canKick = true;
|
||||
canHighKick = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
canKick = false;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < highKicks.Count; i++)
|
||||
{
|
||||
if ((highKicks[i].beat - 0.15f) <= Conductor.instance.songPositionInBeats && highKicks[i].beat + 1f > Conductor.instance.songPositionInBeats)
|
||||
|
@ -200,6 +201,7 @@ namespace HeavenStudio.Games.Scripts_SpaceSoccer
|
|||
}
|
||||
else
|
||||
{
|
||||
canKick = true;
|
||||
canHighKick = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,11 +18,11 @@ namespace HeavenStudio.Games.Loaders
|
|||
new Param("toggle", false, "Disable Sound", "Disables the dispense sound")
|
||||
},
|
||||
inactiveFunction: delegate { if (!eventCaller.currentEntity.toggle) { SpaceSoccer.DispenseSound(eventCaller.currentEntity.beat); } }),
|
||||
new GameAction("keep-up", delegate { }, 4f, true),
|
||||
new GameAction("high kick-toe!", delegate { }, 3f, false, new List<Param>()
|
||||
{
|
||||
new Param("swing", new EntityTypes.Float(0, 1, 0.5f), "Swing", "The amount of swing")
|
||||
}),
|
||||
new GameAction("keep-up", delegate { }, 4f, true, hidden: true),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -102,6 +102,8 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
DispenseSound(beat);
|
||||
}
|
||||
|
||||
kicker.canKick = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue