reveal inconsistency in child transformations
This commit is contained in:
parent
1a154a9a56
commit
ac990359cb
|
@ -73,7 +73,6 @@
|
||||||
(:documentation "Base class for entities in the game."))
|
(:documentation "Base class for entities in the game."))
|
||||||
|
|
||||||
(defmethod make-load-form ((this actor) &optional environment)
|
(defmethod make-load-form ((this actor) &optional environment)
|
||||||
;(make-load-form-saving-slots this :environment environment)
|
|
||||||
(make-generic-load-form this :environment environment))
|
(make-generic-load-form this :environment environment))
|
||||||
|
|
||||||
(defmethod scene ((this actor))
|
(defmethod scene ((this actor))
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
(:documentation "Base class for components attached to game entities."))
|
(:documentation "Base class for components attached to game entities."))
|
||||||
|
|
||||||
(defmethod make-load-form ((this component) &optional environment)
|
(defmethod make-load-form ((this component) &optional environment)
|
||||||
;(make-load-form-saving-slots this :environment environment)
|
|
||||||
(make-generic-load-form this :environment environment))
|
(make-generic-load-form this :environment environment))
|
||||||
|
|
||||||
(defmethod actor ((this component))
|
(defmethod actor ((this component))
|
||||||
|
|
|
@ -119,7 +119,7 @@
|
||||||
"List of all known views.")
|
"List of all known views.")
|
||||||
|
|
||||||
(defun register-test-scene ()
|
(defun register-test-scene ()
|
||||||
(let (test-scene test-actor test-drawable test-actor-2 camera-actor camera-view child-actor)
|
(let (test-scene test-actor test-drawable test-actor-2 camera-actor camera-view child-actor grandchild-actor)
|
||||||
(setf test-scene (make-instance 'scene
|
(setf test-scene (make-instance 'scene
|
||||||
:id -1
|
:id -1
|
||||||
:name "Test scene"))
|
:name "Test scene"))
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
|
|
||||||
(setf child-actor (make-instance 'actor
|
(setf child-actor (make-instance 'actor
|
||||||
:name "Child Actor"
|
:name "Child Actor"
|
||||||
:location (vec2 0.0 0.5)
|
:location (vec2 0 0.5)
|
||||||
:z-layer -2))
|
:z-layer -2))
|
||||||
[test-scene (add-actor child-actor)]
|
[test-scene (add-actor child-actor)]
|
||||||
[test-actor-2 (add-child child-actor)]
|
[test-actor-2 (add-child child-actor)]
|
||||||
|
@ -154,6 +154,18 @@
|
||||||
:colour (vec4 0.0 1.0 1.0 1.0)))
|
:colour (vec4 0.0 1.0 1.0 1.0)))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
(setf grandchild-actor (make-instance 'actor
|
||||||
|
:name "Grandchild Actor"
|
||||||
|
:location (vec2 0 1)
|
||||||
|
:scale (vec2 0.25 0.25)
|
||||||
|
:z-layer 1))
|
||||||
|
[test-scene (add-actor grandchild-actor)]
|
||||||
|
[child-actor (add-child grandchild-actor)]
|
||||||
|
|
||||||
|
[grandchild-actor (add-component (make-instance 'drawable-test
|
||||||
|
:colour (vec4 1.0 1.0 0.0 0.0)))
|
||||||
|
]
|
||||||
|
|
||||||
(setf camera-actor (make-instance 'actor
|
(setf camera-actor (make-instance 'actor
|
||||||
:name "Camera"))
|
:name "Camera"))
|
||||||
[test-scene (add-actor camera-actor)]
|
[test-scene (add-actor camera-actor)]
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
(:documentation "A scene containing game entities."))
|
(:documentation "A scene containing game entities."))
|
||||||
|
|
||||||
(defmethod make-load-form ((this scene) &optional environment)
|
(defmethod make-load-form ((this scene) &optional environment)
|
||||||
;(make-load-form-saving-slots this :environment environment)
|
|
||||||
(make-generic-load-form this :environment environment))
|
(make-generic-load-form this :environment environment))
|
||||||
|
|
||||||
(defmethod print-object ((this scene) stream)
|
(defmethod print-object ((this scene) stream)
|
||||||
|
|
Loading…
Reference in New Issue