mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-11-11 04:22:40 +00:00
Benji's Scene is basically just a bunch of animations lol
This commit is contained in:
19 files changed
+895
-37
No files matched your search
@@ -10,7 +10,7 @@ public class Movement : MonoBehaviour
|
||||
[Range(0, .3f)][SerializeField] private float m_MovementSmoothing = .05f; // How much to smooth out the movement
|
||||
[SerializeField] private bool m_AirControl = false; // Whether or not a player can steer while jumping;
|
||||
/** @MindfulMinun -- This is for the water level, if the player is swimming just let them double jump as many times as they want. */
|
||||
[SerializeField] private bool swimming = false; // Whether or not a player the player is in a swimming level
|
||||
[SerializeField] public bool swimming = false; // Whether or not a player the player is in a swimming level
|
||||
[SerializeField] private LayerMask m_WhatIsGround; // A mask determining what is ground to the character
|
||||
[SerializeField] private Transform m_GroundCheck; // A position marking where to check if the player is grounded.
|
||||
[SerializeField] private Transform m_CeilingCheck; // A position marking where to check for ceilings
|
||||
|
||||
@@ -40,10 +40,17 @@ public class PlayerMovement : MonoBehaviour {
|
||||
if (Movement.pause) {
|
||||
animator.SetFloat("Horizontal", 0);
|
||||
} else if (animator != null) {
|
||||
if(controller.m_Grounded) {
|
||||
if (controller.m_Grounded) {
|
||||
animator.SetFloat("Horizontal", Input.GetAxis("Horizontal"));
|
||||
}
|
||||
animator.SetBool("Airborne", !controller.m_Grounded);
|
||||
|
||||
if (controller.swimming) {
|
||||
animator.SetBool("Airborne", false);
|
||||
animator.SetFloat("Horizontal", Input.GetAxis("Horizontal"));
|
||||
} else {
|
||||
animator.SetBool("Airborne", !controller.m_Grounded);
|
||||
}
|
||||
|
||||
if (healthBarAnimator != null) {
|
||||
healthBarAnimator.SetInteger("Health", health.currentHealth);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user