Sprite::getHeight()
Get the height of the sprite.
Examples
import org.openpatch.scratch.*;
public class SpriteGetHeight {
public SpriteGetHeight() {
Stage myStage = new Stage(600, 240);
Sprite mySprite = new Sprite("zeta", "assets/zeta_green_badge.png");
mySprite.changeY(30);
myStage.add(mySprite);
mySprite.say("Height: " + mySprite.getHeight());
myStage.wait(1000);
myStage.exit();
}
public static void main(String[] args) {
new SpriteGetHeight();
}
}
Syntax
Java
.getHeight()
Scratch
Return
float