Add render system
This commit is contained in:
parent
af76df6a81
commit
29e7b5e499
8 changed files with 395 additions and 330 deletions
|
|
@ -1,27 +1,9 @@
|
|||
package ecs
|
||||
|
||||
Vec3 :: distinct [3]f32
|
||||
|
||||
Gravity :: struct {
|
||||
force: Vec3
|
||||
}
|
||||
|
||||
RigidBody :: struct {
|
||||
velocity: Vec3,
|
||||
acceleration: Vec3,
|
||||
}
|
||||
|
||||
Transform :: struct {
|
||||
position: Vec3,
|
||||
rotation: Vec3,
|
||||
scale: Vec3,
|
||||
}
|
||||
|
||||
PhysicsSystem :: struct {
|
||||
using base: SystemBase,
|
||||
}
|
||||
|
||||
|
||||
physics_system_update :: proc(physics_system: ^PhysicsSystem, coordinator: ^Coordinator, dt: f32) {
|
||||
for entity in physics_system.entities {
|
||||
rigid_body := coordinator_get_component(RigidBody, coordinator, entity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue