From c33701fc1c6cc18faf8ff5e02245ab94877b1f54 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 23 Jul 2022 10:56:19 -0500 Subject: [change] generic add/drop unit; [add] impls for menu class --- src/wheelwork.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/wheelwork.lisp') diff --git a/src/wheelwork.lisp b/src/wheelwork.lisp index e411c52..154adaa 100644 --- a/src/wheelwork.lisp +++ b/src/wheelwork.lisp @@ -5,13 +5,16 @@ (defvar *application* nil "current application") -(defun add-unit (unit) +(defgeneric add-unit (unit)) + +(defmethod add-unit ((unit unit)) "Adds a unit to the display." (assert *application*) (push unit (application-scene *application*)) (setf (unit-in-scene-p unit) t)) -(defun drop-unit (unit) +(defgeneric drop-unit (unit)) +(defmethod drop-unit ((unit unit)) "A removes a unit from the display." (assert *application*) (setf (application-scene *application*) -- cgit v1.2.3