Karateka
Adjusted how pot breaking worked to now use the beats, instead of item curve. Attempt to implement pot break delay slider
This commit is contained in:
parent
9b5af8d6d6
commit
b624b54b93
|
@ -120,7 +120,7 @@ namespace HeavenStudio.Games.Loaders
|
||||||
},
|
},
|
||||||
new GameAction("set gameplay modifiers", "Gameplay Modifiers")
|
new GameAction("set gameplay modifiers", "Gameplay Modifiers")
|
||||||
{
|
{
|
||||||
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetGameplayMods(e.beat, e["type"], e["type2"], e["toggle"], e["toggle2"], e["toggle3"], e["type3"]); },
|
function = delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetGameplayMods(e.beat, e["type"], e["type2"], e["toggle"], e["toggle2"], e["toggle3"], e["type3"], e["valA"]); },
|
||||||
defaultLength = 0.5f,
|
defaultLength = 0.5f,
|
||||||
parameters = new List<Param>()
|
parameters = new List<Param>()
|
||||||
{
|
{
|
||||||
|
@ -129,7 +129,8 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new Param("toggle", true, "Enable Combos", "Allow the player to combo? (Contextual combos will still be allowed even when off)"),
|
new Param("toggle", true, "Enable Combos", "Allow the player to combo? (Contextual combos will still be allowed even when off)"),
|
||||||
new Param("toggle2", false, "Pot Break Sound", "Should there be a breaking sound when punching an object with high flow?"),
|
new Param("toggle2", false, "Pot Break Sound", "Should there be a breaking sound when punching an object with high flow?"),
|
||||||
new Param("toggle3", false, "High Flow Punch", "Determines if Joe punches with the right hand when having high flow"),
|
new Param("toggle3", false, "High Flow Punch", "Determines if Joe punches with the right hand when having high flow"),
|
||||||
new Param("type3", KarateMan.SoundEffectTypes.Megamix3DS, "Sound Effect Ver", "The version of sounds that will play")
|
new Param("type3", KarateMan.SoundEffectTypes.Megamix3DS, "Sound Effect Ver", "The version of sounds that will play"),
|
||||||
|
new Param("valA", new EntityTypes.Float(0, 5), "Pot Break Delay", "Sets the pot break delay, used in Tengoku Arcade")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new GameAction("set background effects", "Background Appearance")
|
new GameAction("set background effects", "Background Appearance")
|
||||||
|
@ -564,6 +565,7 @@ namespace HeavenStudio.Games
|
||||||
public static float WantBgChangeStart = Single.MinValue;
|
public static float WantBgChangeStart = Single.MinValue;
|
||||||
public static float WantBgChangeLength = 0f;
|
public static float WantBgChangeLength = 0f;
|
||||||
public static float BopLength = 1f;
|
public static float BopLength = 1f;
|
||||||
|
public static float PotBreakDelay = 0f;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
@ -1253,7 +1255,7 @@ namespace HeavenStudio.Games
|
||||||
UpdateFilterColour(bgColour, filterColour);
|
UpdateFilterColour(bgColour, filterColour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetGameplayMods(float beat, int mode, int bg, bool combo, bool noriBreak, bool highFlow, int soundVer)
|
public void SetGameplayMods(float beat, int mode, int bg, bool combo, bool noriBreak, bool highFlow, int soundVer, float breakDelay)
|
||||||
{
|
{
|
||||||
NoriGO.SetActive(true);
|
NoriGO.SetActive(true);
|
||||||
Nori.SetNoriMode(beat, mode);
|
Nori.SetNoriMode(beat, mode);
|
||||||
|
@ -1261,6 +1263,7 @@ namespace HeavenStudio.Games
|
||||||
NoriBreakSound = noriBreak;
|
NoriBreakSound = noriBreak;
|
||||||
HighFlowPunch = highFlow;
|
HighFlowPunch = highFlow;
|
||||||
SoundEffectsVersion = soundVer;
|
SoundEffectsVersion = soundVer;
|
||||||
|
PotBreakDelay = breakDelay;
|
||||||
|
|
||||||
IsComboEnable = combo;
|
IsComboEnable = combo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,35 +333,6 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||||
Jukebox.PlayOneShotGame("karateman/bombBreak", volume: 0.25f);
|
Jukebox.PlayOneShotGame("karateman/bombBreak", volume: 0.25f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ((KarateMan.instance.IsNoriActive && KarateMan.instance.NoriPerformance >= 0.6f || KarateMan.HonkiMode) && KarateMan.NoriBreakSound && ItemBreakable() && cond.songPositionInBeats >= startBeat + curveTargetBeat && CurrentCurve.GetApproximateLength() > 16)
|
|
||||||
{
|
|
||||||
ParticleSystem p = Instantiate(HitParticles[2], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
|
||||||
p.Play();
|
|
||||||
|
|
||||||
GameObject.Destroy(ShadowInstance.gameObject);
|
|
||||||
GameObject.Destroy(gameObject);
|
|
||||||
|
|
||||||
if (cond.songPositionInBeats >= startBeat)
|
|
||||||
{
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case ItemType.Pot:
|
|
||||||
Jukebox.PlayOneShotGame("karateman/potBreak", volume: 0.60f);
|
|
||||||
break;
|
|
||||||
case ItemType.Bulb:
|
|
||||||
Jukebox.PlayOneShotGame("karateman/lightbulbBreak", volume: 0.65f);
|
|
||||||
break;
|
|
||||||
case ItemType.Rock:
|
|
||||||
case ItemType.TacoBell:
|
|
||||||
Jukebox.PlayOneShotGame("karateman/rockBreak", volume: 0.75f);
|
|
||||||
break;
|
|
||||||
case ItemType.Ball:
|
|
||||||
Jukebox.PlayOneShotGame("karateman/soccerBreak", volume: 0.75f);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || CurrentCurve == null)
|
else if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || CurrentCurve == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -471,6 +442,32 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||||
hitMark.SetActive(true);
|
hitMark.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DestoryPot()
|
||||||
|
{
|
||||||
|
ParticleSystem p = Instantiate(HitParticles[2], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||||
|
p.Play();
|
||||||
|
|
||||||
|
GameObject.Destroy(ShadowInstance.gameObject);
|
||||||
|
GameObject.Destroy(gameObject);
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case ItemType.Pot:
|
||||||
|
Jukebox.PlayOneShotGame("karateman/potBreak", volume: 0.60f);
|
||||||
|
break;
|
||||||
|
case ItemType.Bulb:
|
||||||
|
Jukebox.PlayOneShotGame("karateman/lightbulbBreak", volume: 0.65f);
|
||||||
|
break;
|
||||||
|
case ItemType.Rock:
|
||||||
|
case ItemType.TacoBell:
|
||||||
|
Jukebox.PlayOneShotGame("karateman/rockBreak", volume: 0.75f);
|
||||||
|
break;
|
||||||
|
case ItemType.Ball:
|
||||||
|
Jukebox.PlayOneShotGame("karateman/soccerBreak", volume: 0.75f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//handles hitsound and particles
|
//handles hitsound and particles
|
||||||
void ItemHitEffect(bool straight = false)
|
void ItemHitEffect(bool straight = false)
|
||||||
{
|
{
|
||||||
|
@ -662,10 +659,16 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (KarateMan.instance.IsNoriActive && KarateMan.instance.NoriPerformance >= 0.6f)
|
if (KarateMan.instance.IsNoriActive && KarateMan.instance.NoriPerformance >= 0.6f)
|
||||||
ItemHitNori = Conductor.instance.songPositionInBeats + curveTargetBeat + 1f;
|
ItemHitNori = Conductor.instance.songPositionInBeats + curveTargetBeat + 1f;
|
||||||
startBeat = Conductor.instance.songPositionInBeats;
|
startBeat = Conductor.instance.songPositionInBeats;
|
||||||
|
if ((KarateMan.instance.IsNoriActive && KarateMan.instance.NoriPerformance >= 0.6f || KarateMan.HonkiMode) && KarateMan.NoriBreakSound && ItemBreakable())
|
||||||
|
{
|
||||||
|
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||||
|
{
|
||||||
|
new BeatAction.Action(startBeat + 1f + KarateMan.PotBreakDelay, delegate { DestoryPot(); })
|
||||||
|
});
|
||||||
|
}
|
||||||
status = FlyStatus.Hit;
|
status = FlyStatus.Hit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue