70 lines
1.3 KiB
Go
70 lines
1.3 KiB
Go
package domain
|
|
|
|
import "game/konstructor"
|
|
|
|
func (d *Domain) InitLevel() {
|
|
d.Levels = []konstructor.Level{
|
|
{
|
|
ID: "level_1",
|
|
Name: "Level I.",
|
|
Playgrounds: []konstructor.Playground{
|
|
{
|
|
Render: konstructor.Render{
|
|
Image: "assets/images/playgrounds/level_1_playground_1.png",
|
|
},
|
|
Objects: []konstructor.Object{
|
|
{
|
|
ID: "test_object",
|
|
Position: konstructor.Position{
|
|
X: 10,
|
|
Y: 10,
|
|
Z: 0,
|
|
},
|
|
Type: d.GetObjectType(TestObjectType),
|
|
},
|
|
{
|
|
ID: "test_object2",
|
|
Position: konstructor.Position{
|
|
X: 50,
|
|
Y: 50,
|
|
Z: 0,
|
|
},
|
|
Type: d.GetObjectType(TestObjectType),
|
|
},
|
|
},
|
|
Items: []konstructor.Item{
|
|
{
|
|
ID: "sword_1",
|
|
Position: konstructor.Position{
|
|
X: 100,
|
|
Y: 100,
|
|
Z: 0,
|
|
},
|
|
Type: d.GetItemType(SwordItemType),
|
|
},
|
|
},
|
|
NPCs: []konstructor.NPC{
|
|
{
|
|
ID: "test_npc_1",
|
|
Position: konstructor.Position{
|
|
X: 220,
|
|
Y: 180,
|
|
Z: 0,
|
|
},
|
|
Type: d.GetNPCType(TestNPCType),
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
func (d *Domain) GetLevels() []konstructor.Level {
|
|
return d.Levels
|
|
}
|
|
|
|
func (d *Domain) GetLevel(index int) konstructor.Level {
|
|
return d.Levels[index]
|
|
}
|