From d088e52400860d563d341bbda5c6231cf8299e2e Mon Sep 17 00:00:00 2001 From: TakeV Date: Fri, 24 May 2024 00:29:54 -0400 Subject: [PATCH] Add hitbox component --- modules/ces/component/hitbox.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 modules/ces/component/hitbox.scm diff --git a/modules/ces/component/hitbox.scm b/modules/ces/component/hitbox.scm new file mode 100644 index 0000000..6af8ae2 --- /dev/null +++ b/modules/ces/component/hitbox.scm @@ -0,0 +1,19 @@ +(define-module (ces component hitbox) + #:pure + #:use-module (scheme base) + #:export (make-hitbox + hitbox? + hitbox-entity-id + hitbox-x + hitbox-y + hitbox-width + hitbox-height)) + +(define-record-type + (make-hitbox (entity-id x y width height)) + hitbox? + (entity-id hitbox-entity-id) + (x hitbox-x) + (y hitbox-y) + (width hitbox-width) + (height hitbox-height))