controller keymap fix, inventory skeleton
This commit is contained in:
@@ -7,4 +7,7 @@ type DomainInterface interface {
|
||||
GetDialog(name string) Dialog
|
||||
SetDialog(name string, menu Dialog)
|
||||
GetLevel(index int) Level
|
||||
AddToInventory(item *Item) bool
|
||||
RemoveFromInventory(item *Item) bool
|
||||
UseInventoryItem(item *Item) bool
|
||||
}
|
||||
|
||||
12
konstructor/entity/entity.item.go
Normal file
12
konstructor/entity/entity.item.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package entity
|
||||
|
||||
type ItemType struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
ID string
|
||||
Type ItemType
|
||||
Position Position
|
||||
}
|
||||
12
konstructor/entity/entity.npc.go
Normal file
12
konstructor/entity/entity.npc.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package entity
|
||||
|
||||
type NPCType struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
}
|
||||
|
||||
type NPC struct {
|
||||
ID string
|
||||
Type NPCType
|
||||
Position Position
|
||||
}
|
||||
12
konstructor/entity/entity.object.go
Normal file
12
konstructor/entity/entity.object.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package entity
|
||||
|
||||
type ObjectType struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
}
|
||||
|
||||
type Object struct {
|
||||
ID string
|
||||
Type ObjectType
|
||||
Position Position
|
||||
}
|
||||
18
konstructor/entity/entity.player.go
Normal file
18
konstructor/entity/entity.player.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package entity
|
||||
|
||||
type InventoryItem struct {
|
||||
Item Item
|
||||
Used bool
|
||||
Active bool
|
||||
}
|
||||
|
||||
type Inventory struct {
|
||||
Items []InventoryItem
|
||||
}
|
||||
|
||||
type Player struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
Position Position
|
||||
Inventory Inventory
|
||||
}
|
||||
@@ -7,48 +7,10 @@ type Position struct {
|
||||
}
|
||||
|
||||
type RenderOptions struct {
|
||||
Image string
|
||||
Width int
|
||||
Height int
|
||||
}
|
||||
|
||||
type ObjectType struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
}
|
||||
|
||||
type Object struct {
|
||||
ID string
|
||||
Type ObjectType
|
||||
Position Position
|
||||
}
|
||||
|
||||
type NPCType struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
}
|
||||
|
||||
type NPC struct {
|
||||
ID string
|
||||
Type NPCType
|
||||
Position Position
|
||||
}
|
||||
|
||||
type Player struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
Position Position
|
||||
}
|
||||
|
||||
type ItemType struct {
|
||||
ID string
|
||||
RenderOptions RenderOptions
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
ID string
|
||||
Type ItemType
|
||||
Position Position
|
||||
Image string
|
||||
Width int
|
||||
Height int
|
||||
Visible bool
|
||||
}
|
||||
|
||||
type Playground struct {
|
||||
|
||||
@@ -21,5 +21,5 @@ type ScreenSettings struct {
|
||||
type Settings struct {
|
||||
Name string
|
||||
Screen *ScreenSettings
|
||||
KeyMap *KeyMap
|
||||
KeyMap KeyMap
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user