v0.6.1b: improved sprites for ranged weapons and chests

This commit is contained in:
Evan Debenham 2017-08-22 21:52:13 -04:00
parent b03bfba296
commit 389e9adf7c
3 changed files with 15 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -82,14 +82,16 @@ public class ItemSpriteSheet {
public static final int CHEST = CONTAINERS+4;
public static final int LOCKED_CHEST = CONTAINERS+5;
public static final int CRYSTAL_CHEST = CONTAINERS+6;
public static final int EBONY_CHEST = CONTAINERS+7;
static{
assignItemRect(BONES, 14, 11);
assignItemRect(REMAINS, 14, 11);
assignItemRect(TOMB, 14, 15);
assignItemRect(GRAVE, 14, 15);
assignItemRect(CHEST, 16, 15);
assignItemRect(LOCKED_CHEST, 16, 15);
assignItemRect(CRYSTAL_CHEST, 16, 15);
assignItemRect(CHEST, 16, 14);
assignItemRect(LOCKED_CHEST, 16, 14);
assignItemRect(CRYSTAL_CHEST, 16, 14);
assignItemRect(EBONY_CHEST, 16, 14);
}
private static final int SINGLE_USE = xy(1, 4); //16 slots

View File

@ -21,8 +21,8 @@
package com.shatteredpixel.shatteredpixeldungeon.sprites;
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.watabou.noosa.Visual;
import com.watabou.noosa.tweeners.PosTweener;
import com.watabou.noosa.tweeners.Tweener;
@ -104,12 +104,17 @@ public class MissileSprite extends ItemSprite implements Tweener.Listener {
angularSpeed = 0;
angle = 135 - (float)(Math.atan2( d.x, d.y ) / 3.1415926 * 180);
} else if (image == ItemSpriteSheet.SHURIKEN
|| image == ItemSpriteSheet.BOOMERANG
|| image == ItemSpriteSheet.TOMAHAWK) {
angularSpeed = 1440;
} else {
angularSpeed = image == 15 || image == 106 ? 1440 : 720;
angularSpeed = 720;
}
PosTweener tweener = new PosTweener( this, to, d.length() / SPEED );
tweener.listener = this;
parent.add( tweener );