This commit is contained in:
Andrey Parhomenko 2024-01-08 12:25:18 +03:00
parent d378490396
commit 79c9da4ae1
3 changed files with 10 additions and 5 deletions

View file

@ -135,6 +135,3 @@ func (p *Player) Update(c *Context) {
}}
}
func (p *Player) Event(c *gg.Context) {
}

View file

@ -75,11 +75,13 @@ func (t *Tri) Update(c *Context) {
if t.Spawned {
break
}
counter++
tt := *t
tt.Spawned = true
tt.Visible = false
tt.Disconnect()
c.Spawn(&tt)
if c.Spawn(&tt) == nil {
counter++
}
}}
for _, event := range c.Events {

View file

@ -10,6 +10,10 @@ import (
"sync"
)
const (
LayerBufSize = 0
)
type GraphicsLibrary = ebiten.GraphicsLibrary
type RunOptions = ebiten.RunGameOptions
@ -69,6 +73,8 @@ type Engine struct {
cursorPos Vector
outerEvents, handleEvents EventChan
wg sync.WaitGroup
bufs [LayerBufSize]*Image
}
type engine Engine