File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
docs/en/book/reference/sprite Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "template" : " method" ,
3
+ "related" : [],
4
+ "scratchblock" : " when backdrop switches" ,
5
+ "name" : " whenBackdropSwitches()" ,
6
+ "class" : " Sprite" ,
7
+ "description" : " This method is called when the backdrop of the stage switches. The method will receive the name of the new backdrop as a paramter." ,
8
+ "syntax" : [" void whenBackdropSwitches(name)" ],
9
+ "returns" : " void" ,
10
+ "examples" : [
11
+ { "src" : " SpriteWhenBackdropSwitches.java" , "preview" : " SpriteWhenBackdropSwitches.gif" , "lines" : " [Rr]ecorder" }
12
+ ],
13
+ "parameters" : [
14
+ {
15
+ "name" : " name" ,
16
+ "description" : " Name of the new backdrop." ,
17
+ "type" : " String"
18
+ }
19
+ ]
20
+ }
Original file line number Diff line number Diff line change 5
5
"name" : " move()" ,
6
6
"class" : " Sprite" ,
7
7
"description" : " Change the tint by a given amount." ,
8
- "syntax" : [" .changeTint(amount )" ],
8
+ "syntax" : [" .move(steps )" ],
9
9
"returns" : " void" ,
10
10
"examples" : [
11
- { "src" : " SpriteChangeTint .java" , "preview" : " SpriteChangeTint .gif" }
11
+ { "src" : " SpriteMove .java" , "preview" : " SpriteMove .gif" }
12
12
],
13
13
"parameters" : [
14
14
{
15
- "name" : " amount " ,
16
- "description" : " Changes the tint by the amount ." ,
15
+ "name" : " steps " ,
16
+ "description" : " Steps to move in the current direction ." ,
17
17
"type" : " float"
18
18
}
19
19
]
You can’t perform that action at this time.
0 commit comments