mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
Aquaphobia spirits
This commit is contained in:
11 files changed
+1332
-33
No files matched your search
@@ -1,20 +1,13 @@
|
||||
//WIP
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Enemy : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
public class Enemy : MonoBehaviour {
|
||||
void Start() {
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
void Update() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ public class Movement : MonoBehaviour
|
||||
[Range(0, 1)][SerializeField] private float m_CrouchSpeed = .36f; // Amount of maxSpeed applied to crouching movement. 1 = 100%
|
||||
[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] 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
|
||||
@@ -138,7 +140,7 @@ public class Movement : MonoBehaviour
|
||||
m_Grounded = false;
|
||||
m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce));
|
||||
dj = false;
|
||||
}else if (jump && dj == false){
|
||||
}else if (jump && (dj == false || swimming == true)){
|
||||
m_Grounded = false;
|
||||
m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce));
|
||||
dj = true;
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class PlayerMovement : MonoBehaviour
|
||||
{
|
||||
public Movement controller;
|
||||
public Animator animator;
|
||||
public Health health;
|
||||
|
||||
public float runSpeed = 40f;
|
||||
float horizontalMove = 0f;
|
||||
bool jump = false;
|
||||
bool crouch = false;
|
||||
|
||||
void Start() {
|
||||
if (health != null) {
|
||||
health.OnHit.AddListener(OnHit);
|
||||
health.OnDead.AddListener(OnDead);
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update() {
|
||||
horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;
|
||||
@@ -60,4 +70,12 @@ public class PlayerMovement : MonoBehaviour
|
||||
{
|
||||
Debug.Log("Trigger Detected!");
|
||||
}*/
|
||||
|
||||
void OnHit() {
|
||||
Debug.Log("Hit Detected!");
|
||||
}
|
||||
|
||||
void OnDead() {
|
||||
Debug.Log("Fuck, I'm dead!");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user