public override void Enter() { Debug.Log("STATE: Wall Attack"); base.Enter(); _weaponSystem.AttackCompleted += OnAttackCompleted; _startPos = _movement.Position; //_movement.HoldPosition(_startPos); _movement.Flip(); _weaponSystem.StandardAttack(_weaponSystem.EquippedWeapon.WallAttack, _weaponSystem.EquippedWeapon.HitSFX, true); _movement.SetVelocityZero(); _movement.SetGravityScale(0); }
private void OnHitOther() { _hitDamageable = true; // if we've hit something, reset air dash _movement.SetGravityScale(0); _movement.SetVelocityZero(); }
public override void Enter() { Debug.Log("STATE: Dash"); base.Enter(); _animator.PlayAnimation(PlayerAnimator.DashingName); _receiveHit.IsImmune = true; _input.AttackPressed += OnAttackPressed; _dashSystem.DashCompleted += OnDashCompleted; DetermineDashDirection(); _dashSystem.UseDash(_data.DashDuration, _data.DashCooldown); _movement.SetVelocityZero(); _movement.SetGravityScale(_data.DashingGravityScale); _sfx.DashReleaseSFX?.PlayOneShot(_player.transform.position); _jumpDust?.Play(); }
// public override void Enter() { base.Enter(); Debug.Log("STATE: Wall Grab"); _animator.PlayAnimation(PlayerAnimator.WallGrabName); _startPosition = _movement.Position; _movement.SetVelocityZero(); _sfx.WallGrabSFX.PlayOneShot(_player.transform.position); }
public override void Enter() { base.Enter(); Debug.Log("STATE: Crouch"); _player.SetColliderHeight(_data.CrouchColliderHeight); _playerAnimator.ShowCrouchVisual(true); _movement.SetVelocityZero(); _ceilingDetector.Detect(); }
public override void Enter() { base.Enter(); Debug.Log("STATE: Wall Jump"); _animator.PlayAnimation(PlayerAnimator.JumpName); _input.JumpPressed += OnJumpPressed; _input.DashPressed += OnDashPressed; _input.AttackPressed += OnAttackPressed; _isMoveInputAllowed = false; //_player.DecreaseAirJumpsRemaining(); Debug.Log("Remaining Jumps: " + _player.AirJumpsRemaining); // reverse direction _movement.SetVelocityZero(); _movement.Flip(); _movement.Move(_data.WallJumpVelocity, _data.WallJumpAngle, _movement.FacingDirection, false); _sfx.JumpSFX?.PlayOneShot(_player.transform.position); _jumpDust?.Play(); }