Epilepsy sim

This commit is contained in:
2025-04-02 13:45:27 +01:00
parent 01242dd807
commit f76cc35c93
9 changed files with 2059 additions and 679 deletions

View File

@@ -82,9 +82,27 @@ public partial class PlayerMovement : MonoBehaviour
//
Vector3 m_WallNormal;
// Only instance of the player
static PlayerMovement s_Instance;
public static Transform Orientation() => s_Instance.m_Orientation;
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;
// Start is called before the first frame update
private void Start()
{
// Checks there is not more than one player at one time
if (s_Instance != null)
{
Debug.LogError("Multiple players");
return;
}
// Sets it to the instance
s_Instance = this;
// Stops the rigidbody from rotatating when we don't want it to
m_Body.freezeRotation = true;