ExpLevelConverter

Entity that contains methods needed to convert levels to exp and vice versa.

Functions

Link copied to clipboard
open fun expToFullLevel(exp: Double): Int

Converts exp to full level, dropping fractional part.

Link copied to clipboard
open fun expToLevel(exp: Double): Double

Converts exp to level, with fractional part.

Link copied to clipboard
abstract fun getExpToReachLevel(level: Int): Double

Returns how much experience you need to reach specified level or -1 if level can't be reached.

Link copied to clipboard

Returns how much experience you need to reach next after specified level or -1 if level can't be reached.

Link copied to clipboard
open fun levelToExp(level: Int): Double

Returns experience amount to reach given level from 0 exp.