From 7864282f02057f35492478c68bfd1089440a093f Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Wed, 5 Jul 2023 21:45:23 +0200 Subject: [PATCH] DomainProcess skeleton --- domain/process.go | 7 +++++++ konstructor/engine/screen.playground.go | 8 +++++++- konstructor/entity/entity.domain.go | 7 +++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 domain/process.go diff --git a/domain/process.go b/domain/process.go new file mode 100644 index 0000000..ab5def4 --- /dev/null +++ b/domain/process.go @@ -0,0 +1,7 @@ +package domain + +import "game/konstructor/entity" + +func (d *Domain) Process(options entity.DomainProcessOptions) { + +} diff --git a/konstructor/engine/screen.playground.go b/konstructor/engine/screen.playground.go index 168a2a3..0dcef29 100644 --- a/konstructor/engine/screen.playground.go +++ b/konstructor/engine/screen.playground.go @@ -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, + }) } diff --git a/konstructor/entity/entity.domain.go b/konstructor/entity/entity.domain.go index a1679d7..659e88b 100644 --- a/konstructor/entity/entity.domain.go +++ b/konstructor/entity/entity.domain.go @@ -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 }