diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-09 00:27:32 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-09 00:27:32 +0200 |
| commit | 1bae69b2fdbcf35641d5d4a403cfb6261e34297d (patch) | |
| tree | e7cb590384602e06aeaff75a930055a2f96a8811 /draw.go | |
| parent | 8216f68ff8516cebc961028f8b8a87c1684dc15a (diff) | |
Spawn units
Diffstat (limited to 'draw.go')
| -rw-r--r-- | draw.go | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -29,5 +29,15 @@ func (e *Entity) Draw(g *Game, screen *ebiten.Image) { Size: 40, }, op) } + if e.Spawn.IsEnabled { + spawnText := fmt.Sprintf("%d", len(e.Spawn.Value.Requests)) + op := &text.DrawOptions{} + op.GeoM.Translate(float64(e.Position.Value.X+5), float64(e.Position.Value.Y+70)) + op.ColorScale.ScaleWithColor(color.White) + text.Draw(screen, spawnText, &text.GoTextFace{ + Source: g.FaceSource, + Size: 40, + }, op) + } } } |
