doodle/pkg/enum/enum.go
Noah Petherbridge af6b8625d6 Flood Tool, Survival Mode for Azulian Tag
New features:
* Flood Tool for the editor. It replaces pixels of one color with another,
  contiguously. Has limits on how far from the original pixel it will color,
  to avoid infinite loops in case the user clicked on wide open void. The
  limit when clicking an existing color is 1200px or only a 600px limit if
  clicking into the void.
* Cheat code: 'master key' to play locked Story Mode levels.

Level GameRules feature added:
* A new tab in the Level Properties dialog
* Difficulty has been moved to this tab
* Survival Mode: for silver high score, longest time alive is better than
  fastest time, for Azulian Tag maps. Gold high score is still based on
  fastest time - find the hidden level exit without dying!

Tweaks to the Azulians' jump heights:
* Blue Azulian:  12 -> 14
* Red Azulian:   14 -> 18
* White Azulian: 16 -> 20

Bugs fixed:
* When editing your Palette to rename a color or add a new color, it wasn't
  possible to draw with that color until the editor was completely unloaded
  and reloaded; this is now fixed.
* Minor bugfix in Difficulty.String() for Peaceful (-1) difficulty to avoid
  a negative array index.
* Try and prevent user giving the same name to multiple swatches on their
  palette. Replacing the whole palette can let duplication through still.
2022-03-26 13:55:06 -07:00

46 lines
852 B
Go

// 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
)
// File extensions
const (
LevelExt = ".level"
DoodadExt = ".doodad"
LevelPackExt = ".levelpack"
)
// Responsive breakpoints for mobile friendly UIs.
const (
ScreenWidthXSmall = 400
ScreenWidthSmall = 600
ScreenWidthMedium = 800
ScreenWidthLarge = 1000
)
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{
"Peaceful",
"Normal",
"Hard",
}[d+1]
}