2018-09-25 16:40:34 +00:00
|
|
|
// Package enum defines all the little enum types used throughout Doodle.
|
|
|
|
package enum
|
|
|
|
|
|
|
|
// DrawingType tells the EditorScene whether the currently open drawing is
|
|
|
|
// a Level or a Doodad.
|
|
|
|
type DrawingType int
|
|
|
|
|
|
|
|
// EditorType values.
|
|
|
|
const (
|
|
|
|
LevelDrawing DrawingType = iota
|
|
|
|
DoodadDrawing
|
|
|
|
)
|
2018-10-19 20:31:58 +00:00
|
|
|
|
|
|
|
// File extensions
|
|
|
|
const (
|
2021-12-24 05:11:45 +00:00
|
|
|
LevelExt = ".level"
|
|
|
|
DoodadExt = ".doodad"
|
|
|
|
LevelPackExt = ".levelpack"
|
2018-10-19 20:31:58 +00:00
|
|
|
)
|
2021-12-31 00:31:45 +00:00
|
|
|
|
|
|
|
// Responsive breakpoints for mobile friendly UIs.
|
|
|
|
const (
|
|
|
|
ScreenWidthXSmall = 400
|
|
|
|
ScreenWidthSmall = 600
|
|
|
|
ScreenWidthMedium = 800
|
|
|
|
ScreenWidthLarge = 1000
|
|
|
|
)
|
2022-03-07 06:16:09 +00:00
|
|
|
|
|
|
|
type Difficulty int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// The zero value is the default (Normal) so is b/w compatible with
|
|
|
|
// level files pre-difficulty setting.
|
|
|
|
Peaceful Difficulty = iota - 1
|
|
|
|
Normal
|
|
|
|
Hard
|
|
|
|
)
|
|
|
|
|
|
|
|
func (d Difficulty) String() string {
|
|
|
|
return []string{
|
2022-03-26 20:55:06 +00:00
|
|
|
"Peaceful",
|
2022-03-07 06:16:09 +00:00
|
|
|
"Normal",
|
|
|
|
"Hard",
|
2022-03-26 20:55:06 +00:00
|
|
|
}[d+1]
|
2022-03-07 06:16:09 +00:00
|
|
|
}
|