EngineWrapper, engine via interfaces

This commit is contained in:
2023-07-05 18:31:27 +02:00
parent 25b03cfd2f
commit ad30de96d9
4 changed files with 91 additions and 35 deletions

View File

@@ -0,0 +1,37 @@
package entity
type EngineInterface interface {
ClearKeyPresed()
UpPressed() bool
DownPressed() bool
RightPressed() bool
LeftPressed() bool
Action0Pressed() bool
Action1Pressed() bool
Action2Pressed() bool
Action3Pressed() bool
ScreenTypeIs(name string) bool
Update(screen any) error
Draw(screen any)
AddToInventory(item *Item)
RemoveFromInventory(item *Item)
UseInventoryItem(item *Item)
DialogDraw(screen any)
DialogUpdate()
MenuDraw(screen any)
MenuUpdate()
PlaygroundDraw(screen any)
PlaygroundUpdate()
}
type EngineOptions struct {
Engine EngineInterface
Domain DomainInterface
KContext KContext
Settings Settings
}
type EngineWrapperInterface interface {
Init(options EngineOptions)
Run()
}