JScratch
Loading...
Searching...
No Matches
Sprite1.java
Go to the documentation of this file.
1
package
generated;
2
3
import
com.jscratch.*;
4
import
java.awt.Color;
5
import
java.awt.event.KeyEvent;
6
7
public
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
16
addCostume
(
new
Costume
(
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
}
com.jscratch.Costume
Definition
Costume.java:10
com.jscratch.Sprite.Sprite
Sprite(String name)
Definition
Sprite.java:38
com.jscratch.Sprite.addCostume
void addCostume(Costume c)
Definition
Sprite.java:228
generated.Sprite1.i
int i
Definition
Sprite1.java:32
generated.Sprite1.Sprite1
Sprite1()
Definition
Sprite1.java:9
jscratch_ws
src
generated
Sprite1.java
Generated by
1.16.1