refactor constructors

viewport-stuff
Matthias 2 years ago
parent 26cbf95526
commit 11c13170bc

@ -3,14 +3,7 @@ package com.last.commit
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer.Cell
import com.badlogic.gdx.math.Rectangle
open class Wall(var gridX: Int, var gridY: Int, wallCollider: Rectangle, cell: Cell) : Collidable {
var wallCollider: Rectangle
var cell: Cell
init {
this.wallCollider = wallCollider
this.cell = cell
}
open class Wall(var gridX: Int, var gridY: Int, var wallCollider: Rectangle, var cell: Cell) : Collidable {
override fun getCollider(): Rectangle {
return wallCollider

@ -2,12 +2,6 @@ package com.last.commit.inventory
import com.badlogic.gdx.graphics.g2d.TextureRegion
class InventoryItem(name: String, texture: TextureRegion) {
val texture: TextureRegion
val name: String
class InventoryItem(val name: String, val texture: TextureRegion) {
init {
this.name = name
this.texture = texture
}
}
Loading…
Cancel
Save