mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
@@ -191,8 +191,6 @@ public class MapActor extends Actor {
|
||||
}
|
||||
|
||||
public boolean collideWithPlayer(PlayerSprite other) {
|
||||
|
||||
|
||||
boolean newIsColliding = collideWith(other);
|
||||
if (newIsColliding) {
|
||||
if (!isCollidingWithPlayer)
|
||||
@@ -205,6 +203,8 @@ public class MapActor extends Actor {
|
||||
}
|
||||
|
||||
public boolean collideWith(Rectangle other) {
|
||||
if (getCollisionHeight() == 0f)
|
||||
return false;
|
||||
return boundingRect().overlaps(other);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,20 +22,22 @@ public class MapSprite extends Actor {
|
||||
static public int BackgroundLayer = -1;
|
||||
static public int SpriteLayer = 0;
|
||||
TextureRegion texture;
|
||||
TextraLabel searchPost;
|
||||
TextraLabel searchPost = Controls.newTextraLabel("[%80][+SearchPost]");
|
||||
boolean isCaveDungeon, isOldorVisited;
|
||||
PointOfInterest poi;
|
||||
|
||||
public MapSprite(Vector2 pos, TextureRegion sprite, PointOfInterest point) {
|
||||
poi = point;
|
||||
isCaveDungeon = point != null && (point.getData().type.equalsIgnoreCase("cave") || point.getData().type.equalsIgnoreCase("dungeon"));
|
||||
isOldorVisited = poi != null && WorldSave.getCurrentSave().getPointOfInterestChanges(poi.getID() + poi.getData().map).hasDeletedObjects();
|
||||
searchPost = Controls.newTextraLabel("[%80][+SearchPost]");
|
||||
if (point != null) {
|
||||
isCaveDungeon = "cave".equalsIgnoreCase(point.getData().type) || "dungeon".equalsIgnoreCase(point.getData().type);
|
||||
if (point.getData().map != null && point.getID() != null) {
|
||||
isOldorVisited = WorldSave.getCurrentSave().getPointOfInterestChanges(point.getID() + point.getData().map).hasDeletedObjects();
|
||||
}
|
||||
}
|
||||
texture = sprite;
|
||||
setPosition(pos.x, pos.y);
|
||||
setHeight(texture.getRegionHeight());
|
||||
setWidth(texture.getRegionWidth());
|
||||
setWidth(texture.getRegionWidth());
|
||||
}
|
||||
|
||||
public void checkOut() {
|
||||
isOldorVisited = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user