This commit is contained in:
Josh Deprez 2021-08-03 16:48:21 +10:00 committed by Josh Deprez
parent ef437c00d8
commit 75196dde75
3 changed files with 12 additions and 5 deletions

View file

@ -19,6 +19,7 @@ type Collider interface {
}
type Actor struct {
ID
Position image.Point
Size image.Point

View file

@ -10,6 +10,7 @@ func init() {
}
type SolidRect struct {
ID
Rect image.Rectangle
}

15
main.go
View file

@ -64,11 +64,16 @@ func main() {
&engine.GobDumper{
KeyCombo: []ebiten.Key{ebiten.KeyControl, ebiten.KeyD},
},
&engine.Tilemap{
ID: "terrain",
Map: tiles,
Src: engine.ImageRef{Path: "assets/boxes.png"},
TileSize: 16,
&engine.Scene{
ID: "level_1",
Components: []interface{}{
&engine.Tilemap{
ID: "terrain",
Map: tiles,
Src: engine.ImageRef{Path: "assets/boxes.png"},
TileSize: 16,
},
},
},
engine.PerfDisplay{},
},