Fix physics engine
This commit is contained in:
parent
f5398d0847
commit
32b288c1df
1 changed files with 4 additions and 4 deletions
|
@ -1,14 +1,14 @@
|
||||||
(define-module (ces system tilemap-renderer)
|
(define-module (ces system physics-engine-2d)
|
||||||
#:pure
|
#:pure
|
||||||
#:use-module (scheme base)
|
#:use-module (scheme base)
|
||||||
#:use-module (math vector)
|
#:use-module (math vector)
|
||||||
#:use-module (ces system)
|
#:use-module (ces system)
|
||||||
#:use-module (ces component)
|
#:use-module (ces component)
|
||||||
#:use-module (ces entity)
|
#:use-module (ces entity)
|
||||||
#:export (create-physics-engine))
|
#:export (create-physics-engine-2d))
|
||||||
|
|
||||||
;(define desired-components '('imass 'position 'velocity 'acceleration))
|
;(define desired-components '('imass 'position 'velocity 'acceleration))
|
||||||
(define desired-components '('position 'velocity 'acceleration))
|
(define desired-components '('hitbox 'position 'velocity 'acceleration))
|
||||||
|
|
||||||
(define (wants-entity? entity)
|
(define (wants-entity? entity)
|
||||||
(and (game-entity? entity)
|
(and (game-entity? entity)
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
;; reset entity
|
;; reset entity
|
||||||
(reset-entity! (get-entity-manager) updated-entity)))))
|
(reset-entity! (get-entity-manager) updated-entity)))))
|
||||||
|
|
||||||
(define (create-physics-engine)
|
(define (create-physics-engine-2d)
|
||||||
(create-system wants-entity?
|
(create-system wants-entity?
|
||||||
(lambda (entity dt)
|
(lambda (entity dt)
|
||||||
(update-physics-entity entity dt))))
|
(update-physics-entity entity dt))))
|
Loading…
Reference in a new issue