From 79c9da4ae16acc43110a35df3ca7936581320985 Mon Sep 17 00:00:00 2001 From: surdeus Date: Mon, 8 Jan 2024 12:25:18 +0300 Subject: [PATCH] ... --- cmd/test/player.go | 3 --- cmd/test/trianlge.go | 6 ++++-- engine.go | 6 ++++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmd/test/player.go b/cmd/test/player.go index 5b1e5e4..38fb26b 100644 --- a/cmd/test/player.go +++ b/cmd/test/player.go @@ -135,6 +135,3 @@ func (p *Player) Update(c *Context) { }} } -func (p *Player) Event(c *gg.Context) { - -} diff --git a/cmd/test/trianlge.go b/cmd/test/trianlge.go index f1a33f8..8dcf030 100644 --- a/cmd/test/trianlge.go +++ b/cmd/test/trianlge.go @@ -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 { diff --git a/engine.go b/engine.go index 187b186..e61a74a 100644 --- a/engine.go +++ b/engine.go @@ -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