/// <summary> /// Remove and Destroy the Outer shell /// </summary> private void RemoveShell() { //remove any particles in the outer shell Particle[] pA = OuterShell.Particles; foreach (Particle particle in pA) { OuterShell.RemoveParticle(particle); AddExcessParticle(particle); } //destroy the shell object Destroy(shells.Pop().gameObject); SFX_Shell?.Invoke(); if (shells.Count == 0) { return; //don't need to calculate radius of nothing } }
/// <summary> /// try to Remove a specified electron from the atom /// </summary> /// <param name="particle">particle to remove</param> /// <returns>removal scucess</returns> public bool RemoveElectron(Particle particle) { //start the recursive call to remove from outer shell return(OuterShell.RemoveParticle(particle)); }