public void DestroyElement() { if (m_RemoveEffect != null) { GameObject effect = (GameObject)Instantiate(m_RemoveEffect, transform.position, transform.rotation); DestroyEffect de = effect.GetComponent <DestroyEffect>(); de.SetRescue(m_Species != null); } m_InfoBar.AddMaterial(1); DestroyObject(gameObject); m_BG.SetElementByCoord(m_TargetCoord, null); if (m_SkillBt != null) { m_SkillBt.AddAmount(0.2f); } if (m_Species != null) { SpeciesInfo si = m_Species.GetComponent <SpeciesInfo>(); si.SpeciesRescued(); m_InfoBar.AddDNANum(1); } }