diff --git a/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs b/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs index 6de35a42c..e559dee75 100644 --- a/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs +++ b/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs @@ -355,6 +355,12 @@ namespace HeavenStudio if (!dynamicData.ContainsKey(param.propertyName)) { type = param.parameter.GetType(); + //add property if it doesn't exist + if (e[param.propertyName] == null) + { + dynamicData.Add(param.propertyName, param.parameter); + continue; + } pType = e[param.propertyName].GetType(); if (pType == type) { diff --git a/Assets/Scripts/Games/CoinToss/CoinToss.cs b/Assets/Scripts/Games/CoinToss/CoinToss.cs index d3b45b905..2d718b160 100644 --- a/Assets/Scripts/Games/CoinToss/CoinToss.cs +++ b/Assets/Scripts/Games/CoinToss/CoinToss.cs @@ -189,6 +189,21 @@ namespace HeavenStudio.Games //coin.perfectOnly = true; } + public void TossCoin(float beat) + { + if (coin != null) return; + + //Play sound and animations + Jukebox.PlayOneShotGame("coinToss/throw"); + handAnimator.Play("Throw", 0, 0); + //Game state says the hand is throwing the coin + isThrowing = true; + this.audienceReacting = false; + + coin = ScheduleInput(beat, 6f, InputType.STANDARD_DOWN, CatchSuccess, CatchMiss, CatchEmpty); + //coin.perfectOnly = true; + } + public void CatchSuccess(PlayerActionEvent caller, float state) { Jukebox.PlayOneShotGame("coinToss/catch");