Simple tap

This commit is contained in:
Carson Kompon 2022-02-28 02:05:57 -05:00
parent 8b4b1cac1a
commit be5a950dfe
1 changed files with 16 additions and 0 deletions

View File

@ -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<Animator>();
}
private void Update()
{
if (PlayerInput.Pressed())
{
Tap(false);
}
}
public void Tap(bool hit)
{
Jukebox.PlayOneShotGame("tapTrial/tap");
anim.Play("Tap", 0, 0);
}
}
}