mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:47:39 +02:00
Fan Club: idol setup part 1
This commit is contained in:
@ -11,9 +11,14 @@ namespace RhythmHeavenMania.Games
|
||||
public class FanClub : Minigame
|
||||
{
|
||||
// userdata here
|
||||
[Header("Animators")]
|
||||
|
||||
[Header("Objects")]
|
||||
public GameObject Arisa;
|
||||
|
||||
// end userdata
|
||||
|
||||
private Animator idolAnimator;
|
||||
public GameEvent bop = new GameEvent();
|
||||
public static FanClub instance;
|
||||
|
||||
private void Awake()
|
||||
@ -21,9 +26,42 @@ namespace RhythmHeavenMania.Games
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
idolAnimator = Arisa.GetComponent<Animator>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Conductor.instance.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (Conductor.instance.songPositionInBeats >= bop.startBeat && Conductor.instance.songPositionInBeats < bop.startBeat + bop.length)
|
||||
{
|
||||
idolAnimator.Play("IdolBeat", 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop(float beat, float length)
|
||||
{
|
||||
bop.length = length;
|
||||
bop.startBeat = beat;
|
||||
}
|
||||
|
||||
public void CallHai(float beat)
|
||||
{
|
||||
BeatAction.New(Arisa, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", 0, 0); }),
|
||||
new BeatAction.Action(beat + 1f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", 0, 0); }),
|
||||
new BeatAction.Action(beat + 2f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", 0, 0); }),
|
||||
new BeatAction.Action(beat + 3f, delegate { Arisa.GetComponent<Animator>().Play("IdolPeace", 0, 0); }),
|
||||
|
||||
new BeatAction.Action(beat + 4f, delegate { Arisa.GetComponent<Animator>().Play("IdolCrap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 5f, delegate { Arisa.GetComponent<Animator>().Play("IdolCrap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 6f, delegate { Arisa.GetComponent<Animator>().Play("IdolCrap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 7f, delegate { Arisa.GetComponent<Animator>().Play("IdolCrap", 0, 0); }),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user