Hi, thanks in advance.
I have a base class with a function similar to
public virtual void Function()
{
if (boolean)
{
return;
}
}
I have a separate class with the function:
public override void Function()
{
base.Function();
Debug.Log("This shouldn't display?");
}
Since I have a couple of classes that inherit from the base class, I would like the baseclass to handle whether that code should run or not. The reason I can't do an
if(boolean) then Function();
is because Function() get's called by an InvokeRepeating and I'm trying to pause while the boolean is true.
Any help is appreciated!
↧