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

The following examples show how to use com.watabou.noosa.Image#resetColor() . 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 5 votes vote down vote up
@Override
public void tintIcon(Image icon) {
	if (count >= 10)    icon.hardlight(1f, 0f, 0f);
	else if (count >= 8)icon.hardlight(1f, 0.8f, 0f);
	else if (count >= 6)icon.hardlight(1f, 1f, 0f);
	else if (count >= 4)icon.hardlight(0.8f, 1f, 0f);
	else if (count >= 2)icon.hardlight(0f, 1f, 0f);
	else                icon.resetColor();
}
 
Example 2
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 3
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 4
Source File: Shadows.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.resetColor();
}