I have my main stage, and I have two objects (blocks), these two objects both extend from the “Block” class. The “Block” class is NOT extended from the Main Class.
I would LIKE to call a function, in either the “Block” class or in it’s subclasses, from the Main Stage Class. The functions will do slightly different things depending which object you are calling the function (Added different things, and different number of things to an array). What is the best way to implement this?
I am sorry I have no code to show right now, I am just attempting to sit down and do it now but feel quite lost.
Not quite sure I follow so I’m going to assume you mean this.
You have a class called Block
You create two of these Block’s and store them, possibly in an array from your base class.
Now in your block class
Now back in your main class
Hopefully this is what you’re after