diff --git a/src/chat.rs b/src/chat.rs index a8f0c9e..2141bf8 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1,7 +1,7 @@ extern crate yaml_rust; use bevy::prelude::*; use yaml_rust::{Yaml, YamlLoader}; -use crate::{audio}; +use crate::{audio, world}; pub const CHATS: &[&str] = &[ include_str!("chats/serenity.yaml"), @@ -22,6 +22,13 @@ impl Plugin for ChatPlugin { } } +#[derive(Component)] +pub struct Chat { + pub id: u32, + pub position: u32, + pub timer: f64, +} + #[derive(Resource)] pub struct ChatDB(Vec); impl ChatDB { @@ -68,17 +75,29 @@ pub fn load_chats(mut chatdb: ResMut) { } pub fn handle_new_conversations( - //mut commands: Commands, + mut commands: Commands, mut er_conv: EventReader, mut ew_sfx: EventWriter, chatdb: Res, - //time: Res