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 { type Actor struct {
ID
Position image.Point Position image.Point
Size image.Point Size image.Point

View file

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

15
main.go
View file

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