DomainProcess skeleton

This commit is contained in:
2023-07-05 21:45:23 +02:00
parent d61a491731
commit 7864282f02
3 changed files with 21 additions and 1 deletions

7
domain/process.go Normal file
View File

@@ -0,0 +1,7 @@
package domain
import "game/konstructor/entity"
func (d *Domain) Process(options entity.DomainProcessOptions) {
}

View File

@@ -1,6 +1,8 @@
package engine
import (
"game/konstructor/entity"
"github.com/hajimehoshi/ebiten"
)
@@ -9,5 +11,9 @@ func (e *Engine) PlaygroundDraw(screen *ebiten.Image) {
}
func (e *Engine) PlaygroundUpdate() {
e.Domain.GetLevel(e.KContext.CurrentLevel)
level := e.Domain.GetLevel(e.KContext.CurrentLevel)
e.Domain.Process(entity.DomainProcessOptions{
Level: &level,
KContext: e.KContext,
})
}

View File

@@ -17,4 +17,11 @@ type DomainInterface interface {
AddToInventory(item *Item) bool
RemoveFromInventory(item *Item) bool
UseInventoryItem(item *Item) bool
Process(DomainProcessOptions)
}
type DomainProcessOptions struct {
Level *Level
KContext *KContext
}