Versions in this module Expand all Collapse all v0 v0.1.0 Dec 20, 2023 Changes in this version + const First + const Strongest + const Weakest + func CheckCollisionPath(pos general.Point, path Path) bool + type Aim int + type Enemy struct + Damage int + Image *ebiten.Image + MaxHealth int + MoneyAward int + Name string + Path Path + State EnemyState + Strengths map[general.TypeAttack]Strength + Vrms general.Coord + Weaknesses map[general.TypeAttack]Weakness + func NewEnemy(cfg *config.Enemy, path Path) *Enemy + func (e *Enemy) DealDamage(dmg int) + func (e *Enemy) DealDamageToPlayer() int + func (e *Enemy) Die() + func (e *Enemy) Draw(screen *ebiten.Image) + func (e *Enemy) FinalDamage(t general.TypeAttack, dmg int) int + func (e *Enemy) Update() + type EnemyState struct + CurrPoint int + Dead bool + FinalDamage int + Health int + PassPath bool + Pos general.Point + TimeNextPointLeft general.Frames + Vx general.Coord + Vy general.Coord + type EnemySwarm struct + CurCalls int + CurrTime general.Frames + EnemyName string + Interval general.Frames + MaxCalls int + Timeout general.Frames + func NewEnemySwarm(config *config.EnemySwarm) *EnemySwarm + func (s *EnemySwarm) Ended() bool + func (s *EnemySwarm) Update(t general.Frames) string + type GameRule []*Wave + func NewGameRule(config []config.Wave) GameRule + type Map struct + Enemies []*Enemy + Image *ebiten.Image + Path Path + Projectiles []*Projectile + Towers []*Tower + func NewMap(config *config.Map) *Map + func (m *Map) AreThereAliveEnemies() bool + func (m *Map) Draw(screen *ebiten.Image) + func (m *Map) Update() + type Path []general.Point + func (p Path) Draw(screen *ebiten.Image) + type PlayerMapState struct + Health int + Money int + func (s *PlayerMapState) Dead() bool + type PlayerState struct + LevelsComplete map[int]struct{} + func (ps *PlayerState) Valid(levels map[string]*config.Level) error + type Projectile struct + Damage int + Image *ebiten.Image + Pos general.Point + TTL general.Frames + TargetEnemy *Enemy + Type general.TypeAttack + Vrms general.Coord + Vx general.Coord + Vy general.Coord + func (p *Projectile) Draw(screen *ebiten.Image) + func (p *Projectile) EnemyHit() + func (p *Projectile) Update() + type Strength struct + DecDmg int + T general.TypeAttack + func (w Strength) DecDamage(damage int) int + type Tower struct + Chosen bool + Damage int + Image *ebiten.Image + Name string + Price int + ProjectileImage *ebiten.Image + ProjectileVrms general.Coord + Radius general.Coord + Sold bool + SpeedAttack general.Frames + State TowerState + Type general.TypeAttack + Upgrades []*Upgrade + UpgradesBought int + func NewTower(config *config.Tower, pos general.Point, path Path) *Tower + func (t *Tower) Draw(screen *ebiten.Image) + func (t *Tower) IsClicked() bool + func (t *Tower) Launch() *Projectile + func (t *Tower) TakeAim(e1 []*Enemy) + func (t *Tower) Update() + func (t *Tower) Upgrade(complete map[int]struct{}) bool + type TowerState struct + Aim *Enemy + AimType Aim + CoolDown general.Frames + IsTurnedOn bool + Pos general.Point + type UI map[string]*ebiten.Image + type Upgrade struct + DeltaDamage int + DeltaRadius general.Coord + DeltaSpeedAttack general.Frames + OpenLevel int + Price int + func NewUpgrade(config *config.Upgrade) *Upgrade + type Wave struct + Swarms []*EnemySwarm + Time general.Frames + func NewWave(config *config.Wave) *Wave + func (w *Wave) CallEnemies() []string + func (w *Wave) Ended() bool + type Weakness struct + IncDmg int + T general.TypeAttack + func (w Weakness) IncDamage(damage int) int