It "works"

It's a buggy mess but it's a working buggy mess
This commit is contained in:
Pasha Bibko
2025-04-03 13:06:55 +01:00
parent d0de96ae0a
commit 653876e56e
8 changed files with 95 additions and 15 deletions

View File

@@ -82,6 +82,9 @@ public partial class PlayerMovement : MonoBehaviour
//
Vector3 m_WallNormal;
//
int m_PortalFrameCounter = 0;
// Only instance of the player
static PlayerMovement s_Instance;
@@ -89,6 +92,8 @@ public partial class PlayerMovement : MonoBehaviour
public static Vector3 Pos() => s_Instance.transform.position;
public static void SetPos(Vector3 v) => s_Instance.transform.parent.position = v;
public static GameObject Object() => s_Instance.gameObject;
public static bool CanGoThroughPortals() => s_Instance.m_PortalFrameCounter == 0;
public static PlayerMovement Instance() => s_Instance;
// Start is called before the first frame update
private void Start()