setup physics code needs to be put in the constructor as well.
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
e67685ba47
commit
85e03eaab8
Binary file not shown.
@ -37,7 +37,7 @@ public class Map {
|
|||||||
byte[] types = new byte[MAP_SCREENS_X*MAP_SCREENS_Y];
|
byte[] types = new byte[MAP_SCREENS_X*MAP_SCREENS_Y];
|
||||||
char[] data = new char[MAP_WIDTH*MAP_HEIGHT]; //While it's stored in a char, the map format only reads 14 bits for this value!! Value is between 0-16384!
|
char[] data = new char[MAP_WIDTH*MAP_HEIGHT]; //While it's stored in a char, the map format only reads 14 bits for this value!! Value is between 0-16384!
|
||||||
|
|
||||||
char waterLevel = 144;
|
char waterLevel = (MAP_HEIGHT/2) * Tile.TILE_HEIGHT;
|
||||||
|
|
||||||
int eventTileCount=0;
|
int eventTileCount=0;
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@ public abstract class PhysicsObject extends AnimatedObject implements PhysicsObj
|
|||||||
protected PhysicsObject(AnimatedSprite spr, double animationSpd, Panel panel) {
|
protected PhysicsObject(AnimatedSprite spr, double animationSpd, Panel panel) {
|
||||||
super(spr, animationSpd, panel);
|
super(spr, animationSpd, panel);
|
||||||
setCollisionBox(setCollisionBounds());
|
setCollisionBox(setCollisionBounds());
|
||||||
|
setPhysicsBasedOnLandOrUnderwaterStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user