Hello, I have problem with class design.
I have core class for my game objects. While drawing I need to retrieve position from the object. Unfortunately object is seen as it's base type so the position is not retrieved from derived class but from it's parent. Defining field as virtual would fix my problem, but it's impossible :(. How can I design class schema to avoid this problem?
Simple example of what's going on:
class BaseClass { public Vector2 position = new Vector2(){X=0,Y=0}; }
class Class:BaseClass { public new Vector2 position = new Vector2(){X=10,Y=10}; }
BaseClass c = new Class();
// c.position.X is now 0