mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:27:37 +02:00
Trick on the Class: basic functionality complete
This commit is contained in:
@ -132,6 +132,7 @@ namespace HeavenStudio.Games.Scripts_TrickClass
|
||||
{
|
||||
//just
|
||||
game.PlayerDodge();
|
||||
Jukebox.PlayOneShotGame("trickClass/player_dodge_success", volume: 0.8f, pitch: UnityEngine.Random.Range(0.95f, 1.15f));
|
||||
MultiSound.Play(new MultiSound.Sound[] {
|
||||
new MultiSound.Sound(GetDodgeSound(), startBeat + flyBeats, volume: 0.4f),
|
||||
});
|
||||
|
@ -45,6 +45,7 @@ namespace HeavenStudio.Games
|
||||
[Header("Objects")]
|
||||
public Animator playerAnim;
|
||||
public Animator girlAnim;
|
||||
public Animator warnAnim;
|
||||
|
||||
[Header("References")]
|
||||
public GameObject ballPrefab;
|
||||
@ -88,6 +89,29 @@ namespace HeavenStudio.Games
|
||||
PlayerDodge(true);
|
||||
playerCanDodge = Conductor.instance.songPositionInBeats + 0.6f;
|
||||
}
|
||||
|
||||
// bruh
|
||||
var tossEvents = GameManager.instance.Beatmap.entities.FindAll(en => en.datamodel == "trickClass/toss");
|
||||
for (int i = 0; i < tossEvents.Count; i++)
|
||||
{
|
||||
var e = tossEvents[i];
|
||||
float timeToEvent = e.beat - cond.songPositionInBeats;
|
||||
if (timeToEvent > 0f && timeToEvent <= 1f)
|
||||
{
|
||||
string anim = "WarnBall";
|
||||
switch (e.type)
|
||||
{
|
||||
case (int) TrickObjType.Plane:
|
||||
anim = "WarnPlane";
|
||||
break;
|
||||
default:
|
||||
anim = "WarnBall";
|
||||
break;
|
||||
}
|
||||
warnAnim.DoScaledAnimation(anim, e.beat - 1f, 1f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop(float beat, float length)
|
||||
@ -156,14 +180,14 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
playerAnim.DoScaledAnimationAsync("DodgeNg");
|
||||
playerBopStart = Conductor.instance.songPositionInBeats + 0.75f;
|
||||
|
||||
playerCanDodge = Conductor.instance.songPositionInBeats + 0.15f;
|
||||
}
|
||||
|
||||
public void PlayerThrough()
|
||||
{
|
||||
playerAnim.DoScaledAnimationAsync("Through");
|
||||
playerBopStart = Conductor.instance.songPositionInBeats + 0.75f;
|
||||
|
||||
playerCanDodge = Conductor.instance.songPositionInBeats + 0.15f;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user