I couldn't understand my own code)))

Hi all, I’m new to monogame as well as C #. There was a problem, I created abstract class Element and overridde all methods in non-abstract class Sand. Initially Sand is a child of Element. Now if I call one of the Element method from another basic class, does it call Element.method or Sand.method? Also all my redefined methods doesn’t work, but it should to Sorry for my poor Eng!
image This is my abstract method.
image There i’ve override it
image There i called it in basic class. _worldMatrix is array of Element class. As you can see, it should draw some sprites, but i doesn’t work

Put a breakpoint in visual studio in your draw method and see if the program reaches it first of all.

I can read the code, it looks ok to me… Maybe the problem is in what you did not post. Like mentioned above, insert break-point in your override-draw, to make sure your _worldmatrix[1,0] member IS IN FACT sand, or whatever its supposed to be… If you can show your code REACHING the desired line, and nothing happens, we can take it from there :slight_smile:

Yeah that code looks fine, if _worldMatrix[1, 0] is a sand object it will call the overridden method.
If you want to push your project to github or something similar can glance through the rest of the code and se if any bugs jump out :+1: