Пример #1
0
        public GameObject(string spriteName, Vector2 initialPosition, Vector2 size)
        {
            graphicsChild = new GraphicsObject(this, spriteName);
            physicsChild = new PhysicsObject(this, initialPosition, size);

            worldPosition = initialPosition;
            worldScale = size;
        }
Пример #2
0
 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);
 }
Пример #3
0
 public static void RegisterGraphicsObject(GraphicsObject obj)
 {
     string spriteName = obj.TextureString;
     RegisterSpriteByName(spriteName);
 }