v0.3.4a: re-added align methods pt.2
Also moved rendered text multiline into the core game
This commit is contained in:
committed by
Evan Debenham
parent
ac9c50f2ac
commit
b110c0db8c
@@ -20,16 +20,16 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.effects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.DungeonTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.RenderedText;
|
||||
import com.watabou.utils.SparseArray;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FloatingText extends RenderedText {
|
||||
|
||||
private static final float LIFESPAN = 1f;
|
||||
@@ -89,10 +89,9 @@ public class FloatingText extends RenderedText {
|
||||
|
||||
text( text );
|
||||
hardlight( color );
|
||||
|
||||
//measure();
|
||||
this.x = x - width() / 2;
|
||||
this.y = y - height();
|
||||
|
||||
this.x = PixelScene.align( Camera.main, x - width() / 2);
|
||||
this.y = PixelScene.align( Camera.main, y - height());
|
||||
|
||||
timeLeft = LIFESPAN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user