public void PlayWinning() { GameSaveStateController.GetInstance().GeneratePlayWinAudio(); playerState = PlayerAction.Won; //playerDummyState = PlayerDummyAction.Won; Animator animation = animator.GetComponent <Animator>(); Dummy = true; animation.Play(CHAR_WINNING); }
protected override void PlayAttack() { GameSaveStateController.GetInstance().GeneratePlayWeaponMoveAudio(); Animator animation = animator.GetComponent <Animator>(); if (FacingRight) { animation.Play(BOSS_ONE_ATTACK); } else { animation.Play(BOSS_ONE_ATTACK_L); } }
public void Jump() { if ((!Dummy || playerDummyState == PlayerDummyAction.Tutorial) && Input.GetKeyDown(GameController.JUMP)) { //Jump GameSaveStateController.GetInstance().GeneratePlayJumpAudio(); //obj.GetComponent<PlaySoundController>().PlayAudioSource(); playerState = PlayerAction.Jump; Animator animation = animator.GetComponent <Animator>(); if (facingRight) { animation.Play(JUMP_AN); } else { animation.Play(JUMP_AN_L); } } }
public void Attack() { if (!Dummy || playerDummyState == PlayerDummyAction.Tutorial) { if (Weapon.Bare == chosenWeapon) { if (Input.GetKeyDown(GameController.ATTACK_1)) { playerState = PlayerAction.Punch; Attack(true); } else if (Input.GetKeyDown(GameController.ATTACK_2)) { playerState = PlayerAction.Kick; Attack(false); MoveTransform(facingRight? Vector2.right: Vector2.left, 3); } } else { if (Input.GetKeyDown(GameController.ATTACK_1) || Input.GetKeyDown(GameController.ATTACK_2)) { if (Weapon.Pike == chosenWeapon) { playerState = PlayerAction.Pike; AttackWeapon(true); GameSaveStateController.GetInstance().GeneratePlayWeaponMoveAudio(); } else { playerState = PlayerAction.Axe; AttackWeapon(false); GameSaveStateController.GetInstance().GeneratePlayWeaponMoveAudio(); } } } } }