inventory screen skeleton

This commit is contained in:
2023-07-05 22:13:17 +02:00
parent 5e4f63aecc
commit 2ea2554f73
2 changed files with 17 additions and 1 deletions

View File

@@ -29,6 +29,9 @@ func (e *Engine) Update(screen *ebiten.Image) error {
if e.KContext.ScreenTypeIs("playground") {
e.PlaygroundUpdate()
}
if e.KContext.ScreenTypeIs("inventory") {
e.InventoryUpdate()
}
return nil
}
@@ -42,6 +45,9 @@ func (e *Engine) Draw(screen *ebiten.Image) {
if e.KContext.ScreenTypeIs("playground") {
e.PlaygroundDraw(screen)
}
if e.KContext.ScreenTypeIs("inventory") {
e.InventoryDraw(screen)
}
if e.Action3Pressed() {
os.Exit(1)
}

View File

@@ -1,6 +1,16 @@
package engine
import "game/konstructor/entity"
import (
"game/konstructor/entity"
"github.com/hajimehoshi/ebiten"
)
func (e *Engine) InventoryUpdate() {
}
func (e *Engine) InventoryDraw(screen *ebiten.Image) {
}
func (e *Engine) AddToInventory(item *entity.Item) {
e.Domain.AddToInventory(item)