Cascading a property for a game I'm trying to write a simple game. I have an Entity object, that has a list of Sprite objects. Each Sprite has a position property where it is drawn on the screen. Sometimes, an entity can contain a lot of Sprites in which case it is much easier to set the position property on the parent Entity.

Here's a simplified example of creating an Entity with a list of Sprites:

var player = new Entity( new List&lt;Sprite&gt;
                         {
                             new Sprite( "characters/walkcycle/body", new Vector2( 128, 128 ) ),
                             new Sprite( "characters/walkcycle/halo", new Vector2( 128, 120 ),
                             new Sprite( "characters/walkcycle/shirt", new Vector2( 128, 128 ) ),
                             new Sprite( "characters/walkcycle/pants", new Vector2( 128, 128 ) ),
                             new Sprite( "characters/walkcycle/shoes", new Vector2( 128, 128 ) )
                         } );


Most of the Sprites have the same position, so I do this instead:

var player = new Entity( new Vector2( 128, 128 ),
                         new List&lt;Sprite&gt;
                         {
                             new Sprite( "characters/walkcycle/body" ),
                             new Sprite( "characters/walkcycle/halo", new Vector2( 128, 120 ),
                             new Sprite( "characters/walkcycle/shirt" ),
                             new Sprite( "characters/walkcycle/pants" ),
                             new Sprite( "characters/walkcycle/shoes" )
                         } );


Notice the halo sprite is in a different position. Later in the code, I call the Load method on Entity, which passes its position property on to the children Sprites:

public class Entity
{
    // fields, constructor, properties ...

    public void Load()
    {
        foreach ( var sprite in this.sprites )
        {
            sprite.Load( this.position );
        }
    }
}


The Load method on Sprite will set its own position property to the value passed in if it doesn't already have one:

public class Sprite
{
    // fields, constructor, properties ...

    public void Load( Vector2 position )
    {
        if ( this.position == Vector2.Zero &amp;&amp; position != Vector2.Zero )
        {
            this.position = position;
        }
    }
}


Is there a better way to do this? It smells a little to me.
Another approach would be to make the positions of sprites relative to the position of the entity. That way, the default of zero comes up naturally and when you move an entity, all of its sprites are automatically moved too.

One more advantage is that this means position zero now becomes a valid one.