pub struct DebugSystems;Expand description
调试系统
提供调试和开发时有用的系统。
Implementations§
Source§impl DebugSystems
impl DebugSystems
Sourcepub fn entity_count_system(query: Query<'_, '_, Entity>)
pub fn entity_count_system(query: Query<'_, '_, Entity>)
实体计数系统
定期打印当前世界中的实体数量。
§示例
use anvilkit_ecs::prelude::*;
use anvilkit_ecs::schedule::AnvilKitSchedule;
let mut app = App::new();
app.add_systems(AnvilKitSchedule::Update, DebugSystems::entity_count_system);Sourcepub fn named_entities_system(query: Query<'_, '_, (Entity, &Name)>)
pub fn named_entities_system(query: Query<'_, '_, (Entity, &Name)>)
名称实体列表系统
打印所有带名称的实体。
§示例
use anvilkit_ecs::prelude::*;
use anvilkit_ecs::schedule::AnvilKitSchedule;
let mut app = App::new();
app.add_systems(AnvilKitSchedule::Update, DebugSystems::named_entities_system);Sourcepub fn transform_debug_system(
query: Query<'_, '_, (Entity, &Transform), With<Name>>,
)
pub fn transform_debug_system( query: Query<'_, '_, (Entity, &Transform), With<Name>>, )
变换调试系统
打印所有实体的变换信息。
§示例
use anvilkit_ecs::prelude::*;
use anvilkit_ecs::schedule::AnvilKitSchedule;
let mut app = App::new();
app.add_systems(AnvilKitSchedule::Update, DebugSystems::transform_debug_system);Sourcepub fn performance_monitor_system(time: Res<'_, Time>)
pub fn performance_monitor_system(time: Res<'_, Time>)
性能监控系统
监控和报告系统性能信息。
§示例
use anvilkit_ecs::prelude::*;
use anvilkit_ecs::schedule::AnvilKitSchedule;
let mut app = App::new();
app.add_systems(AnvilKitSchedule::Update, DebugSystems::performance_monitor_system);Auto Trait Implementations§
impl Freeze for DebugSystems
impl RefUnwindSafe for DebugSystems
impl Send for DebugSystems
impl Sync for DebugSystems
impl Unpin for DebugSystems
impl UnsafeUnpin for DebugSystems
impl UnwindSafe for DebugSystems
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.