generated from 2ndbeam/bevy-template
ui: Inventory item rotation
- Fixed rotated item position
This commit is contained in:
parent
9a09b4da96
commit
beacc28ace
2 changed files with 48 additions and 29 deletions
|
|
@ -83,13 +83,17 @@ fn setup_global(mut commands: Commands) {
|
|||
|
||||
impl Plugin for ExpeditionPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_plugins(input::InputAssetPlugin::<InputAction>::default())
|
||||
app.add_plugins((
|
||||
input::InputAssetPlugin::<InputAction>::default(),
|
||||
input::InputAssetPlugin::<UiAction>::default(),
|
||||
))
|
||||
.init_state::<GameState>()
|
||||
.insert_resource(ui::WindowSize::default())
|
||||
.add_systems(Startup, (player::setup_player, setup_global))
|
||||
.add_systems(Update, (
|
||||
player::handle_input,
|
||||
ui::update_window_size,
|
||||
ui::handle_input,
|
||||
insert_entity_name,
|
||||
))
|
||||
.add_systems(OnEnter(GameState::Inventory), inventory::ui::setup_ui_inventory)
|
||||
|
|
@ -99,6 +103,7 @@ impl Plugin for ExpeditionPlugin {
|
|||
.register_type::<inventory::item::Item>()
|
||||
.register_type::<inventory::ui::UiItem>()
|
||||
.register_type::<inventory::ui::UiInventorySlot>()
|
||||
.register_type::<inventory::ui::UiInventory>();
|
||||
.register_type::<inventory::ui::UiInventory>()
|
||||
.add_observer(inventory::ui::on_ui_rotate);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue