public GameObject(string spriteName, Vector2 initialPosition, Vector2 size) { graphicsChild = new GraphicsObject(this, spriteName); physicsChild = new PhysicsObject(this, initialPosition, size); worldPosition = initialPosition; worldScale = size; }
public static void EnqueueGraphicsObject(GraphicsObject sprite, Matrix worldTransform) { if (!renderQueue.ContainsKey(sprite.TextureString)) { renderQueue.Add(sprite.TextureString, new List<Matrix>()); } renderQueue[sprite.TextureString].Add(worldTransform); }
public static void RegisterGraphicsObject(GraphicsObject obj) { string spriteName = obj.TextureString; RegisterSpriteByName(spriteName); }