v0.5.0: tapping on heap sprites now overrides the tile location of that tap
This commit is contained in:
parent
2b314bf1a9
commit
2611125adf
|
@ -21,6 +21,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
|
@ -62,6 +63,13 @@ public class CellSelector extends TouchArea {
|
|||
}
|
||||
}
|
||||
|
||||
for (Heap heap : Dungeon.level.heaps.values()){
|
||||
if (heap.sprite != null && heap.sprite.overlapsPoint( p.x, p.y)){
|
||||
select( heap.pos );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
select( ((DungeonTilemap)target).screenToTile(
|
||||
(int)touch.current.x,
|
||||
(int)touch.current.y,
|
||||
|
|
Loading…
Reference in New Issue
Block a user