summaryrefslogtreecommitdiff
path: root/starling/node.scm
diff options
context:
space:
mode:
Diffstat (limited to 'starling/node.scm')
-rw-r--r--starling/node.scm20
1 files changed, 0 insertions, 20 deletions
diff --git a/starling/node.scm b/starling/node.scm
index 58896b8..8247b31 100644
--- a/starling/node.scm
+++ b/starling/node.scm
@@ -158,12 +158,9 @@
;;;
(define-method (update (node <node>) dt)
- "Advance simulation of NODE by the time delta DT."
#t)
(define-method (update-tree (node <node>) dt)
- "Update NODE and all of its children. DT is the amount of time
-passed since the last update, in milliseconds."
(unless (or (paused? node) (not (booted? node)))
;; Update children first, recursively.
(for-each-child (lambda (child) (update-tree child dt)) node)
@@ -173,28 +170,20 @@ passed since the last update, in milliseconds."
(update node dt))))
(define-method (render (node <node>) alpha)
- "Render NODE. ALPHA is the distance between the previous update and
-the next update represented as a ratio in the range [0, 1]."
#t)
(define-method (render-tree (node <node>) alpha)
- "Render NODE and all of its children, recursively.
-ALPHA is the distance between the previous update and the next update
-represented as a ratio in the range [0, 1]."
(when (visible? node)
(render node alpha)
(for-each-child (lambda (child) (render-tree child alpha)) node)))
(define-method (on-boot (node <node>))
- "Perform initialization tasks for NODE."
#t)
(define-method (on-enter (node <node>))
- "Perform task now that NODE has entered the current scene."
#t)
(define-method (on-exit (node <node>))
- "Perform task now that NODE has left the current scene."
#t)
(define-method (on-asset-reload (node <node>) slot-name asset)
@@ -206,7 +195,6 @@ represented as a ratio in the range [0, 1]."
;;;
(define-method (boot (node <node>))
- "Prepare NODE to enter the game world for the first time."
(unless (booted? node)
(set! (booted? node) #t)
(on-boot node)))
@@ -229,7 +217,6 @@ represented as a ratio in the range [0, 1]."
(do-reboot))))
(define-method (activate (node <node>))
- "Mark NODE and all of its children as active."
;; First time activating? We must boot!
(unless (booted? node) (boot node))
(set! (active? node) #t)
@@ -238,17 +225,14 @@ represented as a ratio in the range [0, 1]."
(on-enter node))
(define-method (deactivate (node <node>))
- "Mark NODE and all of its children as inactive."
(set! (active? node) #f)
(on-exit node)
(for-each-child deactivate node))
(define-method (show (node <node>))
- "Mark NODE as visible."
(set! (visible? node) #t))
(define-method (hide (node <node>))
- "Mark NODE as invisible."
(set! (visible? node) #f))
(define-method (pause (node <node>))
@@ -263,7 +247,6 @@ represented as a ratio in the range [0, 1]."
;;;
(define-method (child-ref (parent <node>) name)
- "Return the child node of PARENT whose name is NAME."
(hashq-ref (children-by-name parent) name))
(define-syntax &
@@ -280,7 +263,6 @@ represented as a ratio in the range [0, 1]."
#t)
(define-method (attach-to (new-parent <node>) . new-children)
- "Attach NEW-CHILDREN to NEW-PARENT."
;; Validate all children first. The whole operation will fail if
;; any of them cannot be attached.
(for-each (lambda (child)
@@ -315,7 +297,6 @@ represented as a ratio in the range [0, 1]."
new-children))
(define-method (detach (node <node>))
- "Detach NODE from its parent."
(let ((p (parent node)))
(when p
;; Remove child from parent.
@@ -330,7 +311,6 @@ represented as a ratio in the range [0, 1]."
(on-detach p node))))
(define-method (detach . nodes)
- "Detach all NODES from their respective parents."
(for-each detach nodes))