code-dot-org/blockly — pull request #537 by cpirich (2014-04-30 22:07:18+00:00)
Title: [finishes #70328664]: add setSpritePosition, freeplay levels start with sprites hidden

Add spritesHiddenToStart level param and use it for freeplay levels.

Add setSpritePosition block. You can choose from 9 predefined positions or "random". This block is particularly useful for setting the initial position of sprites since we aren't building a real "design view" at this time.

Tweak the stop() function to properly reset all collisionMasks when needed. Added an optional parameter to avoid resetting the collisionMasks - this is used inside setSpritePosition if the sprite position is unchanged.

Added a Direction.NONE constant to replace the use of "0" which implied that no direction was set.

A related dashboard PR is coming that adds a callout to explain that setSpriteImage must be added to get started on the freeplay levels.