mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-14 05:35:08 +00:00
Tweezers:: Code cleanup
This commit is contained in:
parent
dae934625c
commit
3e647cbc4a
4 changed files with 12 additions and 4 deletions
|
@ -907,7 +907,7 @@ MonoBehaviour:
|
||||||
EligibleHits: []
|
EligibleHits: []
|
||||||
firstEnable: 0
|
firstEnable: 0
|
||||||
Vegetable: {fileID: 3177931334588542204}
|
Vegetable: {fileID: 3177931334588542204}
|
||||||
Tweezers: {fileID: 3684904985109994079}
|
Tweezers: {fileID: 3391455012319192365}
|
||||||
HairsHolder: {fileID: 2002856028339003249}
|
HairsHolder: {fileID: 2002856028339003249}
|
||||||
tweezersBeatOffset: 2
|
tweezersBeatOffset: 2
|
||||||
tweezersRotOffset: {x: -202, y: 180}
|
tweezersRotOffset: {x: -202, y: 180}
|
||||||
|
|
|
@ -7,13 +7,19 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
public class Hair : PlayerActionObject
|
public class Hair : PlayerActionObject
|
||||||
{
|
{
|
||||||
public float createBeat;
|
public float createBeat;
|
||||||
|
private Tweezers tweezers;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
tweezers = RhythmTweezers.instance.Tweezers;
|
||||||
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
float stateBeat = Conductor.instance.GetPositionFromBeat(createBeat, 4f);
|
float stateBeat = Conductor.instance.GetPositionFromBeat(createBeat, 4f);
|
||||||
StateCheck(stateBeat);
|
StateCheck(stateBeat);
|
||||||
|
|
||||||
if (PlayerInput.Pressed() && RhythmTweezers.instance.Tweezers.GetComponent<Tweezers>().hitOnFrame == 0)
|
if (PlayerInput.Pressed() && tweezers.hitOnFrame == 0)
|
||||||
{
|
{
|
||||||
if (state.perfect)
|
if (state.perfect)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +30,6 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
|
|
||||||
public void Ace()
|
public void Ace()
|
||||||
{
|
{
|
||||||
Tweezers tweezers = RhythmTweezers.instance.Tweezers.GetComponent<Tweezers>();
|
|
||||||
tweezers.Pluck(true, this);
|
tweezers.Pluck(true, this);
|
||||||
|
|
||||||
tweezers.hitOnFrame++;
|
tweezers.hitOnFrame++;
|
||||||
|
|
|
@ -10,7 +10,8 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
public class RhythmTweezers : Minigame
|
public class RhythmTweezers : Minigame
|
||||||
{
|
{
|
||||||
public GameObject Vegetable;
|
public GameObject Vegetable;
|
||||||
public GameObject Tweezers;
|
public Animator VegetableAnimator;
|
||||||
|
public Tweezers Tweezers;
|
||||||
|
|
||||||
[SerializeField] private GameObject HairsHolder;
|
[SerializeField] private GameObject HairsHolder;
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,12 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||||
{
|
{
|
||||||
public int hitOnFrame;
|
public int hitOnFrame;
|
||||||
private Animator anim;
|
private Animator anim;
|
||||||
|
private Animator vegetableAnim;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
anim = GetComponent<Animator>();
|
anim = GetComponent<Animator>();
|
||||||
|
vegetableAnim = RhythmTweezers.instance.VegetableAnimator;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LateUpdate()
|
private void LateUpdate()
|
||||||
|
|
Loading…
Reference in a new issue