mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
31 lines
No EOL
627 B
C#
31 lines
No EOL
627 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/tonk");
|
|
anim.Play("Tap", 0, 0);
|
|
}
|
|
}
|
|
} |