fixed an issue where space soccer would sometimes go black because of a kitties change bg color object (#556)

This commit is contained in:
Rapandrasmus 2023-09-26 17:59:21 +02:00 committed by GitHub
parent a77e11d4e3
commit 7f1466c644
1 changed files with 2 additions and 2 deletions

View File

@ -530,7 +530,7 @@ namespace HeavenStudio.Games
colorLength = length; colorLength = length;
colorStart = colorStartSet; colorStart = colorStartSet;
colorEnd = colorEndSet; colorEnd = colorEndSet;
colorStartDot = colorEndDotSet; colorStartDot = colorStartDotSet;
colorEndDot = colorEndDotSet; colorEndDot = colorEndDotSet;
colorEase = (Util.EasingFunction.Ease)ease; colorEase = (Util.EasingFunction.Ease)ease;
} }
@ -538,7 +538,7 @@ namespace HeavenStudio.Games
//call this in OnPlay(double beat) and OnGameSwitch(double beat) //call this in OnPlay(double beat) and OnGameSwitch(double beat)
private void PersistColor(double beat) private void PersistColor(double beat)
{ {
var allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("kitties", new string[] { "bgcolor" }).FindAll(x => x.beat < beat); var allEventsBeforeBeat = EventCaller.GetAllInGameManagerList("spaceSoccer", new string[] { "changeBG" }).FindAll(x => x.beat < beat);
if (allEventsBeforeBeat.Count > 0) if (allEventsBeforeBeat.Count > 0)
{ {
allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case allEventsBeforeBeat.Sort((x, y) => x.beat.CompareTo(y.beat)); //just in case