This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct PipeOrBreak<COut>(PhantomData<COut>); | |
impl<ACOut, A, B> Combine<A, B> for PipeOrBreak<ACOut> | |
where | |
A: System<Out = ControlFlow<(), ACOut>>, | |
B: System<In = ACOut>, | |
{ | |
type In = A::In; | |
type Out = (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::sync::Arc; | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct EntityTreeNode { | |
pub source: Entity, | |
pub destination: Entity, | |
pub children: Vec<EntityTreeNode>, | |
} | |
impl EntityTreeNode { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bevy version: 0.10 | |
use bevy::{prelude::*, ecs::system::Command}; | |
// Copy all components from an entity to another. | |
// Using an entity with no components as the destination creates a copy of the source entity. | |
// panics if | |
// - the components are not registered in the type registry, | |
// - the world does not have a type registry | |
// - the source or destination entity do not exist | |
pub fn clone_entity_components( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cargo.toml: | |
// | |
// [dependencies.windows] | |
// version = "0.48.0" | |
// features = [ | |
// "Win32_UI_WindowsAndMessaging", | |
// "Win32_UI_Input", | |
// "Win32_UI_Input_KeyboardAndMouse", | |
// "Win32_Foundation", | |
// "Win32_System_Threading", |