DomainProcess skeleton
This commit is contained in:
7
domain/process.go
Normal file
7
domain/process.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package domain
|
||||
|
||||
import "game/konstructor/entity"
|
||||
|
||||
func (d *Domain) Process(options entity.DomainProcessOptions) {
|
||||
|
||||
}
|
||||
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user