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