mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:17:37 +02:00
bread2unity BCCAD interpreter setup
This commit is contained in:
40
Assets/Scripts/Games/RhythmTweezers/LongHair.cs
Normal file
40
Assets/Scripts/Games/RhythmTweezers/LongHair.cs
Normal file
@ -0,0 +1,40 @@
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user