//NOTE: probably don't need this. Could just merge with AbilityExecute. public void AbilityPrime(Slot[] wieldedSlotSet, int firedPin) { if (wieldedSlotSet[firedPin - 1].AssignedPin.Passive) { return; } switch (wieldedSlotSet[firedPin - 1].AssignedPin.UserAnimation) { case Global.ANI_STATE_ATTACK: state = Global.BehaviorState.STATE_ATTACK; AbilityExecute(wieldedSlotSet, firedPin); break; case Global.ANI_STATE_ATTACKMOVE: break; } }
public void AttackFinish() { state = Global.BehaviorState.STATE_MOVE; }
public void DashFinish() { state = Global.BehaviorState.STATE_MOVE; }
public void MoveState(Slot[] wieldedSlotSet) { InputVector.x = Input.GetActionStrength("ui_right") - Input.GetActionStrength("ui_left"); InputVector.y = Input.GetActionStrength("ui_down") - Input.GetActionStrength("ui_up"); InputVector = InputVector.Normalized(); if (InputVector != Vector2.Zero) { DashVector = InputVector; animationTree.Set("parameters/Idle/blend_position", InputVector); animationTree.Set("parameters/Run/blend_position", InputVector); animationTree.Set("parameters/Attack/blend_position", InputVector); animationTree.Set("parameters/Dash/blend_position", InputVector); playerAnimationState.Travel("Run"); MoveAndSlide(InputVector * MoveSpeed); } else { playerAnimationState.Travel("Idle"); InputVector = MoveAndSlide(Vector2.Zero); } if (Input.IsActionJustPressed("ui_ability1")) { if (wieldedSlotSet[0].AssignedPin != null && !wieldedSlotSet[0].AssignedPin.Passive) { AbilityPrime(wieldedSlotSet, 1); } } if (Input.IsActionJustPressed("ui_ability2")) { if (wieldedSlotSet[1].AssignedPin != null && !wieldedSlotSet[1].AssignedPin.Passive) { AbilityPrime(wieldedSlotSet, 2); } } if (Input.IsActionJustPressed("ui_ability3")) { if (wieldedSlotSet[2].AssignedPin != null && !wieldedSlotSet[2].AssignedPin.Passive) { AbilityPrime(wieldedSlotSet, 3); } } if (Input.IsActionJustPressed("ui_ability4")) { if (wieldedSlotSet[3].AssignedPin != null && !wieldedSlotSet[3].AssignedPin.Passive) { AbilityPrime(wieldedSlotSet, 4); } } if (Input.IsActionJustPressed("ui_ability5")) { if (wieldedSlotSet[4].AssignedPin != null && !wieldedSlotSet[4].AssignedPin.Passive) { AbilityPrime(wieldedSlotSet, 5); } } if (Input.IsActionJustPressed("ui_ability6")) { if (wieldedSlotSet[5].AssignedPin != null && !wieldedSlotSet[5].AssignedPin.Passive) { AbilityPrime(wieldedSlotSet, 6); } } if (Input.IsActionJustPressed("ui_dash")) { state = Global.BehaviorState.STATE_DASH; } }