public void RecieveDamage( Hazard source ) { if ( source.element != GetElement ) Kill(); else { // Some kind of feedback that player got by without damage // particles or sound or whatever. source.AddToScore(); Destroy( source.gameObject ); } }
public void RecieveDamage(Hazard source) { if (source.element != GetElement) { Kill(); } else { // Some kind of feedback that player got by without damage // particles or sound or whatever. source.AddToScore(); Destroy(source.gameObject); } }