public void DrawScene(SceneInstance scene) { InstanceCollection instances = scene.Instances; //instances.SortByDepth(); //draw sprites foreach (Instance inst in instances) { DrawSprite(inst.Sprite, inst.Position, inst.ImageAngle, inst.ScaleX, inst.ScaleY, inst.ImageIndex); } }
public void DrawScene(SceneInstance scene) { InstanceCollection instances = scene.Instances; //instances.SortByDepth(); //draw sprites foreach (Instance inst in instances) { DrawSprite(inst.Sprite, inst.Position, inst.ImageAngle, inst.ScaleX, inst.ScaleY, inst.ImageIndex, inst.Offset.X, inst.Offset.Y, scene.ViewPosition.X - scene.ViewOrigin.X, scene.ViewPosition.Y - scene.ViewOrigin.Y); if (scene.UsesPhysics && DrawCollisionBounds) { DrawCollision(inst, scene.ViewPosition.X - scene.ViewOrigin.X, scene.ViewPosition.Y - scene.ViewOrigin.Y); } } }