mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Move agent data into structs
This commit is contained in:
parent
0c25896b2c
commit
018d51b1a0
@ -1,5 +1,6 @@
|
||||
use crate::{
|
||||
comp::{humanoid, quadruped_low, quadruped_medium, quadruped_small, Body},
|
||||
path::Chaser,
|
||||
rtsim::RtSimController,
|
||||
uid::Uid,
|
||||
};
|
||||
@ -186,8 +187,8 @@ pub struct Target {
|
||||
pub struct Agent {
|
||||
pub rtsim_controller: RtSimController,
|
||||
pub patrol_origin: Option<Vec3<f32>>,
|
||||
pub activity: Activity,
|
||||
pub target: Option<Target>,
|
||||
pub chaser: Chaser,
|
||||
/// Does the agent talk when e.g. hit by the player
|
||||
// TODO move speech patterns into a Behavior component
|
||||
pub can_speak: bool,
|
||||
@ -225,19 +226,3 @@ impl Agent {
|
||||
impl Component for Agent {
|
||||
type Storage = IdvStorage<Self>;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Activity {
|
||||
Idle,
|
||||
IdleTree,
|
||||
Interact,
|
||||
Flee,
|
||||
Follow,
|
||||
HostileTree,
|
||||
Attack,
|
||||
ChooseTarget,
|
||||
}
|
||||
|
||||
impl Default for Activity {
|
||||
fn default() -> Self { Self::IdleTree }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user