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)
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;
boneIds[i] = bones[i].boneId;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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