added debug script to disable enemies

This commit is contained in:
2025-04-10 10:28:46 +02:00
parent e3dae5b6c6
commit 5d2e128ae6
3 changed files with 100 additions and 0 deletions

View File

@@ -31,6 +31,10 @@ namespace Beyond
public override void Awake()
{
#if ENEMIES_DISABLED && UNITY_EDITOR
enabled = false;
return;
#endif
base.Awake();
//m_spawned = false;
m_spawnData = new SaveData();
@@ -54,6 +58,7 @@ namespace Beyond
public override void Start()
{
base.Start();
if (Player.Instance != null)
m_distanceFrom = Player.Instance.transform;
@@ -111,6 +116,7 @@ namespace Beyond
{
if (m_prefab == null)
return;
Vector3 pos;
const float RAY_OFFSET = 30f;
const float Y_OFFSET = .1f;