[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / actions / placeblock / PlaceBlockItemToBackgroundAction.kt
1 package ru.deadsoftware.cavedroid.game.actions.placeblock
3 import ru.deadsoftware.cavedroid.game.GameScope
4 import ru.deadsoftware.cavedroid.game.model.item.Item
5 import ru.deadsoftware.cavedroid.game.world.GameWorld
6 import javax.inject.Inject
8 @GameScope
9 class PlaceBlockItemToBackgroundAction @Inject constructor(
10 private val gameWorld: GameWorld,
11 ) : IPlaceBlockAction {
13 override fun place(item: Item.Placeable, x: Int, y: Int) {
14 gameWorld.placeToBackground(x, y, item.block.params.id)
15 }
17 companion object {
18 const val ACTION_KEY = "place_background_block"
19 }
21 }