Files
fracturepoint/.FROMOLDPROJECTPLEASEORGANISETHESEORDELETE/Scripts/PlayerScripts/WallCheck.cs
2026-01-21 10:56:26 -07:00

17 lines
353 B
C#

using UnityEngine;
public class WallCheck : MonoBehaviour
{
public bool touchingWall;
private void OnCollisionEnter2D(Collision2D other)
{
if (other.gameObject.layer == 6) touchingWall = true;
}
private void OnCollisionExit2D(Collision2D other)
{
if (other.gameObject.layer == 6) touchingWall = false;
}
}