diff options
-rw-r--r-- | starling/node-2d.scm | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm index a66f6d5..7385c98 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -30,6 +30,7 @@ #:use-module (chickadee render color) #:use-module (chickadee render font) #:use-module (chickadee render framebuffer) + #:use-module (chickadee render particles) #:use-module (chickadee render shapes) #:use-module (chickadee render sprite) #:use-module (chickadee render texture) @@ -113,7 +114,10 @@ <tile-map> tile-map - layers)) + layers + + <particles> + particles)) ;;; @@ -617,3 +621,17 @@ (let ((m (asset-ref (tile-map node)))) (draw-tile-map* m (world-matrix node) (tile-map-rect m) #:layers (layers node)))) + + +;;; +;;; Particles +;;; + +(define-class <particles> (<node-2d>) + (particles #:accessor particles #:init-keyword #:particles)) + +(define-method (update (node <particles>) dt) + (update-particles (particles node))) + +(define-method (render (node <particles>) alpha) + (draw-particles* (particles node) (world-matrix node))) |