Added namespaces

This commit is contained in:
Pascal Serrarens 2024-01-16 11:57:58 +01:00
parent 83ab3a6dbe
commit ea9deb82fb
9 changed files with 186 additions and 159 deletions

View File

@ -236,7 +236,7 @@ namespace Passer.Humanoid {
if (bones[i] == null || bones[i].bone == null || bones[i].bone.transform == null) if (bones[i] == null || bones[i].bone == null || bones[i].bone.transform == null)
continue; continue;
Handles.FreeMoveHandle(bones[i].bone.transform.position, bones[i].bone.transform.rotation, 0.002F, Vector3.zero, DotHandleCapSaveID); var fmh_239_74_638409995538839071 = bones[i].bone.transform.rotation; Handles.FreeMoveHandle(bones[i].bone.transform.position, 0.002F, Vector3.zero, DotHandleCapSaveID);
controlIds[i] = lastControlID; controlIds[i] = lastControlID;
boneIds[i] = bones[i].boneId; boneIds[i] = bones[i].boneId;
} }

View File

@ -1,6 +1,8 @@
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
namespace Passer {
public class FlashLight : MonoBehaviour { public class FlashLight : MonoBehaviour {
protected Light thisLight; protected Light thisLight;
@ -31,3 +33,4 @@ public class FlashLight : MonoBehaviour {
light.enabled = false; light.enabled = false;
} }
} }
}

View File

@ -1,8 +1,12 @@
using UnityEngine; using UnityEngine;
namespace Passer {
public class Hit : MonoBehaviour { public class Hit : MonoBehaviour {
public void HitMe() { public void HitMe() {
Debug.Log("AU!"); Debug.Log("AU!");
} }
} }
}

View File

@ -1,5 +1,7 @@
using UnityEngine; using UnityEngine;
namespace Passer {
public class Redrop : MonoBehaviour { public class Redrop : MonoBehaviour {
// Script which is to be replaced by CollisionEventHandler // Script which is to be replaced by CollisionEventHandler
@ -37,3 +39,5 @@ public class Redrop : MonoBehaviour {
} }
} }
} }
}

View File

@ -4,6 +4,7 @@ using UnityEngine.SceneManagement;
using UnityEditor; using UnityEditor;
using UnityEditor.SceneManagement; using UnityEditor.SceneManagement;
namespace Passer {
[InitializeOnLoad] [InitializeOnLoad]
public class SceneLoader { public class SceneLoader {
@ -14,21 +15,31 @@ public class SceneLoader {
private static void SceneOpened(Scene scene, OpenSceneMode mode) { private static void SceneOpened(Scene scene, OpenSceneMode mode) {
if ((scene.name == "ObjectTable Pawn" || if ((scene.name == "ObjectTable Pawn" ||
scene.name == "ObjectTable Pawn VR" || scene.name == "ObjectTable Pawn VR" ||
scene.name == "ObjectTable Humanoid") && scene.name == "ObjectTable Humanoid")
EditorSceneManager.loadedSceneCount == 1) { #if UNITY_2022_2_OR_NEWER
&& UnityEngine.SceneManagement.SceneManager.loadedSceneCount == 1
#else
&& EditorSceneManager.loadedSceneCount == 1
#endif
) {
//Debug.Log("Additive opening ObjectTable scene"); //Debug.Log("Additive opening ObjectTable scene");
EditorSceneManager.OpenScene("Assets/PawnControl/Demo/Environments/ObjectTable.unity", OpenSceneMode.Additive); EditorSceneManager.OpenScene("Assets/PawnControl/Demo/Environments/ObjectTable.unity", OpenSceneMode.Additive);
} }
else if ((scene.name == "ShootingRange Pawn" || else if ((scene.name == "ShootingRange Pawn" ||
scene.name == "ShootingRange Pawn VR" || scene.name == "ShootingRange Pawn VR" ||
scene.name == "ShootingRange Humanoid") && scene.name == "ShootingRange Humanoid")
EditorSceneManager.loadedSceneCount == 1) { #if UNITY_2022_2_OR_NEWER
&& UnityEngine.SceneManagement.SceneManager.loadedSceneCount == 1
#else
&& EditorSceneManager.loadedSceneCount == 1
#endif
) {
//Debug.Log("Additive opening ShootingRange scene"); //Debug.Log("Additive opening ShootingRange scene");
EditorSceneManager.OpenScene("Assets/PawnControl/Demo/Environments/ShootingRange.unity", OpenSceneMode.Additive); EditorSceneManager.OpenScene("Assets/PawnControl/Demo/Environments/ShootingRange.unity", OpenSceneMode.Additive);
} }
} }
} }
}
#endif #endif

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
//namespace Passer { namespace Passer {
public static class RigidbodyTools { public static class RigidbodyTools {
public static void DestroyGameObject(this Rigidbody rigidbody) { public static void DestroyGameObject(this Rigidbody rigidbody) {
@ -8,4 +8,4 @@
} }
} }
//} }

View File

@ -1,7 +1,7 @@
using UnityEngine; using UnityEngine;
using System.Collections; using System.Collections;
using Passer; namespace Passer {
public class ControllerDebugger : MonoBehaviour { public class ControllerDebugger : MonoBehaviour {
@ -64,3 +64,5 @@ public class ControllerDebugger : MonoBehaviour {
sideDebugger.option = controllerSide.option; sideDebugger.option = controllerSide.option;
} }
} }
}

View File

@ -1,18 +1,17 @@
using System.Collections; using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
public class ShowVisitorName : MonoBehaviour namespace Passer {
{
public class ShowVisitorName : MonoBehaviour {
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start() {
{
} }
// Update is called once per frame // Update is called once per frame
void Update() void Update() {
{
} }
} }
}

View File

@ -1,8 +1,12 @@
using UnityEngine; using UnityEngine;
namespace Passer {
public class ToggleActive : MonoBehaviour { public class ToggleActive : MonoBehaviour {
// Temporary helper script to implement toggling the gameobject active state // Temporary helper script to implement toggling the gameobject active state
public void Toggle() { public void Toggle() {
this.gameObject.SetActive(!this.gameObject.activeSelf); this.gameObject.SetActive(!this.gameObject.activeSelf);
} }
} }
}