getting ready to activate engine on key

This commit is contained in:
Dan Ballard 2011-08-03 23:13:25 -07:00
parent 86b3849ee3
commit 3a3c66bba5
4 changed files with 19 additions and 6 deletions

View File

@ -22,8 +22,8 @@
; take 2 seconds to fully fire
(defmethod regen-model ((model engine-model) time)
(setf (vertices model) (generate-step-2d-array *thruster-vertices* time))
(setf (colors model) (generate-step-2d-array *thruster-colors* time)))
(setf (vertices model) (generate-step-2d-array (template-vertices model) time))
(setf (colors model) (generate-step-2d-array (template-colors model) time)))
(defparameter *thruster-vertices*

View File

@ -12,5 +12,6 @@
(:file "model")
(:file "physics")
(:file "objects")
(:file "engine")
(:file "flight-sim")))

View File

@ -248,9 +248,21 @@
(setf *num-frames* 0)
(setf *last-time* *start-time*)
(setf *controls-active* '())
(setf *self* (make-instance 'game-object
:body (make-instance 'body :coords (vector 0 0 11))
:model *ship-model*))
(setf *self*
(make-instance
'game-object
:body (make-instance 'body :coords (vector 0 0 11))
:model *ship-model*
:attachments
(list :thruster
(make-instance 'engine-object
:model (make-instance 'engine-model
:template-vertices *thruster-vertices*
:template-colors *thruster-colors*)
:body (make-instance 'body
:coords (vector 0 0 3)))))))
;:engines (list :engines (list :thrust
; (make-instance 'engine-object
; :motion (make-instance 'motion :coords (vector 0 0.5 3.0))

View File

@ -14,7 +14,7 @@
(defmethod activate ((object game-object) sym start-time)
(push sym (active-attachments object))
(activate (getf (attachments object) sym)))
(activate (getf (attachments object) sym) start-time))
(defmethod draw :before ((object game-object) time)
(gl:push-matrix)