image path helper functions
This commit is contained in:
@@ -2,6 +2,10 @@ package domain
|
||||
|
||||
import "game/konstructor"
|
||||
|
||||
const (
|
||||
Level1Playground1 konstructor.PlaygroundID = "level_1_playground_1"
|
||||
)
|
||||
|
||||
func (d *Domain) InitLevel() {
|
||||
d.Levels = []konstructor.Level{
|
||||
{
|
||||
@@ -9,8 +13,9 @@ func (d *Domain) InitLevel() {
|
||||
Name: "Level I.",
|
||||
Playgrounds: []konstructor.Playground{
|
||||
{
|
||||
ID: Level1Playground1,
|
||||
Render: konstructor.Render{
|
||||
Image: "assets/images/playgrounds/level_1_playground_1.png",
|
||||
Image: konstructor.GetPlaygroundImagePath(Level1Playground1),
|
||||
},
|
||||
Platforms: []konstructor.Platform{
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ func (d *Domain) InitItemType() {
|
||||
SwordItemType: {
|
||||
ID: "sword",
|
||||
Render: konstructor.Render{
|
||||
Image: "assets/images/items/sword.png",
|
||||
Image: konstructor.GetItemTypeImagePath(SwordItemType),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ package domain
|
||||
import "game/konstructor"
|
||||
|
||||
const (
|
||||
TestNPCType konstructor.NPCTypeMapKey = "test"
|
||||
TestNPCType konstructor.NPCTypeMapKey = "test_npc"
|
||||
)
|
||||
|
||||
func (d *Domain) InitNPCType() {
|
||||
d.NPCTypeMap = konstructor.NPCTypeMap{
|
||||
TestNPCType: {
|
||||
Render: konstructor.Render{
|
||||
Image: "assets/images/npcs/test_npc.png",
|
||||
Image: konstructor.GetNPCTypeImagePath(TestNPCType),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package domain
|
||||
import "game/konstructor"
|
||||
|
||||
const (
|
||||
TestPlatformType konstructor.PlatformTypeMapKey = "test"
|
||||
TestPlatformType konstructor.PlatformTypeMapKey = "test_platform"
|
||||
)
|
||||
|
||||
func (d *Domain) InitPlatformType() {
|
||||
@@ -11,7 +11,7 @@ func (d *Domain) InitPlatformType() {
|
||||
TestPlatformType: konstructor.PlatformType{
|
||||
ID: "test_platform_type",
|
||||
Render: konstructor.Render{
|
||||
Image: "assets/images/platforms/test_platform.png",
|
||||
Image: konstructor.GetPlatformTypeImagePath(TestPlatformType),
|
||||
Width: 30,
|
||||
Height: 30,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user