Files
LilGuy/internal/config/config.go

81 lines
1.8 KiB
Go

package config
import "image/color"
const (
ScreenWidth = 960
ScreenHeight = 540
)
type GameConfig struct {
Screen ScreenConfig
Hero HeroConfig
HUD HUDConfig
Visual VisualConfig
}
type ScreenConfig struct {
Width int
Height int
}
type HeroConfig struct {
StartX float64
StartY float64
Radius float64
Speed float64
MaxStamina float64
StaminaDrain float64
StaminaRegen float64
Color color.NRGBA
}
type HUDConfig struct {
X int
Y int
Margin int
}
type VisualConfig struct {
BackgroundColor color.NRGBA
SaveNotificationColor color.NRGBA
StaminaNormalColor color.NRGBA
StaminaLowColor color.NRGBA
FPSGoodColor color.NRGBA
FPSWarnColor color.NRGBA
FPSPoorColor color.NRGBA
}
func Default() GameConfig {
return GameConfig{
Screen: ScreenConfig{
Width: ScreenWidth,
Height: ScreenHeight,
},
Hero: HeroConfig{
StartX: ScreenWidth / 2,
StartY: ScreenHeight / 2,
Radius: 28.0,
Speed: 180.0,
MaxStamina: 100.0,
StaminaDrain: 50.0,
StaminaRegen: 30.0,
Color: color.NRGBA{R: 210, G: 220, B: 255, A: 255},
},
HUD: HUDConfig{
X: ScreenWidth - 220,
Y: 20,
Margin: 16,
},
Visual: VisualConfig{
BackgroundColor: color.NRGBA{R: 135, G: 206, B: 235, A: 255},
SaveNotificationColor: color.NRGBA{R: 50, G: 200, B: 50, A: 255},
StaminaNormalColor: color.NRGBA{R: 0, G: 255, B: 180, A: 255},
StaminaLowColor: color.NRGBA{R: 255, G: 60, B: 60, A: 255},
FPSGoodColor: color.NRGBA{R: 120, G: 255, B: 120, A: 255},
FPSWarnColor: color.NRGBA{R: 255, G: 210, B: 100, A: 255},
FPSPoorColor: color.NRGBA{R: 255, G: 120, B: 120, A: 255},
},
}
}