merge entity package to konstructor
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (d *Domain) InitDialog() {
|
func (d *Domain) InitDialog() {
|
||||||
d.DialogMap = entity.DialogMap{
|
d.DialogMap = konstructor.DialogMap{
|
||||||
"TestDialog": {
|
"TestDialog": {
|
||||||
Layout: entity.DialogLayout{
|
Layout: konstructor.DialogLayout{
|
||||||
ChoiceFont: GetDefaultFontLayout(),
|
ChoiceFont: GetDefaultFontLayout(),
|
||||||
},
|
},
|
||||||
Choices: []entity.DialogChoice{
|
Choices: []konstructor.DialogChoice{
|
||||||
{
|
{
|
||||||
ID: "one",
|
ID: "one",
|
||||||
Label: "One",
|
Label: "One",
|
||||||
@@ -24,15 +24,15 @@ func (d *Domain) InitDialog() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) GetDialogMap() entity.DialogMap {
|
func (d *Domain) GetDialogMap() konstructor.DialogMap {
|
||||||
return d.DialogMap
|
return d.DialogMap
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) GetDialog(name string) entity.Dialog {
|
func (d *Domain) GetDialog(name string) konstructor.Dialog {
|
||||||
value, _ := d.DialogMap[name]
|
value, _ := d.DialogMap[name]
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) SetDialog(name string, dialog entity.Dialog) {
|
func (d *Domain) SetDialog(name string, dialog konstructor.Dialog) {
|
||||||
d.DialogMap[name] = dialog
|
d.DialogMap[name] = dialog
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Domain struct {
|
type Domain struct {
|
||||||
Context Context
|
Context Context
|
||||||
MenuMap entity.MenuMap
|
MenuMap konstructor.MenuMap
|
||||||
DialogMap entity.DialogMap
|
DialogMap konstructor.DialogMap
|
||||||
Levels []entity.Level
|
Levels []konstructor.Level
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) Init() {
|
func (d *Domain) Init() {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
"image/color"
|
"image/color"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetDefaultFontLayout() entity.FontLayout {
|
func GetDefaultFontLayout() konstructor.FontLayout {
|
||||||
return entity.FontLayout{
|
return konstructor.FontLayout{
|
||||||
Path: "assets/fonts/ArcadeClassic.ttf",
|
Path: "assets/fonts/ArcadeClassic.ttf",
|
||||||
DPI: 72,
|
DPI: 72,
|
||||||
Size: 24,
|
Size: 24,
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import "game/konstructor/entity"
|
import "game/konstructor"
|
||||||
|
|
||||||
func (d *Domain) AddToInventory(item *entity.Item) bool {
|
func (d *Domain) AddToInventory(item *konstructor.Item) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) RemoveFromInventory(item *entity.Item) bool {
|
func (d *Domain) RemoveFromInventory(item *konstructor.Item) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) UseInventoryItem(item *entity.Item) bool {
|
func (d *Domain) UseInventoryItem(item *konstructor.Item) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import "game/konstructor/entity"
|
import "game/konstructor"
|
||||||
|
|
||||||
func (d *Domain) InitLevel() {
|
func (d *Domain) InitLevel() {
|
||||||
d.Levels = []entity.Level{
|
d.Levels = []konstructor.Level{
|
||||||
{
|
{
|
||||||
ID: "level_1",
|
ID: "level_1",
|
||||||
Name: "Level I.",
|
Name: "Level I.",
|
||||||
Playgrounds: []entity.Playground{
|
Playgrounds: []konstructor.Playground{
|
||||||
{
|
{
|
||||||
Render: entity.Render{
|
Render: konstructor.Render{
|
||||||
Image: "assets/images/playgrounds/level_1_playground_1.png",
|
Image: "assets/images/playgrounds/level_1_playground_1.png",
|
||||||
},
|
},
|
||||||
Objects: []entity.Object{
|
Objects: []konstructor.Object{
|
||||||
{
|
{
|
||||||
ID: "test_object",
|
ID: "test_object",
|
||||||
Position: entity.Position{
|
Position: konstructor.Position{
|
||||||
X: 10,
|
X: 10,
|
||||||
Y: 10,
|
Y: 10,
|
||||||
Z: 0,
|
Z: 0,
|
||||||
},
|
},
|
||||||
Type: entity.ObjectType{
|
Type: konstructor.ObjectType{
|
||||||
ID: "test_object_type",
|
ID: "test_object_type",
|
||||||
Render: entity.Render{
|
Render: konstructor.Render{
|
||||||
Image: "assets/images/objects/test_object.png",
|
Image: "assets/images/objects/test_object.png",
|
||||||
Width: 30,
|
Width: 30,
|
||||||
Height: 30,
|
Height: 30,
|
||||||
@@ -31,14 +31,14 @@ func (d *Domain) InitLevel() {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "test_object2",
|
ID: "test_object2",
|
||||||
Position: entity.Position{
|
Position: konstructor.Position{
|
||||||
X: 50,
|
X: 50,
|
||||||
Y: 50,
|
Y: 50,
|
||||||
Z: 0,
|
Z: 0,
|
||||||
},
|
},
|
||||||
Type: entity.ObjectType{
|
Type: konstructor.ObjectType{
|
||||||
ID: "test_object_type",
|
ID: "test_object_type",
|
||||||
Render: entity.Render{
|
Render: konstructor.Render{
|
||||||
Image: "assets/images/objects/test_object.png",
|
Image: "assets/images/objects/test_object.png",
|
||||||
Width: 30,
|
Width: 30,
|
||||||
Height: 30,
|
Height: 30,
|
||||||
@@ -52,10 +52,10 @@ func (d *Domain) InitLevel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) GetLevels() []entity.Level {
|
func (d *Domain) GetLevels() []konstructor.Level {
|
||||||
return d.Levels
|
return d.Levels
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) GetLevel(index int) entity.Level {
|
func (d *Domain) GetLevel(index int) konstructor.Level {
|
||||||
return d.Levels[index]
|
return d.Levels[index]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,18 +2,18 @@ package domain
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (d *Domain) InitMenu() {
|
func (d *Domain) InitMenu() {
|
||||||
d.MenuMap = entity.MenuMap{
|
d.MenuMap = konstructor.MenuMap{
|
||||||
"MainMenu": {
|
"MainMenu": {
|
||||||
CurrentSelected: 0,
|
CurrentSelected: 0,
|
||||||
Layout: entity.MenuLayout{
|
Layout: konstructor.MenuLayout{
|
||||||
MenuItemFont: GetDefaultFontLayout(),
|
MenuItemFont: GetDefaultFontLayout(),
|
||||||
},
|
},
|
||||||
MenuItems: []entity.MenuItem{
|
MenuItems: []konstructor.MenuItem{
|
||||||
{
|
{
|
||||||
ID: "start",
|
ID: "start",
|
||||||
Label: "Start Game",
|
Label: "Start Game",
|
||||||
@@ -33,10 +33,10 @@ func (d *Domain) InitMenu() {
|
|||||||
},
|
},
|
||||||
"GameMenu": {
|
"GameMenu": {
|
||||||
CurrentSelected: 0,
|
CurrentSelected: 0,
|
||||||
Layout: entity.MenuLayout{
|
Layout: konstructor.MenuLayout{
|
||||||
MenuItemFont: GetDefaultFontLayout(),
|
MenuItemFont: GetDefaultFontLayout(),
|
||||||
},
|
},
|
||||||
MenuItems: []entity.MenuItem{
|
MenuItems: []konstructor.MenuItem{
|
||||||
{
|
{
|
||||||
ID: "save",
|
ID: "save",
|
||||||
Label: "Save Game",
|
Label: "Save Game",
|
||||||
@@ -52,16 +52,16 @@ func (d *Domain) InitMenu() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) GetMenuMap() entity.MenuMap {
|
func (d *Domain) GetMenuMap() konstructor.MenuMap {
|
||||||
return d.MenuMap
|
return d.MenuMap
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) GetMenu(name string) entity.Menu {
|
func (d *Domain) GetMenu(name string) konstructor.Menu {
|
||||||
value, _ := d.MenuMap[name]
|
value, _ := d.MenuMap[name]
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Domain) SetMenu(name string, menu entity.Menu) {
|
func (d *Domain) SetMenu(name string, menu konstructor.Menu) {
|
||||||
d.MenuMap[name] = menu
|
d.MenuMap[name] = menu
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package domain
|
package domain
|
||||||
|
|
||||||
import "game/konstructor/entity"
|
import "game/konstructor"
|
||||||
|
|
||||||
func (d *Domain) Process(options entity.DomainProcessArgs) {
|
func (d *Domain) Process(options konstructor.DomainProcessArgs) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Engine struct {
|
type Engine struct {
|
||||||
Domain entity.DomainInterface
|
Domain konstructor.DomainInterface
|
||||||
Settings *entity.Settings
|
Settings *konstructor.Settings
|
||||||
KContext *entity.KContext
|
KContext *konstructor.KContext
|
||||||
PressedKey ebiten.Key
|
PressedKey ebiten.Key
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,32 +20,32 @@ func (e *Engine) Layout(outsideWidth, outsideHeight int) (int, int) {
|
|||||||
|
|
||||||
func (e *Engine) Update(screen *ebiten.Image) error {
|
func (e *Engine) Update(screen *ebiten.Image) error {
|
||||||
e.WatchKeyPress()
|
e.WatchKeyPress()
|
||||||
if e.KContext.ScreenTypeIs(entity.MenuScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.MenuScreenType) {
|
||||||
e.MenuUpdate()
|
e.MenuUpdate()
|
||||||
}
|
}
|
||||||
if e.KContext.ScreenTypeIs(entity.DialogScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.DialogScreenType) {
|
||||||
e.DialogUpdate()
|
e.DialogUpdate()
|
||||||
}
|
}
|
||||||
if e.KContext.ScreenTypeIs(entity.PlaygroundScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.PlaygroundScreenType) {
|
||||||
e.PlaygroundUpdate()
|
e.PlaygroundUpdate()
|
||||||
}
|
}
|
||||||
if e.KContext.ScreenTypeIs(entity.InventoryScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.InventoryScreenType) {
|
||||||
e.InventoryUpdate()
|
e.InventoryUpdate()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Draw(screen *ebiten.Image) {
|
func (e *Engine) Draw(screen *ebiten.Image) {
|
||||||
if e.KContext.ScreenTypeIs(entity.MenuScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.MenuScreenType) {
|
||||||
e.MenuDraw(screen)
|
e.MenuDraw(screen)
|
||||||
}
|
}
|
||||||
if e.KContext.ScreenTypeIs(entity.DialogScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.DialogScreenType) {
|
||||||
e.DialogDraw(screen)
|
e.DialogDraw(screen)
|
||||||
}
|
}
|
||||||
if e.KContext.ScreenTypeIs(entity.PlaygroundScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.PlaygroundScreenType) {
|
||||||
e.PlaygroundDraw(screen)
|
e.PlaygroundDraw(screen)
|
||||||
}
|
}
|
||||||
if e.KContext.ScreenTypeIs(entity.InventoryScreenType) {
|
if e.KContext.ScreenTypeIs(konstructor.InventoryScreenType) {
|
||||||
e.InventoryDraw(screen)
|
e.InventoryDraw(screen)
|
||||||
}
|
}
|
||||||
if e.Action3Pressed() {
|
if e.Action3Pressed() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
_ "image/png"
|
_ "image/png"
|
||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (e *Engine) GetImage(render_options entity.Render) *ebiten.Image {
|
func (e *Engine) GetImage(render_options konstructor.Render) *ebiten.Image {
|
||||||
img := render_options.GetImage()
|
img := render_options.GetImage()
|
||||||
out, err := ebiten.NewImageFromImage(img, 0)
|
out, err := ebiten.NewImageFromImage(img, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
@@ -10,7 +10,7 @@ type EngineWrapper struct {
|
|||||||
Engine Engine
|
Engine Engine
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ew *EngineWrapper) Init(options entity.EngineArgs) {
|
func (ew *EngineWrapper) Init(options konstructor.EngineArgs) {
|
||||||
ew.Engine = Engine{
|
ew.Engine = Engine{
|
||||||
KContext: options.KContext,
|
KContext: options.KContext,
|
||||||
Domain: options.Domain,
|
Domain: options.Domain,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
@@ -12,14 +12,14 @@ func (e *Engine) InventoryUpdate() {
|
|||||||
func (e *Engine) InventoryDraw(screen *ebiten.Image) {
|
func (e *Engine) InventoryDraw(screen *ebiten.Image) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) AddToInventory(item *entity.Item) {
|
func (e *Engine) AddToInventory(item *konstructor.Item) {
|
||||||
e.Domain.AddToInventory(item)
|
e.Domain.AddToInventory(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) RemoveFromInventory(item *entity.Item) {
|
func (e *Engine) RemoveFromInventory(item *konstructor.Item) {
|
||||||
e.Domain.RemoveFromInventory(item)
|
e.Domain.RemoveFromInventory(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) UseInventoryItem(item *entity.Item) {
|
func (e *Engine) UseInventoryItem(item *konstructor.Item) {
|
||||||
e.Domain.UseInventoryItem(item)
|
e.Domain.UseInventoryItem(item)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/konstructor/entity"
|
"game/konstructor"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (e *Engine) PlaygroundUpdate() {
|
func (e *Engine) PlaygroundUpdate() {
|
||||||
level := e.Domain.GetLevel(e.KContext.CurrentLevel)
|
level := e.Domain.GetLevel(e.KContext.CurrentLevel)
|
||||||
e.Domain.Process(entity.DomainProcessArgs{
|
e.Domain.Process(konstructor.DomainProcessArgs{
|
||||||
Level: &level,
|
Level: &level,
|
||||||
KContext: e.KContext,
|
KContext: e.KContext,
|
||||||
})
|
})
|
||||||
@@ -38,7 +38,7 @@ func (e *Engine) PlaygroundObjectsDraw(screen *ebiten.Image) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) GetPlayground() entity.Playground {
|
func (e *Engine) GetPlayground() konstructor.Playground {
|
||||||
level := e.Domain.GetLevel(e.KContext.CurrentLevel)
|
level := e.Domain.GetLevel(e.KContext.CurrentLevel)
|
||||||
return level.Playgrounds[e.KContext.CurrentPlayground]
|
return level.Playgrounds[e.KContext.CurrentPlayground]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
import "image/color"
|
import "image/color"
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type DomainInterface interface {
|
type DomainInterface interface {
|
||||||
Init()
|
Init()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type EngineArgs struct {
|
type EngineArgs struct {
|
||||||
Domain DomainInterface
|
Domain DomainInterface
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"image/color"
|
"image/color"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type ItemType struct {
|
type ItemType struct {
|
||||||
ID string
|
ID string
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type KContext struct {
|
type KContext struct {
|
||||||
ScreenType ScreenType
|
ScreenType ScreenType
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
import "image/color"
|
import "image/color"
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type NPCType struct {
|
type NPCType struct {
|
||||||
ID string
|
ID string
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type ObjectType struct {
|
type ObjectType struct {
|
||||||
ID string
|
ID string
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type InventoryItem struct {
|
type InventoryItem struct {
|
||||||
Item Item
|
Item Item
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type Position struct {
|
type Position struct {
|
||||||
X int
|
X int
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type ScreenType string
|
type ScreenType string
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package konstructor
|
||||||
|
|
||||||
type KeyMap struct {
|
type KeyMap struct {
|
||||||
Up any
|
Up any
|
||||||
@@ -1,19 +1,15 @@
|
|||||||
package konstructor
|
package konstructor
|
||||||
|
|
||||||
import (
|
|
||||||
"game/konstructor/entity"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Konstructor struct {
|
type Konstructor struct {
|
||||||
Domain entity.DomainInterface
|
Domain DomainInterface
|
||||||
KContext *entity.KContext
|
KContext *KContext
|
||||||
Settings *entity.Settings
|
Settings *Settings
|
||||||
EngineWrapper entity.EngineWrapperInterface
|
EngineWrapper EngineWrapperInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k Konstructor) Init() {
|
func (k Konstructor) Init() {
|
||||||
k.Domain.Init()
|
k.Domain.Init()
|
||||||
k.EngineWrapper.Init(entity.EngineArgs{
|
k.EngineWrapper.Init(EngineArgs{
|
||||||
Domain: k.Domain,
|
Domain: k.Domain,
|
||||||
KContext: k.KContext,
|
KContext: k.KContext,
|
||||||
Settings: k.Settings,
|
Settings: k.Settings,
|
||||||
|
|||||||
11
main.go
11
main.go
@@ -4,7 +4,6 @@ import (
|
|||||||
"game/domain"
|
"game/domain"
|
||||||
"game/konstructor"
|
"game/konstructor"
|
||||||
"game/konstructor/engine"
|
"game/konstructor/engine"
|
||||||
"game/konstructor/entity"
|
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
@@ -13,20 +12,20 @@ func main() {
|
|||||||
k := konstructor.Konstructor{
|
k := konstructor.Konstructor{
|
||||||
EngineWrapper: &engine.EngineWrapper{},
|
EngineWrapper: &engine.EngineWrapper{},
|
||||||
Domain: &domain.Domain{},
|
Domain: &domain.Domain{},
|
||||||
KContext: &entity.KContext{
|
KContext: &konstructor.KContext{
|
||||||
ScreenType: entity.PlaygroundScreenType,
|
ScreenType: konstructor.PlaygroundScreenType,
|
||||||
ScreenValue: "MainMenu",
|
ScreenValue: "MainMenu",
|
||||||
CurrentLevel: 0,
|
CurrentLevel: 0,
|
||||||
CurrentPlayground: 0,
|
CurrentPlayground: 0,
|
||||||
},
|
},
|
||||||
Settings: &entity.Settings{
|
Settings: &konstructor.Settings{
|
||||||
Name: "Game",
|
Name: "Game",
|
||||||
Screen: &entity.ScreenSettings{
|
Screen: &konstructor.ScreenSettings{
|
||||||
Width: 320,
|
Width: 320,
|
||||||
Height: 240,
|
Height: 240,
|
||||||
Scale: 2,
|
Scale: 2,
|
||||||
},
|
},
|
||||||
KeyMap: entity.KeyMap{
|
KeyMap: konstructor.KeyMap{
|
||||||
Up: ebiten.KeyUp,
|
Up: ebiten.KeyUp,
|
||||||
Down: ebiten.KeyDown,
|
Down: ebiten.KeyDown,
|
||||||
Right: ebiten.KeyRight,
|
Right: ebiten.KeyRight,
|
||||||
|
|||||||
Reference in New Issue
Block a user