Aquaphobia spirits

This commit is contained in:
MindfulMinun committed 2022-02-25 06:49:01 -06:00
1 parent ee5e646f97
commit 25e34ae059
11 files changed
+1332 -33

No files matched your search

+3 -10
View File
@@ -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() {
}
}
+3 -1
View File
@@ -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;
+18
View File
@@ -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!");
}
}