mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 13:47:38 +02:00
Trick on the Class: prep bop entity
This commit is contained in:
@ -13,7 +13,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
public bool flyType;
|
||||
public float startBeat;
|
||||
bool flying = true;
|
||||
bool hit = false;
|
||||
bool dodged = false;
|
||||
bool miss = false;
|
||||
|
||||
float flyBeats;
|
||||
@ -80,7 +80,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
}
|
||||
}
|
||||
|
||||
if (!(hit || miss))
|
||||
if (!(dodged || miss))
|
||||
{
|
||||
float normalizedBeat = cond.GetPositionFromMargin(startBeat + dodgeBeats, 1f);
|
||||
StateCheck(normalizedBeat);
|
||||
@ -89,7 +89,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
{
|
||||
if (state.perfect)
|
||||
{
|
||||
hit = true;
|
||||
dodged = true;
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound("trickClass/ball_impact", startBeat + flyBeats, volume: 0.75f),
|
||||
});
|
||||
@ -108,7 +108,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
break;
|
||||
default:
|
||||
curve = TrickClass.instance.ballMissCurve;
|
||||
flyBeats = 1.5f;
|
||||
flyBeats = 1.25f;
|
||||
break;
|
||||
}
|
||||
startBeat += dodgeBeats;
|
||||
@ -120,7 +120,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
public override void OnAce()
|
||||
{
|
||||
TrickClass.instance.PlayerDodge();
|
||||
hit = true;
|
||||
dodged = true;
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound("trickClass/ball_impact", startBeat + flyBeats, volume: 0.5f),
|
||||
});
|
||||
|
@ -37,6 +37,7 @@ namespace HeavenStudio.Games
|
||||
public BezierCurve3D shockTossCurve;
|
||||
|
||||
public static TrickClass instance;
|
||||
public GameEvent bop = new GameEvent();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@ -45,12 +46,27 @@ namespace HeavenStudio.Games
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
if (cond.ReportBeat(ref bop.lastReportedBeat, bop.startBeat % 1))
|
||||
{
|
||||
if (cond.songPositionInBeats >= bop.startBeat && cond.songPositionInBeats < bop.startBeat + bop.length)
|
||||
{
|
||||
//TODO: bop animation
|
||||
}
|
||||
}
|
||||
|
||||
if (PlayerInput.Pressed())
|
||||
{
|
||||
PlayerDodge();
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop(float beat, float length)
|
||||
{
|
||||
bop.startBeat = beat;
|
||||
bop.length = length;
|
||||
}
|
||||
|
||||
public void TossObject(float beat, int type)
|
||||
{
|
||||
switch (type)
|
||||
|
Reference in New Issue
Block a user