@nivrig wrote:
I'm curious why Transform2D is restricted to nesting only objects of the same type?
For example, the below is not possible because M.Ex.Sprite extends
Transform2D<Sprite>
and so can't have this Player object set as its Parent. This means I'd have to explicitly code mirroring player transform updates into any child sprites.Or am I missing something?
public class Entity : Transform2D<Entity> { ... } public class Player : Entity { private Sprite sprite; public void OnEntry() { sprite.Parent = this; } }
Posts: 1
Participants: 1