banner
[面包]MrTwoC

[面包]MrTwoC

你好,欢迎来到这个基于区块链的个人博客 名字:面包 / MrTwoc 爱好:跑步(5/10KM)、咖啡、游戏(MMORPG、FPS、Minecraft、Warframe) 兴趣方向:Rust、区块链、网络安全、量子信息(量子计算)、游戏设计与开发
bilibili
steam
email
github

[0x04]Bevy-ECS

https://bevyengine.org/learn/quick-start/getting-started/ecs/
All application logic in Bevy uses the Entity-Component-System paradigm, commonly abbreviated as ECS. ECS is a software pattern that involves breaking a program into entities, components, and systems. An entity is a unique "thing" that is assigned a group of components, which are then processed using systems.
For example, one entity may have a Position and Velocity component, while another entity may have a Position and UI component. Systems are the logic that runs on a specific set of component types. You might have a system that runs on all entities with a Position and Velocity component. ECS encourages clean, decoupled design by forcing you to break down your application data and logic into its core components. It also helps speed up code by optimizing memory access patterns and simplifying parallelism.

Try writing a System yourself

fn hello_world(){
    println!("helloWorld");
}
fn main() {
    App::new()
    .add_systems(Update, hello_world)
    .run();
}

Then run it

cargo run

image.png

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.