Exemple #1
0
 private void PrepareSpawner()
 {
     if (!m_spawner)
     {
         m_spawner = GetComponent <RosemarySpawner>();
         if (!m_spawner)
         {
             Debug.LogError("Spawner is null", this);
         }
     }
 }
Exemple #2
0
 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);
         }
     }
 }
Exemple #3
0
 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);
         }
     }
 }