This commit is contained in:
2023-07-05 21:33:59 +02:00
parent 8775464c25
commit d61a491731
9 changed files with 44 additions and 26 deletions

View File

@@ -2,11 +2,18 @@ package entity
type DomainInterface interface {
Init()
GetMenuMap() MenuMap
GetMenu(name string) Menu
SetMenu(name string, menu Menu)
GetDialogMap() DialogMap
GetDialog(name string) Dialog
SetDialog(name string, menu Dialog)
GetLevels() []Level
GetLevel(index int) Level
AddToInventory(item *Item) bool
RemoveFromInventory(item *Item) bool
UseInventoryItem(item *Item) bool

View File

@@ -1,11 +1,16 @@
package entity
type KContextScreen struct {
Type string
Value string
type KContext struct {
ScreenType string
ScreenValue string
CurrentLevel int
Players []Player
}
type KContext struct {
Screen KContextScreen
CurrentLevel int
func (c *KContext) getPrimaryPlayer() Player {
return c.Players[0]
}
func (c *KContext) ScreenTypeIs(name string) bool {
return c.ScreenType == name
}