Don't draw the gem in the status section until the animation is finished
Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
parent
00c54e5e15
commit
8ed02cf2ac
@ -94,6 +94,15 @@ public class Cell extends JComponent implements Constants {
|
||||
this.object = object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a top object
|
||||
*
|
||||
* @return Returns the top object
|
||||
*/
|
||||
public Object getObjectOnTop() {
|
||||
return objectOnTop;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a top object
|
||||
*
|
||||
|
@ -490,7 +490,8 @@ public class Player extends Object implements Constants {
|
||||
public ArrayList<Gem> getInventoryGems() {
|
||||
ArrayList<Gem> gems = new ArrayList<>();
|
||||
for (Object object : carrying) {
|
||||
if (object instanceof Gem) {
|
||||
if (object instanceof Gem && object.getCell().getObjectOnTop() == null) {
|
||||
// Only count the gem as in inventory once it stops showing
|
||||
gems.add((Gem) object);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user