diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-01-15 23:03:12 +0100 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-01-15 23:03:12 +0100 |
| commit | d1e361f74e0d424b4d6a99adea1463982d9f1475 (patch) | |
| tree | 5a4cebb4c9fc09d0094c252fcb14a16d624945b2 /main.go | |
| parent | 13626410c4d6db7fdc15ded5ee7865fcdbf0b88a (diff) | |
First integration test
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -36,6 +36,7 @@ type Game struct { ResourceAmount int FaceSource *text.GoTextFaceSource UnitBuilder EntityBuilder + NowFunc func() time.Time // Components Mask []ecs.Mask // Entities []*Entity @@ -53,6 +54,9 @@ type Game struct { } func (g Game) Now() time.Time { + if g.NowFunc != nil { + return g.NowFunc() + } return time.Now() } |
