mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 19:55:09 +00:00
33 lines
849 B
C#
33 lines
849 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace RhythmHeavenMania.Games.RhythmTweezers
|
||
|
{
|
||
|
public class Hair : PlayerActionObject
|
||
|
{
|
||
|
public float createBeat;
|
||
|
|
||
|
private void Update()
|
||
|
{
|
||
|
float stateBeat = Conductor.instance.GetPositionFromBeat(createBeat, 4f);
|
||
|
StateCheck(stateBeat);
|
||
|
|
||
|
if (PlayerInput.Pressed() && RhythmTweezers.instance.Tweezers.GetComponent<Tweezers>().hitOnFrame == 0)
|
||
|
{
|
||
|
if (state.perfect)
|
||
|
{
|
||
|
Ace();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void Ace()
|
||
|
{
|
||
|
Tweezers tweezers = RhythmTweezers.instance.Tweezers.GetComponent<Tweezers>();
|
||
|
tweezers.Pluck(true, this);
|
||
|
|
||
|
tweezers.hitOnFrame++;
|
||
|
}
|
||
|
}
|
||
|
}
|