Fixed small visual bugs
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user