Quick Question About Overriding in C#

Hello,

i have two classes, living thing and player, player inherits from living thing. In living thing i have an update loop that checks if the health is <= 0, if this is true it calls the method in living thing called Kill(). However i want to change the functionality so that in the PLayer class when Kill is called in living thing it calls the kill method that is in the player class. What would be the best way to do this?

public class LivingThing : MonoBehaviour {
	public bool invinsible = false;
	public float health = 10;

	public void Update () {
		if(!invinsible && health<=0)
			Kill();
	}

	public void Kill(){
		Destroy(gameObject);
	}
}

public class PLayer: LivingThing {
	
	public void Kill(){
		gameObject.renderer.enabled = false;
	}

You would define it in the LivingThing class as:

public virtual void Kill()
{
    Destroy(gameObject);
}

Then you would define it in Player as something like this:

public override void Kill()
{
    gameObject.renderer.enabled = false;
}

This would override the LivingThing’s Kill method and it would be called in the child class (Player). But if you also want to call it in the parent class as well, you would use:

base.Kill();

within the Player’s Kill method.

Edit:

So to call it in the Player class first and then finish by calling in the LivingThing class:

public override void Kill()
{
    gameObject.renderer.enabled = false;
    base.Kill();
}