drawing a held tile to the hand of the sprite

This commit is contained in:
minjaesong
2022-01-08 21:52:21 +09:00
parent 6697f2f5cd
commit 48f62e11bf
6 changed files with 86 additions and 24 deletions

View File

@@ -80,6 +80,15 @@ class EntryPoint : ModuleEntryPoint() {
override var inventoryCategory = if (isWall) Category.WALL else Category.BLOCK
override var isDynamic = false
override val material = MaterialCodex.getOrDefault(tile.material)
// override val itemImage: TextureRegion
// get() {
// val itemSheetNumber = App.tileMaker.tileIDtoItemSheetNumber(originalID)
// val bucket = if (isWall) BlocksDrawer.tileItemWall else BlocksDrawer.tileItemTerrain
// return bucket.get(
// itemSheetNumber % App.tileMaker.ITEM_ATLAS_TILES_X,
// itemSheetNumber / App.tileMaker.ITEM_ATLAS_TILES_X
// )
// }
init {
equipPosition = EquipPosition.HAND_GRIP