Of course you can have the best of both worlds by using Morphic stepping in your subclass, like:HilaireFernandes wroteFirst you don't need to subclass EllipseMorph...
100 to: 50 by: -1 do: [ :x |
�� �� aBall
�� �� �� �� height: x;
�� �� �� �� bottom: 200 - x.
�� �� World doOneCycle]
EllipseMorph subclass: #Ball
...
Ball>>#step
�� �� self
�� �� �� �� �� �� �� �� bottom: 200 - self nextHeight;
�� �� �� �� �� �� �� �� height: self nextHeight.
�� �� �� �� �� �� �� ��
�� �� �� �� self bottom = 100 ifTrue: [ increment := -1 ].
�� �� �� �� self bottom = 150 ifTrue: [ increment := 1 ].
For full code:
�� �� Gofer it
�� �� �� �� smalltalkhubUser: 'SeanDeNigris' project: 'SeansPlayground';
�� �� �� �� package: 'Ball';
�� �� �� �� load.Cheers,
Sean
If you reply to this email, your message will be added to the discussion below:http://forum.world.st/Question-on-Morphic-drawOn-method-tp4803695p4803743.html