add player death animation

also bugfixed some tambourine stuff
This commit is contained in:
Sam
2023-04-30 13:58:04 -07:00
parent 16a190949d
commit 9f36564e67
13 changed files with 734 additions and 150 deletions

View File

@@ -58,12 +58,16 @@ public class PlayerMovement : MonoBehaviour
[Header("Layers & Tags")]
[SerializeField] private LayerMask _groundLayer;
[HideInInspector] private PlayerBehavior playerBehavior;
#endregion
private void Awake()
{
RB = GetComponent<Rigidbody2D>();
grapplingRope = this.gameObject.GetComponent<PlayerBehavior>().grapplingRope;
playerBehavior = this.gameObject.GetComponent<PlayerBehavior>();
grapplingRope = playerBehavior.grapplingRope;
}
private void Start()
@@ -74,12 +78,16 @@ public class PlayerMovement : MonoBehaviour
void OnMove(InputValue value)
{
this._moveInput = value.Get<Vector2>();
if (playerBehavior.playerIsAlive) {
this._moveInput = value.Get<Vector2>();
}
}
void OnJump()
{
OnJumpInput();
if (playerBehavior.playerIsAlive) {
OnJumpInput();
}
}
private void Update()