I want to embed a triangle into a circle. I am using variables of type "Player" to refer to both the Triangle and circle. Smalltalk code is fine.
Thanks, Stephen
On Monday 28 Jun 2010 12:57:11 pm Steve Thomas wrote:
I want to embed a triangle into a circle. I am using variables of type "Player" to refer to both the Triangle and circle. Smalltalk code is fine.
Embedding is just prepending a morph to the sub-morphs list of another morph.
If the variable Boss in Triangle points to the circle (player): Triangle>>script1 self getBoss costume renderedMorph addMorphFront: self costume renderedMorph
will do the trick.
HTH .. Subbu
(I'm redirecting this to the Squeakland list, this is not a developer question)
On 28.06.2010, at 09:27, Steve Thomas wrote:
I want to embed a triangle into a circle. I am using variables of type "Player" to refer to both the Triangle and circle. Smalltalk code is fine.
Don't need Smalltalk code.
Use the "include" tile, found in the "collections" protocol of any holder/playfield. Simply replace its receiver and argument with your variable tiles.
- Bert -
etoys-dev@lists.squeakfoundation.org