diff --git a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs index 8e023f034..5023918fb 100644 --- a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs +++ b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs @@ -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 keepUps = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "spaceSoccer/keep-up"); + // List 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 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; } } diff --git a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs index ae322a546..59c3e546a 100644 --- a/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs +++ b/Assets/Scripts/Games/SpaceSoccer/SpaceSoccer.cs @@ -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() { 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; } }