Scratch for Java

Sprite::changeTint()

Change the tint by a given amount.

Examples

import org.openpatch.scratch.*;
 
public class SpriteChangeTint {
  public SpriteChangeTint() {
    Stage myStage = new Stage(600, 240);
    Sprite mySprite = new Sprite("zeta", "assets/zeta_green_badge.png");
 
 
    myStage.add(mySprite);
    myStage.wait(2000);
    mySprite.changeTint(150);
    myStage.wait(2000);
 
    myStage.exit();
  }
 
  public static void main(String[] args) {
    new SpriteChangeTint();
  }
}
 

View on GitHub

Syntax

Java

.changeTint(amount)

Scratch

change [color v] effect by (25)

Parameters

Name Data Type Description
amount float Changes the tint by the amount.

Return

void

changeTint()