refactor states to handle update logic

This commit is contained in:
AdamWhitehurst
2019-12-26 06:43:59 -08:00
parent c2ceabea0e
commit 8e0317e03d
29 changed files with 1525 additions and 1393 deletions

View File

@ -1,20 +1,13 @@
use super::movement::ROLL_DURATION;
use crate::{
comp::{
self, item, projectile, ActionState, ActionState::*, Body, CharacterState, ControlEvent,
Controller, ControllerInputs, HealthChange, HealthSource, ItemKind, Mounting,
MovementState, MovementState::*, PhysicsState, Projectile, Stats, Vel,
},
event::{Emitter, EventBus, LocalEvent, ServerEvent},
comp::{ControlEvent, Controller},
event::{EventBus, LocalEvent, ServerEvent},
state::DeltaTime,
};
use specs::{
saveload::{Marker, MarkerAllocator},
Entities, Entity, Join, Read, ReadStorage, System, WriteStorage,
Entities, Join, Read, ReadStorage, System, WriteStorage,
};
use sphynx::{Uid, UidAllocator};
use std::time::Duration;
use vek::*;
/// # Controller System
/// #### Responsible for validating and updating controller inputs