From c5a9c70e0e8133e46aaf88d1d3c864dab684175c Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Mon, 28 Feb 2022 02:05:57 -0500 Subject: [PATCH] Simple tap --- Assets/Scripts/Games/TapTrial/TapTrialPlayer.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Assets/Scripts/Games/TapTrial/TapTrialPlayer.cs b/Assets/Scripts/Games/TapTrial/TapTrialPlayer.cs index ad1dab4f..a23599f4 100644 --- a/Assets/Scripts/Games/TapTrial/TapTrialPlayer.cs +++ b/Assets/Scripts/Games/TapTrial/TapTrialPlayer.cs @@ -1,5 +1,7 @@ using UnityEngine; +using RhythmHeavenMania.Util; + namespace RhythmHeavenMania.Games.TapTrial { public class TapTrialPlayer : MonoBehaviour @@ -11,5 +13,19 @@ namespace RhythmHeavenMania.Games.TapTrial { anim = GetComponent(); } + + private void Update() + { + if (PlayerInput.Pressed()) + { + Tap(false); + } + } + + public void Tap(bool hit) + { + Jukebox.PlayOneShotGame("tapTrial/tap"); + anim.Play("Tap", 0, 0); + } } } \ No newline at end of file