tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user