reload
This commit is contained in:
parent
01468798d4
commit
ee687498fc
2 changed files with 9 additions and 0 deletions
Binary file not shown.
9
main.go
9
main.go
|
@ -79,6 +79,15 @@ func repl(g *engine.Game) {
|
||||||
if err := s.Save(); err != nil {
|
if err := s.Save(); err != nil {
|
||||||
log.Printf("Couldn't save %q: %v", id, err)
|
log.Printf("Couldn't save %q: %v", id, err)
|
||||||
}
|
}
|
||||||
|
case "reload":
|
||||||
|
g.Disable()
|
||||||
|
g.Hide()
|
||||||
|
if err := g.Load(game.Assets); err != nil {
|
||||||
|
log.Printf("Couldn't load: %v", err)
|
||||||
|
}
|
||||||
|
g.Prepare()
|
||||||
|
g.Enable()
|
||||||
|
g.Show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if err := sc.Err(); err != nil {
|
if err := sc.Err(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue