mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 22:47:40 +02:00
* add Jukebox library todo: - saving / loading of new format - inferrence of unknown data like past versions - move the temporary float casts to proper use of double - make sound related functions take double for timing - inform people that the Jukebox sound player was renamed to SoundByte lol * make sound, input scheduling, and super curve use double precision * successfully load charts * editor works again v1 riqs can be saved and loaded * first tempo and volume markers are unmovable fix loading of charts' easing values * use gsync / freesync * update Jukebox refs to SoundByte * game events use double part 1 Air Rally - Glee Club converted * don't load song if chart load fails * finish conversion of all minigames * remove editor waveform toggle * timeline now respects added song offset length clear cache files on app close prepped notes for dsp sync * update timeline length when offset changed * update to latest Jukebox * make error panel object in global game manager * improve conductor music scheduling * added error message box fix first game events sometimes not playing
This commit is contained in:
@ -10,7 +10,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
public class KarateManPot : MonoBehaviour
|
||||
{
|
||||
public float startBeat;
|
||||
public double startBeat;
|
||||
public ItemType type;
|
||||
public int path = 1;
|
||||
|
||||
@ -288,7 +288,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
transform.position = CurrentCurve.GetPoint(Mathf.Min(prog, 1f));
|
||||
}
|
||||
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + 2f)
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeatsAsDouble >= startBeat + 2f)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], transform.position, Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
@ -317,7 +317,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
break;
|
||||
case FlyStatus.Hit:
|
||||
prog = cond.GetPositionFromBeat(startBeat, curveTargetBeat);
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + curveTargetBeat)
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeatsAsDouble >= startBeat + curveTargetBeat)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
@ -325,17 +325,17 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
|
||||
Jukebox.PlayOneShotGame("karateman/bombBreak", volume: 0.25f);
|
||||
SoundByte.PlayOneShotGame("karateman/bombBreak", volume: 0.25f);
|
||||
return;
|
||||
}
|
||||
else if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || CurrentCurve == null) {
|
||||
else if (cond.songPositionInBeatsAsDouble >= startBeat + Mathf.Max(2f, curveTargetBeat) || CurrentCurve == null) {
|
||||
|
||||
if (type == ItemType.KickBomb)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[6], ItemCurves[7].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
}
|
||||
else if (type == ItemType.KickBall && cond.songPositionInBeats < startBeat + curveTargetBeat + 1f)
|
||||
else if (type == ItemType.KickBall && cond.songPositionInBeatsAsDouble < startBeat + curveTargetBeat + 1f)
|
||||
return;
|
||||
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
@ -357,7 +357,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
case FlyStatus.NG:
|
||||
prog = cond.GetPositionFromBeat(startBeat, curveTargetBeat);
|
||||
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + curveTargetBeat)
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeatsAsDouble >= startBeat + curveTargetBeat)
|
||||
{
|
||||
KarateMan.instance.Joe.RemoveBombGlow(startBeat + curveTargetBeat, 1f);
|
||||
ParticleSystem p = Instantiate(HitParticles[7], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
@ -367,7 +367,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
GameObject.Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
else if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || (ItemKickable() && prog >= 1f) || CurrentCurve == null) {
|
||||
else if (cond.songPositionInBeatsAsDouble >= startBeat + Mathf.Max(2f, curveTargetBeat) || (ItemKickable() && prog >= 1f) || CurrentCurve == null) {
|
||||
if (type == ItemType.KickBomb)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], ItemCurves[8].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
@ -393,7 +393,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
prog = cond.GetPositionFromBeat(startBeat, 1f);
|
||||
|
||||
Vector3 pos = new Vector3(HitPosition[1].position.x + 0.25f, HitPosition[0].position.y, HitPosition[1].position.z);
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + 1f)
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeatsAsDouble >= startBeat + 1f)
|
||||
{
|
||||
KarateMan.instance.Joe.RemoveBombGlow(startBeat + 1f, 1f);
|
||||
|
||||
@ -404,7 +404,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
GameObject.Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
else if (cond.songPositionInBeats >= startBeat + 3f)
|
||||
else if (cond.songPositionInBeatsAsDouble >= startBeat + 3f)
|
||||
{
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
@ -444,7 +444,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
case ItemType.Bulb:
|
||||
CurrentCurve = ItemCurves[straight ? 1 : 0];
|
||||
curveTargetBeat = straight ? 1f : 1.5f;;
|
||||
Jukebox.PlayOneShotGame("karateman/lightbulbHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/lightbulbHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[5], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
|
||||
if (effectTint.a == 0)
|
||||
@ -468,101 +468,101 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
case ItemType.Rock:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[4], HitPosition[1].position, Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.Ball:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/soccerHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/soccerHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.Cooking:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/cookingPot", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/cookingPot", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
game.CreateItemInstance(startBeat + 1f, "Item09", 0, ItemType.CookingLid);
|
||||
GetComponent<Animator>().Play("Item08", -1, 0);
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.Alien:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/alienHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/alienHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.Bomb:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/bombHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/bombHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[2], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
game.Joe.RemoveBombGlow(startBeat + 1f, 1f);
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.TacoBell:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit", forcePlay: true);
|
||||
Jukebox.PlayOneShotGame("karateman/tacobell", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/tacobell", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
if (game.IsNoriActive && game.NoriPerformance >= 1f)
|
||||
Jukebox.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/rockHit_fullNori", forcePlay: true);
|
||||
break;
|
||||
case ItemType.ComboPot1:
|
||||
CurrentCurve = ItemCurves[straight ? 1 : 0];
|
||||
curveTargetBeat = 1.5f;
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit1", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboHit1", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.ComboPot2:
|
||||
CurrentCurve = ItemCurves[0];
|
||||
curveTargetBeat = 1.5f;
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit1", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboHit1", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.ComboPot3:
|
||||
CurrentCurve = ItemCurves[2];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit2", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboHit2", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[2].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.ComboPot4:
|
||||
CurrentCurve = ItemCurves[3];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit3", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboHit3", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[3].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.ComboPot5:
|
||||
CurrentCurve = ItemCurves[4];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit3", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboHit3", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], HitPosition[4].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.ComboBarrel:
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit4", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboHit4", forcePlay: true);
|
||||
p = Instantiate(HitParticles[0], HitPosition[5].position, Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
p = Instantiate(HitParticles[1], HitPosition[5].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
@ -576,7 +576,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
game.Joe.ApplyBombGlow();
|
||||
game.CreateItemInstance(startBeat + 1f, "Item04", OnHitExpression, ItemType.KickBomb);
|
||||
}
|
||||
Jukebox.PlayOneShotGame("karateman/barrelBreak", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/barrelBreak", forcePlay: true);
|
||||
p = Instantiate(HitParticles[0], HitPosition[1].position, Quaternion.Euler(0, 0, -5f), game.ItemHolder);
|
||||
p.Play();
|
||||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
@ -584,14 +584,14 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
|
||||
break;
|
||||
case ItemType.KickBomb:
|
||||
Jukebox.PlayOneShotGame("karateman/bombKick", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/bombKick", forcePlay: true);
|
||||
p = Instantiate(HitParticles[2], ItemCurves[6].GetPoint(0.5f), Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
game.Joe.RemoveBombGlow(startBeat + 0.75f);
|
||||
break;
|
||||
case ItemType.KickBall:
|
||||
Jukebox.PlayOneShotGame("karateman/bombKick", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/bombKick", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], ItemCurves[6].GetPoint(0.5f), Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
@ -600,18 +600,18 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
curveTargetBeat = straight ? 1f : 1.5f;
|
||||
if (game.IsNoriActive && game.NoriPerformance < 0.6f)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/potHit_lowNori", forcePlay: true);
|
||||
Jukebox.PlayOneShotGame("karateman/potHit", volume: 0.66f, forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/potHit_lowNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/potHit", volume: 0.66f, forcePlay: true);
|
||||
}
|
||||
else
|
||||
Jukebox.PlayOneShotGame("karateman/potHit", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/potHit", forcePlay: true);
|
||||
p = Instantiate(HitParticles[3], HitPosition[1].position, Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
status = FlyStatus.Hit;
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
case ItemType.ComboPot2:
|
||||
joe.Punch(2);
|
||||
if (joe.GetComboId() != comboId)
|
||||
Jukebox.PlayOneShotGame("karateman/swingNoHit_Alt", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/swingNoHit_Alt", forcePlay: true);
|
||||
else
|
||||
{
|
||||
ItemHitEffect();
|
||||
@ -687,7 +687,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
//if the button isn't held anymore make Joe spin
|
||||
if (joe.GetComboId() != comboId) {
|
||||
joe.ComboMiss(startBeat + 1f);
|
||||
Jukebox.PlayOneShotGame("karateman/comboMiss", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/comboMiss", forcePlay: true);
|
||||
joe.SetShouldComboId(-2);
|
||||
}
|
||||
else
|
||||
@ -710,7 +710,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
}
|
||||
}
|
||||
|
||||
void DoHitExpression(float offset)
|
||||
void DoHitExpression(double offset)
|
||||
{
|
||||
if (OnHitExpression == (int) KarateMan.KarateManFaces.Normal)
|
||||
return;
|
||||
@ -733,10 +733,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
if (status == FlyStatus.Fly && !(joe.inCombo || joe.inNuriLock)) {
|
||||
if (state <= -1f || state >= 1f) {
|
||||
bool straight = joe.Punch(ItemPunchHand());
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
|
||||
@ -755,9 +755,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
if (ItemNeedNori() && KarateMan.instance.NoriPerformance < 0.6f)
|
||||
{
|
||||
CreateHitMark(false);
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
status = FlyStatus.HitWeak;
|
||||
Jukebox.PlayOneShotGame("karateman/hitNoNori", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/hitNoNori", forcePlay: true);
|
||||
joe.Punch(3);
|
||||
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z - 30f);
|
||||
KarateMan.instance.Nori.DoNG();
|
||||
@ -783,12 +783,12 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
//WHEN SCORING THIS IS A MISS
|
||||
var joe = KarateMan.instance.Joe;
|
||||
if (status == FlyStatus.Fly && !(joe.inCombo || joe.inNuriLock)) {
|
||||
joe.ForceFailCombo(Conductor.instance.songPositionInBeats);
|
||||
joe.ForceFailCombo(Conductor.instance.songPositionInBeatsAsDouble);
|
||||
if (state <= -1f || state >= 1f) {
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
}
|
||||
else {
|
||||
@ -821,7 +821,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
new BeatAction.Action(startBeat + 2f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
Jukebox.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
@ -843,10 +843,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
joe.SetComboId(comboId);
|
||||
joe.SetShouldComboId(comboId);
|
||||
if (state <= -1f || state >= 1f) {
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
|
||||
KarateMan.instance.Nori.DoNG();
|
||||
@ -870,7 +870,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
new BeatAction.Action(startBeat + 2f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
Jukebox.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
@ -891,10 +891,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
if (status == FlyStatus.Fly && !(joe.inCombo || joe.inNuriLock)) {
|
||||
bool straight = joe.Punch(ItemPunchHand());
|
||||
if (state <= -1f || state >= 1f) {
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
}
|
||||
else {
|
||||
@ -916,10 +916,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
joe.SetShouldComboId(-1);
|
||||
joe.ComboSequence(3);
|
||||
if (state <= -1f || state >= 1f) {
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[5];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
|
||||
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
|
||||
@ -952,7 +952,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
joe.SetComboId(-1);
|
||||
joe.SetShouldComboId(-1);
|
||||
joe.ComboSequence(3);
|
||||
Jukebox.PlayOneShotGame("karateman/swingKick", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/swingKick", forcePlay: true);
|
||||
}
|
||||
OnHit.CanHit(false);
|
||||
}
|
||||
@ -1009,7 +1009,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
if (KarateMan.IsComboEnable && !(KarateMan.instance.Joe.inCombo || KarateMan.instance.Joe.inNuriLock))
|
||||
KarateMan.instance.Joe.ForceFailCombo(Conductor.instance.songPositionInBeats);
|
||||
KarateMan.instance.Joe.ForceFailCombo(Conductor.instance.songPositionInBeatsAsDouble);
|
||||
}
|
||||
|
||||
public void KickChargeJustOrNg(PlayerActionEvent caller, float state)
|
||||
@ -1019,10 +1019,10 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
if (status == FlyStatus.Fly && !(joe.inKick || joe.wantKick || joe.inCombo || joe.inNuriLock)) {
|
||||
joe.Punch(ItemPunchHand());
|
||||
if (state <= -1f || state >= 1f) {
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Sad);
|
||||
@ -1056,7 +1056,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
{
|
||||
new BeatAction.Action(startBeat + 2f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
Jukebox.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
SoundByte.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
@ -1073,12 +1073,12 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
var joe = KarateMan.instance.Joe;
|
||||
if (status == FlyStatus.Fly && joe.inKick) {
|
||||
joe.Kick(Conductor.instance.songPositionInBeats);
|
||||
joe.Kick(Conductor.instance.songPositionInBeatsAsDouble);
|
||||
if (state <= -1f || state >= 1f) {
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
CurrentCurve = ItemCurves[8];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.PlayOneShot("miss");
|
||||
SoundByte.PlayOneShot("miss");
|
||||
status = FlyStatus.NG;
|
||||
|
||||
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
|
||||
@ -1100,7 +1100,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||
ItemHitEffect();
|
||||
status = FlyStatus.Hit;
|
||||
CurrentCurve = ItemCurves[7];
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
startBeat = Conductor.instance.songPositionInBeatsAsDouble;
|
||||
curveTargetBeat = 3f;
|
||||
KarateMan.instance.Nori.DoHit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user