Added project

This commit is contained in:
2023-06-11 00:35:07 +03:00
parent 5bfa765889
commit f06629200c
545 changed files with 44339 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
using UnityEngine;
public class GroundDetection : MonoBehaviour {
public bool isGrounded { get; private set; }
private void OnCollisionStay2D(Collision2D other) {
if (other.gameObject.CompareTag("Platform") || other.gameObject.CompareTag("Enemy")) {
isGrounded = true;
}
}
private void OnCollisionExit2D(Collision2D other) {
if (other.gameObject.CompareTag("Platform") || other.gameObject.CompareTag("Enemy")) {
isGrounded = false;
}
}
}