bread2unity BCCAD interpreter setup

This commit is contained in:
Braedon
2022-02-10 03:13:54 -05:00
parent 5dc432a9d9
commit 772ab2783c
19 changed files with 541 additions and 108 deletions

View File

@ -11,11 +11,14 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
public int hitOnFrame;
private Animator anim;
private Animator vegetableAnim;
private RhythmTweezers game;
private void Start()
{
anim = GetComponent<Animator>();
vegetableAnim = RhythmTweezers.instance.VegetableAnimator;
game = RhythmTweezers.instance;
}
private void LateUpdate()
@ -35,8 +38,6 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
if (ace)
{
var game = RhythmTweezers.instance;
Jukebox.PlayOneShotGame($"rhythmTweezers/shortPluck{Random.Range(1, 21)}");
Destroy(hair.gameObject);
@ -48,5 +49,24 @@ namespace RhythmHeavenMania.Games.RhythmTweezers
vegetableAnim.Play("Hop", 0, 0);
}
}
public void LongPluck(bool ace, LongHair hair)
{
anim.Play("Tweezers_Pluck", 0, 0);
if (hitOnFrame > 0) return;
if (ace)
{
float beat = Conductor.instance.songPositionInBeats;
MultiSound.Play(new MultiSound.Sound[]
{
new MultiSound.Sound($"rhythmTweezers/longPull{Random.Range(1, 5)}", beat),
new MultiSound.Sound("rhythmTweezers/longPullEnd", beat + 0.5f),
});
Destroy(hair.gameObject);
}
}
}
}