diff options
Diffstat (limited to 'Assets/Scripts/Test')
-rw-r--r-- | Assets/Scripts/Test/SaionjiScript_Ability.cs | 22 | ||||
-rw-r--r-- | Assets/Scripts/Test/SaionjiScript_Anim.cs | 5 |
2 files changed, 22 insertions, 5 deletions
diff --git a/Assets/Scripts/Test/SaionjiScript_Ability.cs b/Assets/Scripts/Test/SaionjiScript_Ability.cs index bd62c138..49c0b5e9 100644 --- a/Assets/Scripts/Test/SaionjiScript_Ability.cs +++ b/Assets/Scripts/Test/SaionjiScript_Ability.cs @@ -41,6 +41,7 @@ public partial class SaionjiScript : MonoBehaviour AttackAbility attk4 = new AttackAbility(animator, Anim_LightAttack4);
AttackAbility attk5 = new AttackAbility(animator, Anim_LightAttack5);
AttackAbility sideKick = new AttackAbility(animator, Anim_SideKick);
+ AttackAbility superKick = new AttackAbility(animator, Anim_SuperKick);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// actions
@@ -58,6 +59,7 @@ public partial class SaionjiScript : MonoBehaviour ActionSwitchAbility switchToAttk5 = new ActionSwitchAbility(m_AbilitySystem, attk5);
ActionSwitchAbility switchToSideKick = new ActionSwitchAbility(m_AbilitySystem, sideKick);
ActionSwitchAbility switchToDash = new ActionSwitchAbility(m_AbilitySystem, dash);
+ ActionSwitchAbility switchToSuperKick = new ActionSwitchAbility(m_AbilitySystem, superKick);
ActionWipeCmdRecord wipeCmdRecord = new ActionWipeCmdRecord();
@@ -74,13 +76,15 @@ public partial class SaionjiScript : MonoBehaviour ConditionTowardLeft condTowardLeft = new ConditionTowardLeft(this.transform);
ConditionTowardRight condTowardRight = new ConditionTowardRight(this.transform);
ConditionCommandSeq condRight2Cmd = new ConditionCommandSeq(new List<GamepadButton>{GamepadButton.Right, GamepadButton.Right }, 1f);
- ConditionCommandSeq condLeft2Cmd = new ConditionCommandSeq(new List<GamepadButton>{GamepadButton.Left, GamepadButton.Left }, 1f);
+ ConditionCommandSeq condLeft2Cmd = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Left, GamepadButton.Left }, 1f);
+ ConditionCommandSeq condDRC = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Down, GamepadButton.Right, GamepadButton.Circle}, 1f);
+ ConditionCommandSeq condDLC = new ConditionCommandSeq(new List<GamepadButton> { GamepadButton.Down, GamepadButton.Left, GamepadButton.Circle}, 1f);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// common triggers
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- Trigger triggerTurnRight = new Trigger(And(condRightButtonHold, Not(condTowardRight)), towardRight);
- Trigger triggerTurnLeft = new Trigger(And(condLeftButtonHold, Not(condTowardLeft)), towardLeft);
+ Trigger triggerTurnRight = new Trigger(And(condRightCmd, Not(condTowardRight)), towardRight);
+ Trigger triggerTurnLeft = new Trigger(And(condLeftCmd, Not(condTowardLeft)), towardLeft);
Trigger trigger = null;
@@ -89,6 +93,10 @@ public partial class SaionjiScript : MonoBehaviour ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// idle ability
+ trigger = new Trigger(And(condTowardRight, condDRC), new List<ActionBase> { wipeCmdRecord, switchToSuperKick });
+ idle.AddTrigger(trigger);
+ trigger = new Trigger(And(condTowardLeft, condDLC), new List<ActionBase> { wipeCmdRecord, switchToSuperKick });
+ idle.AddTrigger(trigger);
trigger = new Trigger(And(condTowardRight, And(condRightCmd, condRight2Cmd)), new List<ActionBase> { wipeCmdRecord , switchToDash });
idle.AddTrigger(trigger);
trigger = new Trigger(And(condTowardLeft, And(condLeftCmd, condLeft2Cmd)), new List<ActionBase> { wipeCmdRecord , switchToDash });
@@ -101,8 +109,8 @@ public partial class SaionjiScript : MonoBehaviour idle.AddTrigger(trigger);
trigger = new Trigger(condCrossCmd, switchToSideKick);
idle.AddTrigger(trigger);
- trigger = new Trigger(condLeftCmd, turn180);
- idle.AddTrigger(trigger);
+ idle.AddTrigger(triggerTurnRight);
+ idle.AddTrigger(triggerTurnLeft);
// move ability
trigger = new Trigger(And(condTowardRight, And(condRightCmd, condRight2Cmd)), new List<ActionBase> { wipeCmdRecord, switchToDash, });
@@ -174,6 +182,10 @@ public partial class SaionjiScript : MonoBehaviour trigger = new Trigger(condSideKickExpireTime, switchToIdle);
sideKick.AddTrigger(trigger);
+ ConditionAttkExpireTime condSuperKickExpireTime = new ConditionAttkExpireTime(superKick, expireTime);
+ trigger = new Trigger(condSuperKickExpireTime, switchToIdle);
+ superKick.AddTrigger(trigger);
+
m_AbilitySystem.ForceStart(idle);
}
diff --git a/Assets/Scripts/Test/SaionjiScript_Anim.cs b/Assets/Scripts/Test/SaionjiScript_Anim.cs index 03d1671a..f7c29d3b 100644 --- a/Assets/Scripts/Test/SaionjiScript_Anim.cs +++ b/Assets/Scripts/Test/SaionjiScript_Anim.cs @@ -14,6 +14,7 @@ public partial class SaionjiScript : MonoBehaviour int Anim_LightAttack5; int Anim_SideKick; int Anim_DashWithSword; + int Anim_SuperKick; void GetAnimHash() { @@ -25,7 +26,11 @@ public partial class SaionjiScript : MonoBehaviour Anim_LightAttack3 = Animator.StringToHash("Light_Attk_3"); Anim_LightAttack4 = Animator.StringToHash("Light_Attk_4"); Anim_LightAttack5 = Animator.StringToHash("Light_Attk_5"); + Anim_SideKick = Animator.StringToHash("SideKick"); + + Anim_SuperKick = Animator.StringToHash("SuperKickCombo"); + Anim_DashWithSword = Animator.StringToHash("Dash_With_Sword"); } |