Merging 1.7.5 Source: sprites and assets changes

This commit is contained in:
Evan Debenham
2015-02-04 15:20:10 -05:00
parent 8b1ffd9a72
commit 47ccaceac4
15 changed files with 255 additions and 96 deletions
@@ -23,8 +23,8 @@ import com.watabou.noosa.TextureFilm;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.DungeonTilemap;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.watabou.utils.PointF;
public class PlantSprite extends Image {
@@ -44,11 +44,9 @@ public class PlantSprite extends Image {
super( Assets.PLANTS );
if (frames == null) {
// Hardcoded size
frames = new TextureFilm( texture, 16, 16 );
}
// Hardcoded origin
origin.set( 8, 12 );
}
@@ -65,10 +63,9 @@ public class PlantSprite extends Image {
alpha( 1f );
pos = plant.pos;
PointF p = DungeonTilemap.tileToWorld( plant.pos );
x = p.x;
y = p.y;
x = (pos % Level.WIDTH) * DungeonTilemap.SIZE;
y = (pos / Level.WIDTH) * DungeonTilemap.SIZE;
state = State.GROWING;
time = DELAY;
}