mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
facial expressions for just inputs
- kick barrels can now contain balls - added bomb item - adjusted colour map on bomb glow - removed indev label from game name
This commit is contained in:
parent
e62914f63e
commit
05375aacb7
9 changed files with 161 additions and 78 deletions
|
@ -5215,7 +5215,7 @@ MonoBehaviour:
|
|||
- {fileID: 7256772822833254697}
|
||||
- {fileID: 3475821273632447422}
|
||||
- {fileID: 6493772388133163186}
|
||||
BombGlowTint: {r: 0.8207547, g: 0.8207547, b: 0.1882353, a: 1}
|
||||
BombGlowTint: {r: 1, g: 0.9831154, b: 0.78431374, a: 1}
|
||||
inCombo: 0
|
||||
lockedInCombo: 0
|
||||
comboWaiting: 0
|
||||
|
|
|
@ -82,8 +82,8 @@ Material:
|
|||
m_Colors:
|
||||
- _AddColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ColorAlpha: {r: 0.84705883, g: 0.8156863, b: 0.6901961, a: 1}
|
||||
- _ColorAlpha: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _ColorBravo: {r: 1, g: 0, b: 0, a: 1}
|
||||
- _ColorDelta: {r: 0.972549, g: 0.972549, b: 0.972549, a: 1}
|
||||
- _ColorDelta: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace HeavenStudio.Games.Loaders
|
|||
public static class RvlNewKarateLoader
|
||||
{
|
||||
public static Minigame AddGame(EventCaller eventCaller) {
|
||||
return new Minigame("karateman", "Karate Man [INDEV REWORK]", "70A8D8", false, false, new List<GameAction>()
|
||||
return new Minigame("karateman", "Karate Man", "70A8D8", false, false, new List<GameAction>()
|
||||
{
|
||||
new GameAction("bop", delegate { KarateMan.instance.ToggleBop(eventCaller.currentEntity.toggle); }, 0.5f, false, new List<Param>()
|
||||
{
|
||||
|
@ -19,19 +19,32 @@ namespace HeavenStudio.Games.Loaders
|
|||
},
|
||||
inactiveFunction: delegate { KarateMan.ToggleBopUnloaded(eventCaller.currentEntity.toggle); }
|
||||
),
|
||||
new GameAction("hit", delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateItem(e.beat, e.type); }, 2, false,
|
||||
new GameAction("hit", delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateItem(e.beat, e.type, e.type2); }, 2, false,
|
||||
new List<Param>()
|
||||
{
|
||||
new Param("type", KarateMan.HitType.Pot, "Object", "The object to fire")
|
||||
new Param("type", KarateMan.HitType.Pot, "Object", "The object to fire"),
|
||||
new Param("type2", KarateMan.KarateManFaces.Normal, "Success Expression", "The facial expression to set Joe to on hit")
|
||||
}),
|
||||
new GameAction("bulb", delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateBulbSpecial(e.beat, e.type, e.colorA); }, 2, false,
|
||||
new GameAction("bulb", delegate { var e = eventCaller.currentEntity; KarateMan.instance.CreateBulbSpecial(e.beat, e.type, e.colorA, e.type2); }, 2, false,
|
||||
new List<Param>()
|
||||
{
|
||||
new Param("type", KarateMan.LightBulbType.Normal, "Type", "The preset bulb type. Yellow is used for kicks while Blue is used for combos"),
|
||||
new Param("colorA", new Color(1f,1f,1f), "Custom Color", "The color to use when the bulb type is set to Custom")
|
||||
new Param("colorA", new Color(1f,1f,1f), "Custom Color", "The color to use when the bulb type is set to Custom"),
|
||||
new Param("type2", KarateMan.KarateManFaces.Normal, "Success Expression", "The facial expression to set Joe to on hit")
|
||||
}),
|
||||
new GameAction("kick", delegate { KarateMan.instance.Kick(eventCaller.currentEntity.beat); }, 4f),
|
||||
new GameAction("combo", delegate { KarateMan.instance.Combo(eventCaller.currentEntity.beat); }, 4f),
|
||||
new GameAction("kick", delegate { var e = eventCaller.currentEntity; KarateMan.instance.Kick(e.beat, e.toggle, e.type); }, 4f, false,
|
||||
new List<Param>()
|
||||
{
|
||||
new Param("toggle", false, "Contains Ball", "Barrel contains a ball instead of a bomb?"),
|
||||
new Param("type", KarateMan.KarateManFaces.Smirk, "Success Expression", "The facial expression to set Joe to on hit")
|
||||
}
|
||||
),
|
||||
new GameAction("combo", delegate { var e = eventCaller.currentEntity; KarateMan.instance.Combo(e.beat, e.type); }, 4f, false,
|
||||
new List<Param>()
|
||||
{
|
||||
new Param("type", KarateMan.KarateManFaces.Happy, "Success Expression", "The facial expression to set Joe to on hit")
|
||||
}
|
||||
),
|
||||
new GameAction("hitX", delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoWord(e.beat, e.type); }, 1f, false,
|
||||
new List<Param>()
|
||||
{
|
||||
|
@ -86,10 +99,10 @@ namespace HeavenStudio.Games.Loaders
|
|||
}),
|
||||
|
||||
// These are still here for backwards-compatibility but are hidden in the editor
|
||||
new GameAction("pot", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, (int) KarateMan.HitType.Pot); }, 2, hidden: true),
|
||||
new GameAction("rock", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, (int) KarateMan.HitType.Rock); }, 2, hidden: true),
|
||||
new GameAction("ball", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, (int) KarateMan.HitType.Ball); }, 2, hidden: true),
|
||||
new GameAction("tacobell", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, (int) KarateMan.HitType.TacoBell); }, 2, hidden: true),
|
||||
new GameAction("pot", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, 0, (int) KarateMan.HitType.Pot); }, 2, hidden: true),
|
||||
new GameAction("rock", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, 0, (int) KarateMan.HitType.Rock); }, 2, hidden: true),
|
||||
new GameAction("ball", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, 0, (int) KarateMan.HitType.Ball); }, 2, hidden: true),
|
||||
new GameAction("tacobell", delegate { KarateMan.instance.CreateItem(eventCaller.currentEntity.beat, 0, (int) KarateMan.HitType.TacoBell); }, 2, hidden: true),
|
||||
new GameAction("hit4", delegate { KarateMan.instance.DoWord(eventCaller.currentEntity.beat, (int) KarateMan.HitThree.HitFour); }, hidden: true),
|
||||
new GameAction("bgfxon", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgFx((int) KarateMan.BackgroundFXType.Sunburst, e.beat, e.length); }, hidden: true),
|
||||
new GameAction("bgfxoff", delegate { var e = eventCaller.currentEntity; KarateMan.instance.SetBgFx((int) KarateMan.BackgroundFXType.None, e.beat, e.length); }, hidden: true),
|
||||
|
@ -148,6 +161,7 @@ namespace HeavenStudio.Games
|
|||
Ball = 3,
|
||||
CookingPot = 6,
|
||||
Alien = 7,
|
||||
Bomb = 8,
|
||||
TacoBell = 999
|
||||
}
|
||||
|
||||
|
@ -316,11 +330,11 @@ namespace HeavenStudio.Games
|
|||
public GameObject RainEffectGO;
|
||||
|
||||
[Header("Unloaded Game Calls")]
|
||||
public static Queue<Beatmap.Entity> ItemQueue = new Queue<Beatmap.Entity>();
|
||||
//public static Queue<Beatmap.Entity> ItemQueue = new Queue<Beatmap.Entity>();
|
||||
public static bool WantBop = true;
|
||||
public static bool WantNori = true;
|
||||
public static int WantNoriType = (int) NoriMode.None;
|
||||
public static float WantBgChangeStart = 0f;
|
||||
public static float WantBgChangeStart = Single.MinValue;
|
||||
public static float WantBgChangeLength = 0f;
|
||||
|
||||
private void Awake()
|
||||
|
@ -561,7 +575,7 @@ namespace HeavenStudio.Games
|
|||
return word;
|
||||
}
|
||||
|
||||
public void CreateItem(float beat, int type)
|
||||
public void CreateItem(float beat, int type, int expression)
|
||||
{
|
||||
|
||||
string outSound;
|
||||
|
@ -573,46 +587,49 @@ namespace HeavenStudio.Games
|
|||
switch (type)
|
||||
{
|
||||
case (int) HitType.Pot:
|
||||
CreateItemInstance(beat, "Item00");
|
||||
CreateItemInstance(beat, "Item00", expression);
|
||||
break;
|
||||
case (int) HitType.Lightbulb:
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||
outSound = "karateman/offbeatLightbulbOut";
|
||||
else
|
||||
outSound = "karateman/lightbulbOut";
|
||||
var mobj = CreateItemInstance(beat, "Item01", KarateManPot.ItemType.Bulb);
|
||||
var mobj = CreateItemInstance(beat, "Item01", expression, KarateManPot.ItemType.Bulb);
|
||||
mobj.GetComponent<KarateManPot>().SetBulbColor(LightBulbColors[0]);
|
||||
break;
|
||||
case (int) HitType.Rock:
|
||||
CreateItemInstance(beat, "Item02", KarateManPot.ItemType.Rock);
|
||||
CreateItemInstance(beat, "Item02", expression, KarateManPot.ItemType.Rock);
|
||||
break;
|
||||
case (int) HitType.Ball:
|
||||
CreateItemInstance(beat, "Item03", KarateManPot.ItemType.Ball);
|
||||
CreateItemInstance(beat, "Item03", expression, KarateManPot.ItemType.Ball);
|
||||
break;
|
||||
case (int) HitType.CookingPot:
|
||||
CreateItemInstance(beat, "Item06", KarateManPot.ItemType.Cooking);
|
||||
CreateItemInstance(beat, "Item06", expression, KarateManPot.ItemType.Cooking);
|
||||
break;
|
||||
case (int) HitType.Alien:
|
||||
CreateItemInstance(beat, "Item07", KarateManPot.ItemType.Alien);
|
||||
CreateItemInstance(beat, "Item07", expression, KarateManPot.ItemType.Alien);
|
||||
break;
|
||||
case (int) HitType.Bomb:
|
||||
CreateItemInstance(beat, "Item04", expression, KarateManPot.ItemType.Bomb);
|
||||
break;
|
||||
case (int) HitType.TacoBell:
|
||||
CreateItemInstance(beat, "Item99", KarateManPot.ItemType.TacoBell);
|
||||
CreateItemInstance(beat, "Item99", expression, KarateManPot.ItemType.TacoBell);
|
||||
break;
|
||||
default:
|
||||
CreateItemInstance(beat, "Item00");
|
||||
CreateItemInstance(beat, "Item00", expression);
|
||||
break;
|
||||
}
|
||||
Jukebox.PlayOneShotGame(outSound, forcePlay: true);
|
||||
}
|
||||
|
||||
public void CreateBulbSpecial(float beat, int type, Color c)
|
||||
public void CreateBulbSpecial(float beat, int type, Color c, int expression)
|
||||
{
|
||||
string outSound;
|
||||
if (Starpelly.Mathp.GetDecimalFromFloat(beat + 0.5f) == 0f)
|
||||
outSound = "karateman/offbeatLightbulbOut";
|
||||
else
|
||||
outSound = "karateman/lightbulbOut";
|
||||
var mobj = CreateItemInstance(beat, "Item01", KarateManPot.ItemType.Bulb);
|
||||
var mobj = CreateItemInstance(beat, "Item01", expression, KarateManPot.ItemType.Bulb);
|
||||
|
||||
if (type == (int) LightBulbType.Custom)
|
||||
mobj.GetComponent<KarateManPot>().SetBulbColor(c);
|
||||
|
@ -621,7 +638,7 @@ namespace HeavenStudio.Games
|
|||
Jukebox.PlayOneShotGame(outSound, forcePlay: true);
|
||||
}
|
||||
|
||||
public void Combo(float beat)
|
||||
public void Combo(float beat, int expression)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/barrelOutCombos", forcePlay: true);
|
||||
|
||||
|
@ -629,12 +646,12 @@ namespace HeavenStudio.Games
|
|||
|
||||
BeatAction.New(gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(beat, delegate { CreateItemInstance(beat, "Item00", KarateManPot.ItemType.ComboPot1, comboId); }),
|
||||
new BeatAction.Action(beat + 0.25f, delegate { CreateItemInstance(beat + 0.25f, "Item00", KarateManPot.ItemType.ComboPot2, comboId); }),
|
||||
new BeatAction.Action(beat + 0.5f, delegate { CreateItemInstance(beat + 0.5f, "Item00", KarateManPot.ItemType.ComboPot3, comboId); }),
|
||||
new BeatAction.Action(beat + 0.75f, delegate { CreateItemInstance(beat + 0.75f, "Item00", KarateManPot.ItemType.ComboPot4, comboId); }),
|
||||
new BeatAction.Action(beat + 1f, delegate { CreateItemInstance(beat + 1f, "Item00", KarateManPot.ItemType.ComboPot5, comboId); }),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CreateItemInstance(beat + 1.5f, "Item05", KarateManPot.ItemType.ComboBarrel, comboId); }),
|
||||
new BeatAction.Action(beat, delegate { CreateItemInstance(beat, "Item00", 0, KarateManPot.ItemType.ComboPot1, comboId); }),
|
||||
new BeatAction.Action(beat + 0.25f, delegate { CreateItemInstance(beat + 0.25f, "Item00", 0, KarateManPot.ItemType.ComboPot2, comboId); }),
|
||||
new BeatAction.Action(beat + 0.5f, delegate { CreateItemInstance(beat + 0.5f, "Item00", 0, KarateManPot.ItemType.ComboPot3, comboId); }),
|
||||
new BeatAction.Action(beat + 0.75f, delegate { CreateItemInstance(beat + 0.75f, "Item00", 0, KarateManPot.ItemType.ComboPot4, comboId); }),
|
||||
new BeatAction.Action(beat + 1f, delegate { CreateItemInstance(beat + 1f, "Item00", 0, KarateManPot.ItemType.ComboPot5, comboId); }),
|
||||
new BeatAction.Action(beat + 1.5f, delegate { CreateItemInstance(beat + 1.5f, "Item05", expression, KarateManPot.ItemType.ComboBarrel, comboId); }),
|
||||
});
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
|
@ -648,11 +665,11 @@ namespace HeavenStudio.Games
|
|||
}, forcePlay: true);
|
||||
}
|
||||
|
||||
public void Kick(float beat)
|
||||
public void Kick(float beat, bool ball, int expression)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/barrelOutKicks", forcePlay: true);
|
||||
|
||||
CreateItemInstance(beat, "Item05", KarateManPot.ItemType.KickBarrel);
|
||||
CreateItemInstance(beat, "Item05", expression, KarateManPot.ItemType.KickBarrel, content: ball);
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
|
@ -663,7 +680,7 @@ namespace HeavenStudio.Games
|
|||
}, forcePlay: true);
|
||||
}
|
||||
|
||||
public GameObject CreateItemInstance(float beat, string awakeAnim, KarateManPot.ItemType type = KarateManPot.ItemType.Pot, int comboId = -1)
|
||||
public GameObject CreateItemInstance(float beat, string awakeAnim, int successExpression, KarateManPot.ItemType type = KarateManPot.ItemType.Pot, int comboId = -1, bool content = false)
|
||||
{
|
||||
GameObject mobj = GameObject.Instantiate(Item, ItemHolder);
|
||||
KarateManPot mobjDat = mobj.GetComponent<KarateManPot>();
|
||||
|
@ -671,6 +688,8 @@ namespace HeavenStudio.Games
|
|||
mobjDat.startBeat = beat;
|
||||
mobjDat.awakeAnim = awakeAnim;
|
||||
mobjDat.comboId = comboId;
|
||||
mobjDat.OnHitExpression = successExpression;
|
||||
mobjDat.KickBarrelContent = content;
|
||||
|
||||
mobj.SetActive(true);
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
if (bombGlowIntensity > 0)
|
||||
{
|
||||
highlightCol = Color.LerpUnclamped(highlightCol, mainCol, bombGlowIntensity);
|
||||
mainCol += BombGlowTint * bombGlowIntensity * bombGlowRatio;
|
||||
mainCol = Color.LerpUnclamped(mainCol, BombGlowTint, bombGlowIntensity * bombGlowRatio);
|
||||
}
|
||||
|
||||
KarateMan.instance.MappingMaterial.SetColor("_ColorAlpha", mainCol);
|
||||
|
|
|
@ -33,6 +33,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
[SerializeField] Color[] ItemBarrelMap;
|
||||
[SerializeField] Color[] ItemCookingLidMap;
|
||||
|
||||
public bool KickBarrelContent = false;
|
||||
public int OnHitExpression = (int) KarateMan.KarateManFaces.Normal;
|
||||
|
||||
public int comboId = -1;
|
||||
static int _lastCombo = -1;
|
||||
public static int LastCombo { get { return _lastCombo; } }
|
||||
|
@ -47,9 +50,11 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
Cooking, // path 1
|
||||
Alien, // path 1
|
||||
TacoBell, // path 1
|
||||
Bomb, // path 1
|
||||
|
||||
KickBarrel, // path 1
|
||||
KickBomb, // no path
|
||||
KickBall, // no path
|
||||
|
||||
ComboPot1, // path 1
|
||||
ComboPot2, // path 1
|
||||
|
@ -125,6 +130,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
bravo = ItemAlienMap[1];
|
||||
delta = KarateMan.ItemColor;
|
||||
break;
|
||||
case ItemType.Bomb:
|
||||
case ItemType.KickBomb:
|
||||
alpha = ItemBombMap[0];
|
||||
bravo = ItemBombMap[1];
|
||||
|
@ -216,6 +222,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
case ItemType.KickBall:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 0.75f, InputType.STANDARD_UP | InputType.DIRECTION_UP, KickJustOrNg, KickThrough, KickOut);
|
||||
CurrentCurve = ItemCurves[6];
|
||||
curveTargetBeat = 2 * 0.75f;
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
case ItemType.CookingLid:
|
||||
CurrentCurve = ItemCurves[9];
|
||||
path = 1;
|
||||
|
@ -223,6 +236,12 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
status = FlyStatus.Hit;
|
||||
comboId = -1;
|
||||
break;
|
||||
case ItemType.Bomb:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ItemJustOrNg, ItemThrough, ItemOut);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut);
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
default:
|
||||
OnHit = KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ItemJustOrNg, ItemThrough, ItemOut);
|
||||
OnHitWrongAction = KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut);
|
||||
|
@ -269,7 +288,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
transform.position = CurrentCurve.GetPoint(Mathf.Min(prog, 1f));
|
||||
}
|
||||
|
||||
if (prog >= 2f || (type == ItemType.KickBomb && prog >= 1f)) {
|
||||
if (prog >= 2f || (ItemKickable() && prog >= 1f)) {
|
||||
if (type == ItemType.KickBomb)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], ItemCurves[6].GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
|
@ -289,13 +308,26 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
break;
|
||||
case FlyStatus.Hit:
|
||||
prog = cond.GetPositionFromBeat(startBeat, curveTargetBeat);
|
||||
if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || CurrentCurve == null) {
|
||||
if (type == ItemType.Bomb && cond.songPositionInBeats >= startBeat + curveTargetBeat)
|
||||
{
|
||||
ParticleSystem p = Instantiate(HitParticles[7], CurrentCurve.GetPoint(1f), Quaternion.identity, KarateMan.instance.ItemHolder);
|
||||
p.Play();
|
||||
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
|
||||
Jukebox.PlayOneShotGame("karateman/bombBreak", volume: 0.25f);
|
||||
return;
|
||||
}
|
||||
else if (cond.songPositionInBeats >= 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)
|
||||
return;
|
||||
|
||||
GameObject.Destroy(ShadowInstance.gameObject);
|
||||
GameObject.Destroy(gameObject);
|
||||
|
@ -315,7 +347,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
break;
|
||||
case FlyStatus.NG:
|
||||
prog = cond.GetPositionFromBeat(startBeat, curveTargetBeat);
|
||||
if (cond.songPositionInBeats >= startBeat + Mathf.Max(2f, curveTargetBeat) || (type == ItemType.KickBomb && prog >= 1f) || CurrentCurve == null) {
|
||||
if (cond.songPositionInBeats >= 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);
|
||||
|
@ -373,7 +405,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
void ItemHitEffect(bool straight = false)
|
||||
{
|
||||
ParticleSystem p;
|
||||
CreateHitMark(type == ItemType.KickBomb);
|
||||
CreateHitMark(ItemKickable());
|
||||
KarateMan game = KarateMan.instance;
|
||||
switch (type)
|
||||
{
|
||||
|
@ -421,7 +453,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
Jukebox.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", ItemType.CookingLid);
|
||||
game.CreateItemInstance(startBeat + 1f, "Item09", 0, ItemType.CookingLid);
|
||||
GetComponent<Animator>().Play("Item08", -1, 0);
|
||||
break;
|
||||
case ItemType.Alien:
|
||||
|
@ -431,6 +463,14 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
p = Instantiate(HitParticles[1], HitPosition[1].position, Quaternion.Euler(0, 0, UnityEngine.Random.Range(0f, 360f)), game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
case ItemType.Bomb:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
Jukebox.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);
|
||||
break;
|
||||
case ItemType.TacoBell:
|
||||
CurrentCurve = ItemCurves[1];
|
||||
curveTargetBeat = 1f;
|
||||
|
@ -482,14 +522,19 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
p.Play();
|
||||
break;
|
||||
case ItemType.KickBarrel:
|
||||
game.CreateItemInstance(startBeat + 1f, "Item04", ItemType.KickBomb);
|
||||
if (KickBarrelContent)
|
||||
game.CreateItemInstance(startBeat + 1f, "Item03", OnHitExpression, ItemType.KickBall);
|
||||
else
|
||||
{
|
||||
game.Joe.ApplyBombGlow();
|
||||
game.CreateItemInstance(startBeat + 1f, "Item04", OnHitExpression, ItemType.KickBomb);
|
||||
}
|
||||
Jukebox.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);
|
||||
p.Play();
|
||||
|
||||
game.Joe.ApplyBombGlow();
|
||||
break;
|
||||
case ItemType.KickBomb:
|
||||
Jukebox.PlayOneShotGame("karateman/bombKick", forcePlay: true);
|
||||
|
@ -498,6 +543,11 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
|
||||
game.Joe.RemoveBombGlow(startBeat + 0.75f);
|
||||
break;
|
||||
case ItemType.KickBall:
|
||||
Jukebox.PlayOneShotGame("karateman/bombKick", forcePlay: true);
|
||||
p = Instantiate(HitParticles[1], ItemCurves[6].GetPoint(0.5f), Quaternion.identity, game.ItemHolder);
|
||||
p.Play();
|
||||
break;
|
||||
default:
|
||||
CurrentCurve = ItemCurves[straight ? 1 : 0];
|
||||
curveTargetBeat = straight ? 1f : 1.5f;
|
||||
|
@ -520,6 +570,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
case ItemType.Cooking:
|
||||
case ItemType.Alien:
|
||||
case ItemType.TacoBell:
|
||||
case ItemType.Bomb:
|
||||
case ItemType.KickBarrel:
|
||||
return 2;
|
||||
default:
|
||||
|
@ -527,6 +578,18 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
|
||||
bool ItemKickable()
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ItemType.KickBomb:
|
||||
case ItemType.KickBall:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void JoeComboSequence()
|
||||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
|
@ -578,6 +641,22 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
|
||||
void DoHitExpression(float offset)
|
||||
{
|
||||
if (OnHitExpression == (int) KarateMan.KarateManFaces.Normal)
|
||||
return;
|
||||
var joe = KarateMan.instance.Joe;
|
||||
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(offset, delegate {
|
||||
joe.SetFaceExpression(OnHitExpression);
|
||||
}),
|
||||
new BeatAction.Action(offset + 2f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
public void ItemJustOrNg(PlayerActionEvent caller, float state)
|
||||
{
|
||||
if (GameManager.instance.currentGame != "karateman") return;
|
||||
|
@ -618,6 +697,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
}
|
||||
}
|
||||
bool straight = joe.Punch(ItemPunchHand());
|
||||
DoHitExpression(startBeat + 1f);
|
||||
ItemHitEffect(straight);
|
||||
status = FlyStatus.Hit;
|
||||
KarateMan.instance.Nori.DoHit();
|
||||
|
@ -675,7 +755,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
Jukebox.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 6f, delegate {
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
}),
|
||||
|
@ -724,7 +804,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
Jukebox.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 6f, delegate {
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
}),
|
||||
|
@ -787,16 +867,8 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
KarateMan.instance.Nori.DoNG();
|
||||
}
|
||||
else {
|
||||
DoHitExpression(startBeat + 1.5f);
|
||||
ItemHitEffect();
|
||||
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(startBeat + 1.5f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Happy);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 3.5f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
})
|
||||
});
|
||||
KarateMan.instance.Nori.DoHit();
|
||||
}
|
||||
}
|
||||
|
@ -829,7 +901,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
new BeatAction.Action(startBeat + 2f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 6f, delegate {
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
}),
|
||||
|
@ -918,7 +990,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Surprise);
|
||||
Jukebox.PlayOneShotGame("karateman/karate_through", forcePlay: true);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 6f, delegate {
|
||||
new BeatAction.Action(startBeat + 5f, delegate {
|
||||
if (joe.wantFace == -1)
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
}),
|
||||
|
@ -952,26 +1024,16 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
});
|
||||
|
||||
KarateMan.instance.Nori.DoNG();
|
||||
joe.RemoveBombGlow(startBeat + 0.75f);
|
||||
if (type == ItemType.KickBomb)
|
||||
joe.RemoveBombGlow(startBeat + 0.75f);
|
||||
}
|
||||
else {
|
||||
DoHitExpression(startBeat + 2f);
|
||||
ItemHitEffect();
|
||||
status = FlyStatus.Hit;
|
||||
CurrentCurve = ItemCurves[7];
|
||||
startBeat = Conductor.instance.songPositionInBeats;
|
||||
curveTargetBeat = 3f;
|
||||
|
||||
|
||||
BeatAction.New(joe.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(startBeat + 1.25f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Smirk);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 4.25f, delegate {
|
||||
joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
})
|
||||
});
|
||||
|
||||
KarateMan.instance.Nori.DoHit();
|
||||
}
|
||||
}
|
||||
|
@ -987,14 +1049,16 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
BeatAction.New(KarateMan.instance.Joe.gameObject, new List<BeatAction.Action>()
|
||||
{
|
||||
new BeatAction.Action(startBeat + 2f, delegate {
|
||||
//TODO: play miss sound
|
||||
//deduct flow if applicable
|
||||
KarateMan.instance.Joe.SetFaceExpression((int) KarateMan.KarateManFaces.VerySad);
|
||||
}),
|
||||
new BeatAction.Action(startBeat + 4f, delegate {
|
||||
KarateMan.instance.Joe.SetFaceExpression((int) KarateMan.KarateManFaces.Normal);
|
||||
})
|
||||
});
|
||||
KarateMan.instance.Nori.DoThrough();
|
||||
OnHit.CanHit(false);
|
||||
KarateMan.instance.Joe.RemoveBombGlow(startBeat + 0.75f * 2, 1.5f);
|
||||
if (type == ItemType.KickBomb)
|
||||
KarateMan.instance.Joe.RemoveBombGlow(startBeat + 0.75f * 2, 1.5f);
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 968963630
|
||||
CRC: 2278345134
|
||||
AssetBundleManifest:
|
||||
AssetBundleInfos:
|
||||
Info_0:
|
||||
|
|
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
ManifestFileVersion: 0
|
||||
CRC: 3714046501
|
||||
CRC: 3646296036
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: e2fd4741b223fcd4572680396471ffda
|
||||
Hash: 100fdd4f1110ba69f029c7b3c1112a05
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 9911656494477f12e9bb85e9f15cac54
|
||||
|
|
Loading…
Reference in a new issue