Playlab go to xy

Necessary for animation in MSM (particularly quadratic motion and nonlinear acceleration). I don’t expect this
block to be used directly by students (at least not in any of our
current courses).
Usually you build a drop down with strings like "move actor 1 to" and "move actor 2 to" and the blockly code will put the actual drop down only on the number. Yes, definitely localize the string even if you don't think it will be used. You never know...

The reason there is different code for sprite count === 1 is because we remove the actor number entirely in that case (on basic levels). You might as well follow the same pattern.



> On Dec 5, 2014, at 6:03 PM, Josh Caldwell <notifications@github.com> wrote:
> 
> In blockly/src/studio/blocks.js:
> 
> > @@ -580,6 +580,48 @@ exports.install = function(blockly, blockInstallOptions) {
> >        name: 'setSpritePosition'});
> >    };
> >  
> > +  blockly.Blocks.studio_setSpriteXY = {
> > +    // Block for jumping a sprite to specific XY location.
> > +    helpUrl: '',
> > +    init: function() {
> > +      this.setHSV(184, 1.00, 0.74);
> > +      if (spriteCount > 1) {
> > +        this.appendValueInput('SPRITE')
> > +          .setCheck('Number')
> > +          .appendTitle(msg.moveSpriteN({spriteIndex: ''}));
> > +      } else {
> > +        this.appendDummyInput()
> > +          .appendTitle(msg.setSprite());
> > +      }
> > +      this.appendDummyInput()
> > +        .appendTitle('to');
> Tried "moveSpriteNTo" but it doesn't look right with an actor param (maybe I'm doing something wrong)
> 
> 
> alternate idea with localized string "toXY"
> 
> 
> —
> Reply to this email directly or view it on GitHub.
>