Decouple gun from player
This commit is contained in:
parent
782e446c46
commit
9c774fdccf
4 changed files with 81 additions and 67 deletions
|
|
@ -3,9 +3,10 @@ use bevy::prelude::*;
|
|||
use crate::GameState;
|
||||
|
||||
pub mod enemy;
|
||||
pub mod gun;
|
||||
pub mod player;
|
||||
|
||||
#[derive(Component)]
|
||||
#[derive(Component, Copy, Clone)]
|
||||
pub enum Factions {
|
||||
PlayerFaction,
|
||||
EnemyFaction,
|
||||
|
|
@ -36,7 +37,8 @@ impl Plugin for ShipsPlugin {
|
|||
FixedUpdate,
|
||||
(
|
||||
player::player_movement_system.run_if(in_state(GameState::Game)),
|
||||
player::player_shooting_system,
|
||||
player::player_shooting_system.run_if(in_state(GameState::Game)),
|
||||
gun::gun_shooting_system.run_if(in_state(GameState::Game)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue