Java Code Examples for com.watabou.noosa.Image#tint()

The following examples show how to use com.watabou.noosa.Image#tint() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Combo.java    From shattered-pixel-dungeon with GNU General Public License v3.0 6 votes vote down vote up
@Override
public Image getIcon() {
	Image icon;
	if (((Hero)target).belongings.weapon != null){
		icon = new ItemSprite(((Hero)target).belongings.weapon.image, null);
	} else {
		icon = new ItemSprite(new Item(){ {image = ItemSpriteSheet.WEAPON_HOLDER; }});
	}

	if (count >= 10)    icon.tint(0xFFFF0000);
	else if (count >= 8)icon.tint(0xFFFFCC00);
	else if (count >= 6)icon.tint(0xFFFFFF00);
	else if (count >= 4)icon.tint(0xFFCCFF00);
	else                icon.tint(0xFF00FF00);

	return icon;
}
 
Example 2
Source File: Combo.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 6 votes vote down vote up
@Override
public Image getIcon() {
	Image icon;
	if (((Hero)target).belongings.weapon != null){
		icon = new ItemSprite(((Hero)target).belongings.weapon.image, null);
	} else {
		icon = new ItemSprite(new Item(){ {image = ItemSpriteSheet.WEAPON_HOLDER; }});
	}

	if (count >= 10)    icon.tint(0xFFFF0000);
	else if (count >= 8)icon.tint(0xFFFFCC00);
	else if (count >= 6)icon.tint(0xFFFFFF00);
	else if (count >= 4)icon.tint(0xFFCCFF00);
	else                icon.tint(0xFF00FF00);

	return icon;
}
 
Example 3
Source File: Combo.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	if (comboTime >= 3f){
		icon.resetColor();
	} else {
		icon.tint(0xb3b3b3, 0.5f + 0.5f*(3f + 1 - comboTime)/3f);
	}
}
 
Example 4
Source File: FlavourBuff.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
public static void greyIcon(Image icon, float startGrey, float remaining){
	if (remaining >= startGrey){
		icon.resetColor();
	} else {
		icon.tint(0xb3b3b3, 0.6f + 0.3f*(startGrey - remaining)/startGrey);
	}
}
 
Example 5
Source File: Barrier.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	icon.tint(0, 0.5f, 1, 0.5f);
}
 
Example 6
Source File: ArcaneArmor.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	icon.tint(0.5f, 0, 1, 0.5f);
}
 
Example 7
Source File: PrismaticGuard.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	icon.tint(0.5f, 0.5f, 1, 0.5f);
}
 
Example 8
Source File: Stamina.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	icon.tint(1, 1, 0, 0.5f);
	if (cooldown() < 5f) greyIcon(icon, 5f, cooldown());
}
 
Example 9
Source File: Haste.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	icon.tint(1, 1, 0, 0.5f);
	if (cooldown() < 5f) greyIcon(icon, 5f, cooldown());
}
 
Example 10
Source File: Blocking.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	icon.tint(0, 0.5f, 1, 0.5f);
}