Quantcast
Channel: Questions in topic: "invokerepeating"
Viewing all articles
Browse latest Browse all 220

Stop inherited class's function through return;

$
0
0
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!

Viewing all articles
Browse latest Browse all 220

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>