Physics stuff Float -> Double

Former-commit-id: 54ccee75769691aa6aaa2416767bd15270f63347
Former-commit-id: 61e892434f48adf11e3ca49b60928a930fd5cde9
This commit is contained in:
Song Minjae
2016-05-01 00:23:36 +09:00
parent fba0b80d24
commit c9f5fde3be
26 changed files with 225 additions and 291 deletions

View File

@@ -17,12 +17,12 @@ interface InventoryItem {
/**
* Weight of the item, Float
*/
var mass: Float
var mass: Double
/**
* Scale of the item. Real mass: mass * (scale^3)
*/
var scale: Float
var scale: Double
/**
* Effects applied while in pocket

View File

@@ -9,12 +9,12 @@ import org.newdawn.slick.GameContainer
class TileAsItem(tileNum: Int) : InventoryItem {
override var itemID: Int = 0
override var mass: Float = 0f
override var scale: Float = 1f
override var mass: Double = 0.0
override var scale: Double = 1.0
init {
itemID = tileNum
mass = TilePropCodex.getProp(tileNum).density / 1000f
mass = TilePropCodex.getProp(tileNum).density / 1000.0
}
override fun effectWhileInPocket(gc: GameContainer, delta_t: Int) {