HeavenStudioPlus/Assets/Scripts/Games/TapTrial/TapTrialPlayer.cs
Carson Kompon c5a9c70e0e Simple tap
2022-02-28 02:05:57 -05:00

31 lines
No EOL
626 B
C#

using UnityEngine;
using RhythmHeavenMania.Util;
namespace RhythmHeavenMania.Games.TapTrial
{
public class TapTrialPlayer : MonoBehaviour
{
[Header("References")]
[System.NonSerialized] public Animator anim;
private void Start()
{
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);
}
}
}