I am a little confused by createSprite().
Should this code:
produce the same results as this code:
Because it does not.
What am I not understanding here?
Thanks,
John
I am a little confused by createSprite().
Should this code:
produce the same results as this code:
Because it does not.
What am I not understanding here?
Thanks,
John
Hi @jwilson25,
Yes. I absolutely understand your confusion. I think the answer is when a sprite has an animation, the 3rd and 4th parameter (width and height) do not apply because the animation has height and width - or at least that is what I think. When the sprite does not have animation, then the height and width applies. Here is an example. I have had kids make complete games where the main sprite is just the square.
That’s always been my thinking:)
~Michelle
That has been my experience. The height and width only apply to a sprite before assigning it an animation (ie. in its gray box stage).
Mike