This commit is contained in:
2023-11-19 14:19:34 +01:00
parent f9839a2fba
commit 58ce169cc2
4 changed files with 81 additions and 7 deletions

View File

@@ -45,6 +45,7 @@ type Game struct {
}
func (g *Game) Update() error {
g.terrain.GoDown()
return nil
}
@@ -63,8 +64,9 @@ var GameInstance *Game
func init() {
GameInstance = &Game{}
GameInstance.hero = &hero.Hero{}
GameInstance.terrain = &terrain.Terrain{}
GameInstance.hero = hero.NewHero()
GameInstance.terrain = terrain.NewTerrain()
GameInstance.hero.Walk()
}
func main() {