mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-10-11 18:19:11 +00:00
Aquaphobia spirits
This commit is contained in:
11 files changed
+1332
-33
No files matched your search
@@ -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