Java Code Examples for com.watabou.noosa.Image#hardlight()
The following examples show how to use
com.watabou.noosa.Image#hardlight() .
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: Berserk.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 6 votes |
@Override public void tintIcon(Image icon) { switch (state){ case NORMAL: default: if (power < 0.5f) icon.hardlight(1f, 1f, 1f - 2*(power)); else if (power < 1f) icon.hardlight(1f, 1.5f - power, 0f); else icon.hardlight(1f, 0f, 0f); break; case BERSERK: icon.hardlight(1f, 0f, 0f); break; case RECOVERING: icon.hardlight(1f - (levelRecovery*0.5f), 1f - (levelRecovery*0.3f), 1f); break; } }
Example 2
Source File: Preparation.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 6 votes |
@Override public void tintIcon(Image icon) { switch (AttackLevel.getLvl(turnsInvis)){ case LVL_1: icon.hardlight(0f, 1f, 0f); break; case LVL_2: icon.hardlight(1f, 1f, 0f); break; case LVL_3: icon.hardlight(1f, 0.6f, 0f); break; case LVL_4: icon.hardlight(1f, 0f, 0f); break; } }
Example 3
Source File: Combo.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@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 4
Source File: Kinetic.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override public void tintIcon(Image icon) { if (preservedDamage >= 10){ icon.hardlight(1f, 0f, 0f); } else if (preservedDamage >= 5) { icon.hardlight(1f, 1f - (preservedDamage - 5f)*.2f, 0f); } else { icon.hardlight(1f, 1f, 1f - preservedDamage*.2f); } }
Example 5
Source File: Momentum.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 5 votes |
@Override public void tintIcon(Image icon) { if (stacks <= 5) { icon.hardlight(0.2f * (stacks - 1), 1f, 0f); } else { icon.hardlight(1f, 1f - 0.2f*(stacks - 6), 0f); } }
Example 6
Source File: Berserk.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override public void tintIcon(Image icon) { switch (state){ case NORMAL: default: if (power < 1f) icon.hardlight(1f, 0.5f, 0f); else icon.hardlight(1f, 0f, 0f); break; case BERSERK: icon.hardlight(1f, 0f, 0f); break; case RECOVERING: icon.hardlight(0, 0, 1f); break; } }
Example 7
Source File: Poison.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.6f, 0.2f, 0.6f); }
Example 8
Source File: ArtifactRecharge.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0, 1f, 0); }
Example 9
Source File: MagicImmune.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0, 1, 0); }
Example 10
Source File: PrismaticGuard.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(1f, 1f, 2f); }
Example 11
Source File: WandOfMagicMissile.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.2f, 0.6f, 1f); }
Example 12
Source File: Barrier.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.5f, 1f, 2f); }
Example 13
Source File: Corrosion.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(1f, 0.5f, 0f); }
Example 14
Source File: Stamina.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.5f, 1f, 0.5f); }
Example 15
Source File: Haste.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(1f, 0.8f, 0f); }
Example 16
Source File: SoulMark.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.5f, 0.5f, 0.5f); }
Example 17
Source File: Blocking.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.5f, 1f, 2f); }
Example 18
Source File: Poison.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0.6f, 0.2f, 0.6f); }
Example 19
Source File: ElixirOfAquaticRejuvenation.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public void tintIcon(Image icon) { icon.hardlight(0, 0.75f, 0.75f); }
Example 20
Source File: DrainLife.java From YetAnotherPixelDungeon with GNU General Public License v3.0 | 2 votes |
public DrainLife( int source, int target, Callback callback ) { super(); this.callback = callback; Image proto = Effects.get( Effects.Type.DRAIN ); float ox = 0; float oy = proto.height / 2; this.length = 2; cx = new float[length]; cy = new float[length]; //FIXME cx[0] = (source % Level.WIDTH + 0.5f) * DungeonTilemap.SIZE; cy[0] = (source / Level.WIDTH + 0.5f) * DungeonTilemap.SIZE; cx[1] = (target % Level.WIDTH + 0.5f) * DungeonTilemap.SIZE; cy[1] = (target / Level.WIDTH + 0.5f) * DungeonTilemap.SIZE; arcsS = new Image[length - 1]; arcsE = new Image[length - 1]; proto.hardlight( 0x66066 ); for (int i=0; i < length - 1; i++) { Image arc = arcsS[i] = new Image( proto ); arc.x = cx[i] - arc.origin.x; arc.y = cy[i] - arc.origin.y; arc.origin.set( ox, oy ); add( arc ); arc = arcsE[i] = new Image( proto ); arc.origin.set( ox, oy ); add( arc ); } life = DURATION; Sample.INSTANCE.play( Assets.SND_RAY ); }