Hi guys ! Big question over here. So basically i understand inheritance and OOP stuff in general but when it comes further more qquestions arise :wink:

I have Class A and this class implements some methods:

Class A:

public void Update
{
       TowerStateCheck()
}

    public void TowerStateCheck()
    {
        if (sth == sth)
        {
            CheckForEnemies();
            SetLerpRotationForEnemy();
            ShotEnemy();
        }
        else if (sthElse == sthElse)
        {
            //Do STH
        }
    }

Then is it possible to override SetLerpRotation and ShotEnemy in child class so they do different stuff , and methods SetLerpRotation , ShotEnemy will not be called in Class A (parent class).

If you dont uderstand what i meant to tell you i can explain it clearer. Any answers will be appreciated !!!

Class A:

 protected virtual void Update
 {
        TowerStateCheck()
 }


 public virtual void TowerStateCheck()
 {
     if (sth == sth)
     {
         CheckForEnemies();
         SetLerpRotationForEnemy();
         ShotEnemy();
     }
     else if (sthElse == sthElse)
     {
         //Do STH
     }
 }

 public virtual void SetLerpRotationForEnemy()
 {
     Debug.Log("SetLerpRotationForEnemy in class A");
 }

 public virtual void ShotEnemy()
 {
     Debug.Log("ShotEnemyin class A");
 }

Class B:

 protected override void Update
 {
        base.Update();
 }


 public override void TowerStateCheck()
 {
     if (sth == sth)
     {
         CheckForEnemies();
     }
     else if (sthElse == sthElse)
     {
         //Do STH
     }
 }

 public override void SetLerpRotationForEnemy()
 {
     Debug.Log("SetLerpRotationForEnemy in class B");
 }

 public override void ShotEnemy()
 {
     Debug.Log("ShotEnemyin class B");
 }