mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-21 20:18:14 +07:00
Added notes on warp special tiles
Fixed warp label positioning Fixed bug with player acting when animation was null
This commit is contained in:
parent
87de881d56
commit
8721ed3a91
@ -162,7 +162,7 @@ public class Player extends Entity {
|
||||
@Override
|
||||
public void act(float delta) {
|
||||
super.act(delta);
|
||||
if (animation != null && mode == getWalkMode() || mode == getRunMode()) {
|
||||
if (animation != null && (mode == getWalkMode() || mode == getRunMode())) {
|
||||
int frame = animation.getFrame();
|
||||
int numFrames = animation.getNumFramesPerDir();
|
||||
if (frame == 0 || frame == numFrames >>> 1) {
|
||||
|
@ -58,6 +58,15 @@ public class Warp extends Entity {
|
||||
/**
|
||||
* TODO: warp.LitVersion determines whether or not warp has special highlighted tiles
|
||||
* warp.Tile is added to subindex of tile to find corresponding highlighted tiles (if warp.LitVersion set)
|
||||
* Above info is wrong -- unhighlighted 21/2 highlighted 21/6 -- might be hard-coded? table?
|
||||
* All vanilla warps have warp.Tile == 2, only different ones are A5 barricade
|
||||
* caves\cavedr.dt1 up replaces 4 tiles -- value == 2 and replaces 0-3 with 4-7
|
||||
* caves\cavedr.dt1 down replaces 4 tiles -- value == 2 and replaces 0-3 with 4-7
|
||||
* sewer\chamb.dt1 up replaces 2 tiles -- value == 2 and replaces 0-1 with 2-3
|
||||
* sewer\chamb.dt1 down replaces 4 tiles -- value == 2 and replaces 0-3 with 4-7
|
||||
* spider\spiderent.dt1 down replaces 4 tiles -- value == 2 and replaces 0-3 with 4-7
|
||||
*
|
||||
* Subindex of special warp tile is the main index of the tiles it replaces
|
||||
*/
|
||||
}
|
||||
|
||||
@ -86,7 +95,7 @@ public class Warp extends Entity {
|
||||
|
||||
@Override
|
||||
public void draw(PaletteIndexedBatch batch) {
|
||||
label.setPosition(pixelLoc.x, pixelLoc.y + getLabelOffset() + label.getHeight() / 2, Align.center);
|
||||
label.setPosition(pixelLoc.x + box.xMin + box.width / 2, pixelLoc.y - box.yMax + box.height / 2 + getLabelOffset() + label.getHeight() / 2, Align.center);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user