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:
@ -17,6 +17,7 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||
public Animator VegetableAnimator;
|
||||
public Tweezers Tweezers;
|
||||
public GameObject hairBase;
|
||||
public GameObject longHairBase;
|
||||
|
||||
[SerializeField] private GameObject HairsHolder;
|
||||
[NonSerialized] public int hairsLeft = 0;
|
||||
@ -57,6 +58,25 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
|
||||
hairsLeft++;
|
||||
}
|
||||
|
||||
public void SpawnLongHair(float beat)
|
||||
{
|
||||
StopTransitionIfActive();
|
||||
|
||||
if (!intervalStarted)
|
||||
{
|
||||
SetIntervalStart(beat, beatInterval);
|
||||
}
|
||||
|
||||
Jukebox.PlayOneShotGame("rhythmTweezers/longAppear", beat);
|
||||
LongHair hair = Instantiate(longHairBase, HairsHolder.transform).GetComponent<LongHair>();
|
||||
hair.gameObject.SetActive(true);
|
||||
|
||||
float rot = -58f + 116 * Mathp.Normalize(beat, intervalStartBeat, intervalStartBeat + beatInterval - 1f);
|
||||
hair.transform.eulerAngles = new Vector3(0, 0, rot);
|
||||
hair.createBeat = beat;
|
||||
hairsLeft++;
|
||||
}
|
||||
|
||||
public void SetIntervalStart(float beat, float interval = 4f)
|
||||
{
|
||||
// End transition early if the interval starts a lil early.
|
||||
|
Reference in New Issue
Block a user