mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
40 lines
No EOL
961 B
C#
40 lines
No EOL
961 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace RhythmHeavenMania.Games.RhythmTweezers
|
|
{
|
|
public class LongHair : PlayerActionObject
|
|
{
|
|
public float createBeat;
|
|
private RhythmTweezers game;
|
|
private Tweezers tweezers;
|
|
|
|
private void Awake()
|
|
{
|
|
game = RhythmTweezers.instance;
|
|
tweezers = game.Tweezers;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
float stateBeat = Conductor.instance.GetPositionFromBeat(createBeat + game.tweezerBeatOffset, game.beatInterval);
|
|
StateCheck(stateBeat);
|
|
|
|
if (PlayerInput.Pressed() && tweezers.hitOnFrame == 0)
|
|
{
|
|
if (state.perfect)
|
|
{
|
|
Ace();
|
|
}
|
|
}
|
|
}
|
|
|
|
public void Ace()
|
|
{
|
|
tweezers.LongPluck(true, this);
|
|
|
|
tweezers.hitOnFrame++;
|
|
}
|
|
}
|
|
} |