bevy/examples/2d
Edgar Geier f18f28874a
Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097)
# Objective

- Better consistency with `add_systems`.
- Deprecating `add_plugin` in favor of a more powerful `add_plugins`.
- Allow passing `Plugin` to `add_plugins`.
- Allow passing tuples to `add_plugins`.

## Solution

- `App::add_plugins` now takes an `impl Plugins` parameter.
- `App::add_plugin` is deprecated.
- `Plugins` is a new sealed trait that is only implemented for `Plugin`,
`PluginGroup` and tuples over `Plugins`.
- All examples, benchmarks and tests are changed to use `add_plugins`,
using tuples where appropriate.

---

## Changelog

### Changed

- `App::add_plugins` now accepts all types that implement `Plugins`,
which is implemented for:
  - Types that implement `Plugin`.
  - Types that implement `PluginGroup`.
  - Tuples (up to 16 elements) over types that implement `Plugins`.
- Deprecated `App::add_plugin` in favor of `App::add_plugins`.

## Migration Guide

- Replace `app.add_plugin(plugin)` calls with `app.add_plugins(plugin)`.

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2023-06-21 20:51:03 +00:00
..
2d_gizmos.rs Instanced line rendering for gizmos based on bevy_polyline (#8427) 2023-06-13 06:49:47 +00:00
2d_shapes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bloom_2d.rs add a default font (#8445) 2023-04-21 22:30:18 +00:00
custom_gltf_vertex_attribute.rs Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
mesh2d.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
mesh2d_manual.rs Allow tuples and single plugins in add_plugins, deprecate add_plugin (#8097) 2023-06-21 20:51:03 +00:00
mesh2d_vertex_color_texture.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
move_sprite.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
pixel_perfect.rs Explain why default_nearest is used in pixel_perfect example (#8370) 2023-04-13 17:58:06 +00:00
rotation.rs Non-breaking change* from UK spellings to US (#8291) 2023-04-08 16:22:46 +00:00
sprite.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
sprite_flipping.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
sprite_sheet.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
text2d.rs Changed spelling linebreak_behaviour to linebreak_behavior (#8285) 2023-04-05 21:25:53 +00:00
texture_atlas.rs Remove OnUpdate system set (#8260) 2023-04-04 00:49:41 +00:00
transparency_2d.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00