mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:47:39 +02:00
Added Tap, Double Tap, and Triple Tap to Tap Trial
All perfectly playable :) Hopefully this is up to standards with the other games I just wanted to do this to prove to myself that I could LOL
This commit is contained in:
@ -10,6 +10,7 @@ namespace RhythmHeavenMania.Games.TapTrial
|
||||
{
|
||||
[Header("References")]
|
||||
public TapTrialPlayer player;
|
||||
public GameObject tap;
|
||||
|
||||
public static TapTrial instance { get; set; }
|
||||
|
||||
@ -22,19 +23,10 @@ namespace RhythmHeavenMania.Games.TapTrial
|
||||
|
||||
public void Tap(float beat)
|
||||
{
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound("tapTrial/ook", beat),
|
||||
new MultiSound.Sound("tapTrial/tap", beat + 1.0f),
|
||||
});
|
||||
Jukebox.PlayOneShotGame("tapTrial/ook");
|
||||
player.anim.Play("TapPrepare", 0, 0);
|
||||
|
||||
GameObject beatAction = new GameObject();
|
||||
beatAction.transform.SetParent(this.transform);
|
||||
BeatAction.New(beatAction, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 0.0f, delegate { player.anim.Play("TapPrepare", 0, 0); }),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { player.anim.Play("Tap", 0, 0); }),
|
||||
});
|
||||
CreateTap(beat);
|
||||
}
|
||||
|
||||
public void DoubleTap(float beat)
|
||||
@ -42,18 +34,17 @@ namespace RhythmHeavenMania.Games.TapTrial
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound("tapTrial/ookook", beat),
|
||||
new MultiSound.Sound("tapTrial/ookook", beat + 0.5f),
|
||||
new MultiSound.Sound("tapTrial/tap", beat + 1.0f),
|
||||
new MultiSound.Sound("tapTrial/tap", beat + 1.5f),
|
||||
new MultiSound.Sound("tapTrial/ookook", beat + 0.5f)
|
||||
});
|
||||
|
||||
player.anim.Play("DoubleTapPrepare", 0, 0);
|
||||
|
||||
GameObject beatAction = new GameObject();
|
||||
beatAction.transform.SetParent(this.transform);
|
||||
BeatAction.New(beatAction, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 0.0f, delegate { player.anim.Play("DoubleTapPrepare", 0, 0); }),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { player.anim.Play("DoubleTap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { player.anim.Play("DoubleTap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 0.0f, delegate { CreateTap(beat, 1); }),
|
||||
new BeatAction.Action(beat + 0.5f, delegate { CreateTap(beat + 0.5f, 1); }),
|
||||
});
|
||||
}
|
||||
|
||||
@ -62,20 +53,19 @@ namespace RhythmHeavenMania.Games.TapTrial
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound("tapTrial/ooki1", beat),
|
||||
new MultiSound.Sound("tapTrial/ooki2", beat + 0.5f),
|
||||
new MultiSound.Sound("tapTrial/tap", beat + 2.0f),
|
||||
new MultiSound.Sound("tapTrial/tap", beat + 2.5f),
|
||||
new MultiSound.Sound("tapTrial/tap", beat + 3.0f),
|
||||
new MultiSound.Sound("tapTrial/ooki2", beat + 0.5f)
|
||||
});
|
||||
|
||||
player.anim.Play("PosePrepare", 0, 0);
|
||||
player.tripleOffset = 0;
|
||||
|
||||
GameObject beatAction = new GameObject();
|
||||
beatAction.transform.SetParent(this.transform);
|
||||
BeatAction.New(beatAction, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat + 0.0f, delegate { player.anim.Play("PosePrepare", 0, 0); }),
|
||||
new BeatAction.Action(beat + 2.0f, delegate { player.anim.Play("Tap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 2.5f, delegate { player.anim.Play("DoubleTap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 3.0f, delegate { player.anim.Play("Tap", 0, 0); }),
|
||||
new BeatAction.Action(beat + 1.0f, delegate { CreateTap(beat + 1.0f, 2); }),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CreateTap(beat + 1.5f, 2); }),
|
||||
new BeatAction.Action(beat + 2.0f, delegate { CreateTap(beat + 2.0f, 2); }),
|
||||
});
|
||||
}
|
||||
|
||||
@ -88,5 +78,15 @@ namespace RhythmHeavenMania.Games.TapTrial
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void CreateTap(float beat, int type = 0)
|
||||
{
|
||||
GameObject _tap = Instantiate(tap);
|
||||
_tap.transform.parent = tap.transform.parent;
|
||||
_tap.SetActive(true);
|
||||
Tap t = _tap.GetComponent<Tap>();
|
||||
t.startBeat = beat;
|
||||
t.type = type;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user