v0.8.0: fixes/tweaks:
- fixed further issues with which tiles are considered open - fixed keyboard input not working with loot indicator - improved the behaviour for cycling enemies
This commit is contained in:
parent
539bccd7bd
commit
58d70e94d1
|
@ -630,12 +630,12 @@ public abstract class Level implements Bundlable {
|
||||||
}
|
}
|
||||||
|
|
||||||
//an open space is large enough to fit large mobs. A space is open when it is not solid
|
//an open space is large enough to fit large mobs. A space is open when it is not solid
|
||||||
// and there is a group of 3 or more adjacent cells which aren't solid
|
// and there is and open corner with both adjacent cells opens
|
||||||
for (int i=0; i < length(); i++) {
|
for (int i=0; i < length(); i++) {
|
||||||
if (solid[i]){
|
if (solid[i]){
|
||||||
openSpace[i] = false;
|
openSpace[i] = false;
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < PathFinder.CIRCLE8.length; j++){
|
for (int j = 1; j < PathFinder.CIRCLE8.length; j += 2){
|
||||||
if (solid[i+PathFinder.CIRCLE8[j]]) {
|
if (solid[i+PathFinder.CIRCLE8[j]]) {
|
||||||
openSpace[i] = false;
|
openSpace[i] = false;
|
||||||
} else if (!solid[i+PathFinder.CIRCLE8[(j+1)%8]]
|
} else if (!solid[i+PathFinder.CIRCLE8[(j+1)%8]]
|
||||||
|
|
|
@ -107,13 +107,12 @@ public class DangerIndicator extends Tag {
|
||||||
protected void onClick() {
|
protected void onClick() {
|
||||||
if (Dungeon.hero.visibleEnemies() > 0) {
|
if (Dungeon.hero.visibleEnemies() > 0) {
|
||||||
|
|
||||||
Mob target = Dungeon.hero.visibleEnemy(enemyIndex++);
|
Mob target = Dungeon.hero.visibleEnemy(++enemyIndex);
|
||||||
|
|
||||||
TargetHealthIndicator.instance.target(target == TargetHealthIndicator.instance.target() ? null : target);
|
QuickSlotButton.target(target);
|
||||||
|
if (Dungeon.hero.canAttack(target)) AttackIndicator.target(target);
|
||||||
|
|
||||||
if (Dungeon.hero.curAction == null) {
|
if (Dungeon.hero.curAction == null) Camera.main.panTo(target.sprite.center(), 5f);
|
||||||
Camera.main.panTo(target.sprite.center(), 5f);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,11 +42,6 @@ public class LootIndicator extends Tag {
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public GameAction keyAction() {
|
|
||||||
return SPDAction.TAG_LOOT;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createChildren() {
|
protected void createChildren() {
|
||||||
super.createChildren();
|
super.createChildren();
|
||||||
|
@ -58,6 +53,11 @@ public class LootIndicator extends Tag {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GameAction keyAction() {
|
||||||
|
return SPDAction.TAG_LOOT;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
slot.showParams( true, false, false );
|
slot.showParams( true, false, false );
|
||||||
add( slot );
|
add( slot );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user