From 2bf5292808929f94955b38f8ac4bf3db99dbaa80 Mon Sep 17 00:00:00 2001 From: minenice55 <43734252+minenice55@users.noreply.github.com> Date: Wed, 21 Sep 2022 09:48:53 -0400 Subject: [PATCH] fin in missing params? needs testing --- Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs | 6 ++++++ Assets/Scripts/Games/CoinToss/CoinToss.cs | 15 +++++++++++++++ 2 files changed, 21 insertions(+) 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");