animate globe on level-up

This commit is contained in:
Pyrethus 2024-01-26 13:06:42 +02:00
parent e8bed52163
commit e0cb4568a1
2 changed files with 133 additions and 18 deletions

View file

@ -8,7 +8,7 @@ object Constants {
const val MAX_LEVEL = 99
const val INVALID_LEVEL = -1
const val INVALID_XP = -1
const val GLOBE_LIFETIME = 5000L // 5 seconds
const val GLOBE_LIFETIME = 7000L // 7 seconds
const val GLOBES_Y_OFFSET = 48 // y-offset in screen space where globes are drawn
val GLOBE_BKG_COLOR: Color = Color.GRAY
const val GLOBE_BKG_SIZE = 33 // Size of the globe background
@ -20,4 +20,11 @@ object Constants {
const val MAX_GLOBES = 6 // maximum number of globes we will draw on resizable clients
const val MAX_GLOBES_SD = 3 // maximum number of globes we will draw on fixed clients
const val GLOBE_PADDING = 3 // horizontal padding between globes
const val GLOBE_TEXT_SIZE = 20 // font size of level text
const val GLOBE_TEXT_PULSES = 7 // 7 text pulses per globe lifetime, on level-up
const val GLOBE_TEXT_PULSE_LOW = 0.2F // alpha during text fade-out
const val GLOBE_TEXT_PULSE_HIGH = 0.8F // alpha during text fade-in
val GLOBE_TEXT_FG_COLOR: Color = Color.BLUE // foreground color of level text during level-up
val GLOBE_TEXT_BG_COLOR: Color = Color.BLACK // background color (outline) of text number during level-up
const val GLOBE_TEXT_OUTLINE_WIDTH = 2 // outline width
}