v0.3.0: BIG refactor to buff display, more clear and extendable code, instead of a nest of instanceof statements

This commit is contained in:
Evan Debenham
2015-04-29 01:55:41 -04:00
parent 9fad20a071
commit 6a7c42634a
29 changed files with 205 additions and 120 deletions
@@ -19,6 +19,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
public class Light extends FlavourBuff {
@@ -50,7 +51,13 @@ public class Light extends FlavourBuff {
public int icon() {
return BuffIndicator.LIGHT;
}
@Override
public void fx(boolean on) {
if (on) target.sprite.add(CharSprite.State.ILLUMINATED);
else target.sprite.remove(CharSprite.State.ILLUMINATED);
}
@Override
public String toString() {
return "Illuminated";