Documentation ¶
Index ¶
- Constants
- Variables
- func CurrentlyReceivingInput() bool
- func DrawStaticText(txt string, font font.Face, x, y int, color color.Color, screen *ebiten.Image, ...)
- func FormatTrackName(p string) string
- func GetImage(p string) (*ebiten.Image, error)
- func GetPathFiles(p string) ([]string, error)
- func GetPolarityColor(p Polarity) color.RGBA
- func GetPolarityColorScale(p Polarity) (float64, float64, float64, float64)
- func LoadConfigurations() error
- func LoadData() error
- func ReadFile(p string) ([]byte, error)
- func ReadImage(p string) (image.Image, error)
- func ReadImagesByPrefix(prefix string) ([]image.Image, error)
- type BGMIcon
- type Button
- type Cell
- type CellKind
- type Clickable
- type Config
- type EntityConfig
- type Level
- type LevelConfig
- type MusicPlayer
- func (mp *MusicPlayer) GetAllTracks() []string
- func (mp *MusicPlayer) GetCurrentTrack() string
- func (mp *MusicPlayer) Play(s *Sound)
- func (mp *MusicPlayer) Set(p string)
- func (mp *MusicPlayer) SetVolume(v float64)
- func (mp *MusicPlayer) Stop()
- func (mp *MusicPlayer) ToggleMute()
- func (mp *MusicPlayer) Update()
- type Options
- type Polarity
- type SFXIcon
- type Sound
- type SoundPlayer
- type SpawnList
- type TextInput
- type TileSet
- type UIComponent
- type Wave
Constants ¶
View Source
const ( NegativePolarity Polarity = -1 NeutralPolarity = 0 PositivePolarity = 1 )
Variables ¶
View Source
var ( // Images for drawing lines. EmptyImage *ebiten.Image EmptySubImage *ebiten.Image // I'm sorry for violating our principles. OrbTinyImages []*ebiten.Image OrbSmallImages []*ebiten.Image OrbMediumImages []*ebiten.Image OrbLargeImages []*ebiten.Image CellWidth, CellHeight int NormalFace, BoldFace font.Face )
View Source
var Images map[string]*ebiten.Image = make(map[string]*ebiten.Image)
Images is the map of all loaded images.
View Source
var SFX = SoundPlayer{ // contains filtered or unexported fields }
Sounds is the map of all loaded sounds.
Functions ¶
func DrawStaticText ¶
func FormatTrackName ¶
func GetPathFiles ¶
func GetPolarityColor ¶
Returns raw RGB values for provided polarity
func GetPolarityColorScale ¶
Returns the scale to apply to existing color for provided polarity
func LoadConfigurations ¶
func LoadConfigurations() error
Types ¶
type BGMIcon ¶
type BGMIcon struct {
Clickable
}
func NewBGMIcon ¶
func NewBGMIcon() *BGMIcon
type Button ¶
type Button struct { Clickable OffsetX, OffsetY int // Forgive me. Active bool Bold bool Underline bool Hover bool // contains filtered or unexported fields }
type Clickable ¶
type Clickable struct {
// contains filtered or unexported fields
}
Implements UIComponent interface
type EntityConfig ¶
type EntityConfig struct { Title string Points int Health int Speed float64 Radius float64 Damage int AttackRange float64 AttackRate float64 AttackType string ProjecticleNum int ProjecticleSpeed float64 Polarity Polarity Magnetic bool MagnetStrength float64 MagnetRadius float64 Images []*ebiten.Image LossImages []*ebiten.Image VictoryImages []*ebiten.Image WalkImages []*ebiten.Image HeadImages []*ebiten.Image ColorMultiplier [3]float64 ToolbeltOrder int Description string }
var ( PlayerInit EntityConfig Player2Init EntityConfig CoreConfig EntityConfig TurretConfigs map[string]EntityConfig EnemyConfigs map[string]EntityConfig )
func NewCoreConfig ¶
func NewCoreConfig() (EntityConfig, error)
func NewEnemyConfig ¶
func NewEnemyConfig(p string) (EntityConfig, error)
func NewPlayerConfig ¶
func NewPlayerConfig(i int) (EntityConfig, error)
func NewTurretConfig ¶
func NewTurretConfig(p string) (EntityConfig, error)
func (*EntityConfig) LoadFromFile ¶
func (e *EntityConfig) LoadFromFile(p string) error
type Level ¶
type Level struct {
LevelConfig
}
type LevelConfig ¶
type LevelConfig struct { Title string Next string Tileset string Width int Height int Cells [][]Cell Waves []*Wave Points int }
func (*LevelConfig) LoadFromFile ¶
func (l *LevelConfig) LoadFromFile(p string) (err error)
type MusicPlayer ¶
type MusicPlayer struct { Muted bool // contains filtered or unexported fields }
var BGM MusicPlayer = MusicPlayer{ // contains filtered or unexported fields }
func (*MusicPlayer) GetAllTracks ¶
func (mp *MusicPlayer) GetAllTracks() []string
func (*MusicPlayer) GetCurrentTrack ¶
func (mp *MusicPlayer) GetCurrentTrack() string
func (*MusicPlayer) Play ¶
func (mp *MusicPlayer) Play(s *Sound)
func (*MusicPlayer) Set ¶
func (mp *MusicPlayer) Set(p string)
func (*MusicPlayer) SetVolume ¶
func (mp *MusicPlayer) SetVolume(v float64)
func (*MusicPlayer) Stop ¶
func (mp *MusicPlayer) Stop()
func (*MusicPlayer) ToggleMute ¶
func (mp *MusicPlayer) ToggleMute()
func (*MusicPlayer) Update ¶
func (mp *MusicPlayer) Update()
type Options ¶
type Options struct { Handshaker string `` /* 131-byte string literal not displayed */ Host string `short:"h" long:"host" description:"Directly hosting on an address"` Join string `short:"j" long:"join" description:"Directly join an address"` Search string `short:"s" long:"search" description:"Search for a given user using external handshaking"` Await bool `short:"a" long:"await" description:"Await for a player search"` Map string `short:"m" long:"map" description:"Map to start the game on" default:"001"` Name string `short:"n" long:"name" description:"Name to user in multiplayer"` Speed float64 `short:"S" long:"speed" description:"Game speed multiplier" default:"1.0"` NoMusic bool `long:"nomusic" description:"Disable in-game music"` NoSound bool `long:"nosound" description:"Disable in-game sound"` NoMenu bool `long:"nomenu" description:"Disable main menu and immediately start game"` SyncRate int `long:"syncrate" description:"How frequently in ticks network information should be synchronized" default:"100"` }
type SFXIcon ¶
type SFXIcon struct {
Clickable
}
func NewSFXIcon ¶
func NewSFXIcon() *SFXIcon
type Sound ¶
type Sound struct {
// contains filtered or unexported fields
}
type SoundPlayer ¶
type SoundPlayer struct { Muted bool // contains filtered or unexported fields }
func (*SoundPlayer) Play ¶
func (sp *SoundPlayer) Play(p string) *audio.Player
Wraps sound in SoundPlayer context to set muted and volume
func (*SoundPlayer) ToggleMute ¶
func (sp *SoundPlayer) ToggleMute()
type TextInput ¶
type TextInput struct { Clickable OnChange func(s string) // contains filtered or unexported fields }
Implements UIComponent interface
func NewTextInput ¶
type TileSet ¶
type TileSet struct { OpenPositiveImage *ebiten.Image OpenNeutralImage *ebiten.Image OpenNegativeImage *ebiten.Image BlockedImage *ebiten.Image BackgroundImages []*ebiten.Image }
func LoadTileSet ¶
type UIComponent ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.