private void PrepareSpawner() { if (!m_spawner) { m_spawner = GetComponent <RosemarySpawner>(); if (!m_spawner) { Debug.LogError("Spawner is null", this); } } }
private void FindDeathEffectSpawner() { if (!m_deathEffectSpawner) { m_deathEffectSpawner = FindObjectsOfType <RosemarySpawner>() .FirstOrDefault(s => s.name == deathEffectSpawnerName); if (!m_deathEffectSpawner) { Debug.LogError($"Death Effect Spawner with name \"{deathEffectSpawnerName}\" not found.", this); } } }
private void PrepareSpawner() { if (!m_spawner) { m_spawner = GetComponentInParent <RosemarySpawner>(); if (!m_spawner) { Debug.LogError("Spawn is not a child of a Spawner", this); } else { isInitialised = true; m_spawner.OnSpawnAwake(this); } } }