more changes to make it better
This commit is contained in:
@@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
public class PlayerController : Character
|
||||
{
|
||||
[SerializeField] GameObject _modelPrefab;
|
||||
[SerializeField] private HammerThrower _hammerThrower;
|
||||
private GameObject _hammer;
|
||||
|
||||
private bool _isHoldingHammer = true;
|
||||
@@ -12,14 +12,13 @@ public class PlayerController : Character
|
||||
|
||||
private InputManager _inputManager;
|
||||
private PlayerState _playerState;
|
||||
private HammerThrower _hammerThrower;
|
||||
|
||||
private Vector2 _currentMovement;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_inputManager = GetComponent<InputManager>();
|
||||
_playerState = GetComponent<PlayerState>();
|
||||
_hammerThrower = GetComponent<HammerThrower>();
|
||||
|
||||
_inputManager.OnFire += OnFireButtonPressed;
|
||||
_inputManager.OnMovementChanged += OnMovementChanged;
|
||||
@@ -53,7 +52,6 @@ public class PlayerController : Character
|
||||
}
|
||||
|
||||
MoveTo(_currentMovement.x, isAllowVertical ? _currentMovement.y : 0);
|
||||
_hammerThrower.SetFacingDirection(_facingRight);
|
||||
}
|
||||
|
||||
private void OnMovementChanged(Vector2 movement)
|
||||
@@ -73,12 +71,9 @@ public class PlayerController : Character
|
||||
public void ThrowHammerObject()
|
||||
{
|
||||
_hammerThrower.TryThrowHammer();
|
||||
UpdatePlayerSprite();
|
||||
}
|
||||
|
||||
private void UpdatePlayerSprite()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void SetWalkingAnimation(bool isWalking)
|
||||
{
|
||||
_animator.SetBool("Legs_Walk", isWalking);
|
||||
@@ -87,10 +82,6 @@ public class PlayerController : Character
|
||||
|
||||
protected override void SetClimbingAnimation(bool isClimbing)
|
||||
{
|
||||
if (isClimbing)
|
||||
{
|
||||
|
||||
}
|
||||
_animator.SetBool("Climb", isClimbing);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user