JScratch
Loading...
Searching...
No Matches
Sprite1.java
Go to the documentation of this file.
1package generated;
2
3import com.jscratch.*;
4import java.awt.Color;
5import java.awt.event.KeyEvent;
6
7public class Sprite1 extends Sprite {
8 /* slot start [id:"1_members" tags:"inClassNotMethod"] */
9 public Sprite1() {
10 super("Sprite1");
11
12 // Example: addCostume(new Costume("costume1", "path/to/img.png"));
13
14 /* slot start [id:"1_init" tags:"inInstanceMethod"] */
15
17
18 "NAME OF YOUR COSTUME",
19 "jscratch_ws/assets/"+
20 "YOURSPRITE.png",
21 32, //change this to be half your sprite width, this is for rotation
22 32 //change this to be half your sprite height, this is for rotation
23 ));
24
25
26
27 /* slot end [id:"1_init"] */
28 }
29
30
31
32 public int i = 9;
33 /* slot end [id:"1_members"] */
34}
Sprite(String name)
Definition Sprite.java:38
void addCostume(Costume c)
Definition Sprite.java:228