Rename character behavior sys

This commit is contained in:
Adam Whitehurst 2020-03-07 11:02:54 -08:00
parent b1d1299fe6
commit cb9e3859da
14 changed files with 17 additions and 15 deletions

View File

@ -1,7 +1,7 @@
use crate::{
comp::{Attacking, CharacterState, ItemKind::Tool, StateUpdate},
states::utils::*,
sys::character_state::JoinData,
sys::character_behavior::JoinData,
};
use std::{collections::VecDeque, time::Duration};

View File

@ -4,7 +4,7 @@ use crate::{
};
use std::{collections::VecDeque, time::Duration};
use vek::Vec2;
use crate::sys::character_state::JoinData;
use crate::sys::character_behavior::JoinData;
const BLOCK_ACCEL: f32 = 30.0;
const BLOCK_SPEED: f32 = 75.0;

View File

@ -5,7 +5,7 @@ use crate::{
ItemKind::Tool, MoveState::Run, StateUpdate, ToolData,
},
event::ServerEvent,
sys::character_state::JoinData,
sys::character_behavior::JoinData,
};
use std::time::Duration;
use vek::Vec3;

View File

@ -1,7 +1,7 @@
use crate::{
comp::{CharacterState, EnergySource, StateUpdate},
event::LocalEvent,
sys::{character_state::JoinData, phys::GRAVITY},
sys::{character_behavior::JoinData, phys::GRAVITY},
};
use std::collections::VecDeque;
use vek::{

View File

@ -1,7 +1,7 @@
use super::utils::*;
use crate::{
comp::{CharacterState, StateUpdate},
sys::character_state::JoinData,
sys::character_behavior::JoinData,
};
use std::{collections::VecDeque, time::Duration};

View File

@ -1,6 +1,6 @@
use crate::{
comp::{CharacterState, StateUpdate},
sys::character_state::JoinData,
sys::character_behavior::JoinData,
};
use std::collections::VecDeque;
use vek::{Vec2, Vec3};

View File

@ -1,5 +1,5 @@
use super::utils::*;
use crate::{comp::StateUpdate, sys::character_state::JoinData};
use crate::{comp::StateUpdate, sys::character_behavior::JoinData};
use std::collections::VecDeque;
pub fn behavior(data: &JoinData) -> StateUpdate {

View File

@ -1,6 +1,6 @@
use crate::{
comp::{CharacterState, StateUpdate},
sys::character_state::JoinData,
sys::character_behavior::JoinData,
};
use std::{collections::VecDeque, time::Duration};
use vek::Vec3;

View File

@ -1,7 +1,7 @@
use super::utils::*;
use crate::{
comp::{CharacterState, StateUpdate},
sys::character_state::JoinData,
sys::character_behavior::JoinData,
};
use std::collections::VecDeque;

View File

@ -1,6 +1,6 @@
use crate::{
comp::StateUpdate,
sys::{character_state::JoinData, phys::GRAVITY},
sys::{character_behavior::JoinData, phys::GRAVITY},
};
use std::time::Duration;
use vek::{Vec2, Vec3};

View File

@ -1,7 +1,7 @@
use crate::{
comp::{AbilityState, CharacterState, EnergySource, ItemKind::Tool, StateUpdate},
event::LocalEvent,
sys::{character_state::JoinData, phys::GRAVITY},
sys::{character_behavior::JoinData, phys::GRAVITY},
};
use std::time::Duration;
use vek::vec::{Vec2, Vec3};

View File

@ -1,5 +1,5 @@
use super::utils::*;
use crate::{comp::StateUpdate, sys::character_state::JoinData};
use crate::{comp::StateUpdate, sys::character_behavior::JoinData};
use std::collections::VecDeque;
pub fn behavior(ecs_data: &JoinData) -> StateUpdate {

View File

@ -1,5 +1,5 @@
pub mod agent;
pub mod character_state;
pub mod character_behavior;
mod combat;
pub mod controller;
mod mount;
@ -11,7 +11,7 @@ mod stats;
use specs::DispatcherBuilder;
// System names
pub const CHARACTER_STATE_SYS: &str = "character_state_sys";
pub const CHARACTER_BEHAVIOR_SYS: &str = "character_behavior_sys";
pub const COMBAT_SYS: &str = "combat_sys";
pub const AGENT_SYS: &str = "agent_sys";
pub const CONTROLLER_SYS: &str = "controller_sys";
@ -24,7 +24,9 @@ pub fn add_local_systems(dispatch_builder: &mut DispatcherBuilder) {
dispatch_builder.add(agent::Sys, AGENT_SYS, &[]);
dispatch_builder.add(mount::Sys, MOUNT_SYS, &[AGENT_SYS]);
dispatch_builder.add(controller::Sys, CONTROLLER_SYS, &[AGENT_SYS, MOUNT_SYS]);
dispatch_builder.add(character_state::Sys, CHARACTER_STATE_SYS, &[CONTROLLER_SYS]);
dispatch_builder.add(character_behavior::Sys, CHARACTER_BEHAVIOR_SYS, &[
CONTROLLER_SYS,
]);
dispatch_builder.add(stats::Sys, STATS_SYS, &[]);
dispatch_builder.add(phys::Sys, PHYS_SYS, &[CONTROLLER_SYS, MOUNT_SYS, STATS_SYS]);
dispatch_builder.add(projectile::Sys, PROJECTILE_SYS, &[PHYS_SYS]);