it works
This commit is contained in:
parent
ef437c00d8
commit
75196dde75
3 changed files with 12 additions and 5 deletions
|
@ -19,6 +19,7 @@ type Collider interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Actor struct {
|
type Actor struct {
|
||||||
|
ID
|
||||||
Position image.Point
|
Position image.Point
|
||||||
Size image.Point
|
Size image.Point
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
type SolidRect struct {
|
type SolidRect struct {
|
||||||
|
ID
|
||||||
Rect image.Rectangle
|
Rect image.Rectangle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
main.go
5
main.go
|
@ -64,12 +64,17 @@ func main() {
|
||||||
&engine.GobDumper{
|
&engine.GobDumper{
|
||||||
KeyCombo: []ebiten.Key{ebiten.KeyControl, ebiten.KeyD},
|
KeyCombo: []ebiten.Key{ebiten.KeyControl, ebiten.KeyD},
|
||||||
},
|
},
|
||||||
|
&engine.Scene{
|
||||||
|
ID: "level_1",
|
||||||
|
Components: []interface{}{
|
||||||
&engine.Tilemap{
|
&engine.Tilemap{
|
||||||
ID: "terrain",
|
ID: "terrain",
|
||||||
Map: tiles,
|
Map: tiles,
|
||||||
Src: engine.ImageRef{Path: "assets/boxes.png"},
|
Src: engine.ImageRef{Path: "assets/boxes.png"},
|
||||||
TileSize: 16,
|
TileSize: 16,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
engine.PerfDisplay{},
|
engine.PerfDisplay{},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue