void StandingMeleeCombo() { if (Player.Grounded) { if (MeleeChainNumber <= 0 && MeleeState == Player_States.PlayerMeleeStates.None && Player.PlayerState == Player_States.PlayerStates.Normal && !StandingArmAlternate) { Player.myVoiceBox.Play(); Player.myRB.velocity = new Vector2(0, 0); Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; //StandingArmAlternate = true; MeleeState = Player_States.PlayerMeleeStates.MeleeChain; MeleeChainNumber = 1; AnimationTimer = (StandingAnimReference.length * .5f); Player.myAnim.SetInteger("Standing", 1); Player.myAttackBox.SetInteger("Standing", 1); DamageDealt = DamageOutput; Debug.Log("Claw Standing Slash"); } /*else if (MeleeChainNumber <= 0 && MeleeState == Player_States.PlayerMeleeStates.None && Player.PlayerState == Player_States.PlayerStates.Normal && StandingArmAlternate || MeleeChainNumber <= 0 && MeleeState == Player_States.PlayerMeleeStates.MeleeChain && Player.PlayerState == Player_States.PlayerStates.Normal && StandingArmAlternate) || { || Player.myRB.velocity = new Vector2(0, 0); || Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; || StandingArmAlternate = false; || MeleeState = Player_States.PlayerMeleeStates.MeleeChain; || MeleeChainNumber = 2; || AnimationTimer = StandingAnimReference2.length; || Player.myAnim.SetInteger("Standing", 2); || Player.myAttackBox.SetInteger("Standing", 2); || DamageDealt = StandingMeleeDamage; || Debug.Log("Claw Standing Slash, other hand"); || }*/ } }
void CrouchSlash() { if (Player.PlayerState == Player_States.PlayerStates.Crouching && MeleeState == Player_States.PlayerMeleeStates.None && Player.Grounded && !Player.ClingToWall) { Player.myVoiceBox.Play(); Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; MeleeState = Player_States.PlayerMeleeStates.CrouchAttack; DamageDealt = DamageOutput; AnimationTimer = (CrouchAnimReference.length * .5f); Player.myAttackBox.SetTrigger("Crouch"); Player.myAnim.SetBool("CrouchSlash", true); Debug.Log("Crouch Attack"); } }
void AerialSlash() { if (Player.PlayerState == Player_States.PlayerStates.Normal && MeleeState == Player_States.PlayerMeleeStates.None && !Player.MovementScript.newGrounded && !Player.ClingToWall) { Player.myVoiceBox.Play(); Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; MeleeState = Player_States.PlayerMeleeStates.AirAttack; DamageDealt = DamageOutput; AnimationTimer = (AerialAnimReference.length * .5f); Player.myRB.velocity = new Vector2(Player.myRB.velocity.x, 0); Player.myAttackBox.SetTrigger("Aerial"); Player.myAnim.SetBool("AerialSlash", true); Debug.Log("Aerial Slash"); } }
void WallClingSlash() { if (Player.PlayerState == Player_States.PlayerStates.Normal && !(Player.PlayerState == Player_States.PlayerStates.MeleeAttacking) && Player.ClingToWall) { Player.myVoiceBox.Play(); Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; MeleeState = Player_States.PlayerMeleeStates.WallAttack; DamageDealt = DamageOutput; Player.ClingToWall = true; Player.myRB.constraints = Player.MovementScript.YContraints[1]; AnimationTimer = (WallAnimReference.length * .5f); Player.myAttackBox.SetTrigger("Wall"); Player.myAnim.SetBool("WallSlash", true); //Player.myAnim.SetBool("Dashing", false); //Player.myRB.velocity = new Vector2(0, 0); Debug.Log("Wall Attack"); } }
/*void StandingMeleeCombo2() * { * Player.myRB.velocity = new Vector2(0, 0); * Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; * StandingArmAlternate = false; * MeleeState = Player_States.PlayerMeleeStates.MeleeChain; * MeleeChainNumber = 2; * AnimationTimer = (StandingAnimReference2.length *.25f); * Player.myAnim.SetInteger("Standing", 2); * Player.myAttackBox.SetInteger("Standing", 2); * DamageDealt = StandingMeleeDamage; * Debug.Log("Claw Standing Slash combo"); * }*/ void DashEnder() { if (Player.PlayerState == Player_States.PlayerStates.Dashing && !(Player.PlayerState == Player_States.PlayerStates.MeleeAttacking) /*&& Player.Grounded*/ && !(Player.ClingToWall)) { Player.myVoiceBox.Play(); Player.PlayerState = Player_States.PlayerStates.MeleeAttacking; MeleeState = Player_States.PlayerMeleeStates.DashEnder; DamageDealt = DamageOutput; AnimationTimer = DashAttackAnimReference.length; DashEndBoolChanger = true; Player.MovementScript.dashTime = 0; Player.myRB.constraints = Player.MovementScript.YContraints[0]; Player.myAttackBox.SetTrigger("Dash"); Player.myAnim.SetBool("DashEnder", true); //Player.myAnim.SetBool("Dashing", false); //Player.myRB.velocity = new Vector2(0, 0); Debug.Log("DashAttack"); } }
public void ResetMeleeState() //Resets all values for melee attacks. Used when animation for attack is over or player is taking damage. { BackSwords(); DamageDealt = 0; Player.myAttackBox.SetInteger("Standing", 0); Player.myAttackBox.SetTrigger("Reset"); StandingArmAlternate = false; //Player.myAnim.SetTrigger("MeleeReset"); Player.myAnim.SetBool("DashEnder", false); Player.myAnim.SetBool("AerialSlash", false); Player.myAnim.SetBool("CrouchSlash", false); Player.myAnim.SetBool("WallSlash", false); Player.myAnim.SetInteger("Standing", 0); MeleeChainNumber = 0; DashEndBoolChanger = false; MeleeState = Player_States.PlayerMeleeStates.None; if (Player.PlayerState == Player_States.PlayerStates.MeleeAttacking) { Player.PlayerState = Player_States.PlayerStates.Normal; } //Debug.Log("Melee Reset"); }