mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-08 18:55:07 +00:00
start work on kicks
This commit is contained in:
parent
a1f7b0ea42
commit
28b5cc71d7
3 changed files with 31 additions and 8 deletions
|
@ -198,6 +198,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
anim: {fileID: 3234329793564267697}
|
||||
inCombo: 0
|
||||
lockedInCombo: 0
|
||||
--- !u!1 &676219503303960657
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1737,7 +1738,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5764267227668832721
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3599,7 +3600,7 @@ SpriteRenderer:
|
|||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 10.25, y: 1.9722222}
|
||||
m_Size: {x: 3.8888888, y: 6.5555553}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace HeavenStudio.Games.Loaders
|
|||
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(), "Custom Color", "The color to use when the bulb type is set to Custom")
|
||||
}),
|
||||
new GameAction("kick", delegate { }, 4f),
|
||||
new GameAction("kick", delegate { KarateMan.instance.Kick(eventCaller.currentEntity.beat); }, 4f),
|
||||
new GameAction("combo", delegate { KarateMan.instance.Combo(eventCaller.currentEntity.beat); }, 4f),
|
||||
new GameAction("hitX", delegate { var e = eventCaller.currentEntity; KarateMan.instance.DoWord(e.beat, e.type); }, 1f, false,
|
||||
new List<Param>()
|
||||
|
@ -334,6 +334,21 @@ namespace HeavenStudio.Games
|
|||
}, forcePlay: true);
|
||||
}
|
||||
|
||||
public void Kick(float beat)
|
||||
{
|
||||
Jukebox.PlayOneShotGame("karateman/barrelOutKicks", forcePlay: true);
|
||||
|
||||
CreateItemInstance(beat, "Item05", KarateManPot.ItemType.KickBarrel);
|
||||
|
||||
MultiSound.Play(new MultiSound.Sound[]
|
||||
{
|
||||
new MultiSound.Sound("karateman/punchKick1", beat + 1f),
|
||||
new MultiSound.Sound("karateman/punchKick2", beat + 1.5f),
|
||||
new MultiSound.Sound("karateman/punchKick3", beat + 1.75f),
|
||||
new MultiSound.Sound("karateman/punchKick4", beat + 2.5f),
|
||||
}, forcePlay: true);
|
||||
}
|
||||
|
||||
GameObject CreateItemInstance(float beat, string awakeAnim, KarateManPot.ItemType type = KarateManPot.ItemType.Pot, int comboId = -1)
|
||||
{
|
||||
GameObject mobj = GameObject.Instantiate(Item, ItemHolder);
|
||||
|
|
|
@ -130,6 +130,13 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ComboEndWrongActionAlt, ItemOut, ItemOut);
|
||||
path = 5;
|
||||
break;
|
||||
case ItemType.KickBarrel:
|
||||
//todo: needs own action for spawning the bomb
|
||||
KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ItemJustOrNg, ItemThrough, ItemOut);
|
||||
KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut);
|
||||
path = 1;
|
||||
comboId = -1;
|
||||
break;
|
||||
default:
|
||||
KarateMan.instance.ScheduleInput(startBeat, 1f, InputType.STANDARD_DOWN | InputType.DIRECTION_DOWN, ItemJustOrNg, ItemThrough, ItemOut);
|
||||
KarateMan.instance.ScheduleUserInput(startBeat, 1f, InputType.STANDARD_ALT_DOWN, ItemWrongAction, ItemOut, ItemOut);
|
||||
|
@ -166,7 +173,7 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
return;
|
||||
}
|
||||
else if (prog < 1f - ItemSlipRt[path]) {
|
||||
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (90f * Time.deltaTime * (1/cond.pitchedSecPerBeat)));
|
||||
transform.rotation = Quaternion.Euler(0, 0, transform.rotation.eulerAngles.z + (125f * Time.deltaTime * (1/cond.pitchedSecPerBeat)));
|
||||
}
|
||||
break;
|
||||
case FlyStatus.Hit:
|
||||
|
@ -226,6 +233,9 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
case ItemType.ComboBarrel:
|
||||
Jukebox.PlayOneShotGame("karateman/comboHit4", forcePlay: true);
|
||||
break;
|
||||
case ItemType.KickBarrel:
|
||||
Jukebox.PlayOneShotGame("karateman/barrelBreak", forcePlay: true);
|
||||
break;
|
||||
default:
|
||||
Jukebox.PlayOneShotGame("karateman/potHit", forcePlay: true);
|
||||
break;
|
||||
|
@ -239,14 +249,11 @@ namespace HeavenStudio.Games.Scripts_KarateMan
|
|||
switch (type)
|
||||
{
|
||||
case ItemType.Rock:
|
||||
return 2;
|
||||
case ItemType.Ball:
|
||||
return 2;
|
||||
case ItemType.Cooking:
|
||||
return 2;
|
||||
case ItemType.Alien:
|
||||
return 2;
|
||||
case ItemType.TacoBell:
|
||||
case ItemType.KickBarrel:
|
||||
return 2;
|
||||
default:
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue