mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-23 01:57:22 +00:00
Update comments
This commit is contained in:
parent
417a1fe2ab
commit
ffcdff7ab3
2 changed files with 2 additions and 4 deletions
|
|
@ -3,7 +3,6 @@ package emulator
|
|||
|
||||
import (
|
||||
"image"
|
||||
"log"
|
||||
|
||||
"github.com/giongto35/cloud-game/emulator/nes"
|
||||
)
|
||||
|
|
@ -160,7 +159,6 @@ func (view *GameView) Load(path string, extraLoadFunc func() error) {
|
|||
|
||||
func (view *GameView) UpdateEvents() {
|
||||
// If there is saving event, save and discard the save event
|
||||
log.Println(view.savingJob)
|
||||
if view.savingJob != nil {
|
||||
view.console.SaveState(view.savingJob.path)
|
||||
// Run extra function (online saving for example)
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ func (r *Room) Close() {
|
|||
func (r *Room) SaveGame() error {
|
||||
onlineSaveFunc := func() error {
|
||||
// Try to save the game to gCloud
|
||||
// TODO: Add goroutine
|
||||
if err := r.onlineStorage.SaveFile(r.director.GetHash(), r.director.GetHashPath()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -160,8 +159,9 @@ func (r *Room) SaveGame() error {
|
|||
}
|
||||
|
||||
func (r *Room) LoadGame() error {
|
||||
// TODO: Fix, because load game always come to local, this logic is unnecessary. Move to load game
|
||||
onlineLoadFunc := func() error {
|
||||
// TODO: Put in GoRoutine
|
||||
log.Println("Loading game from cloud storage")
|
||||
// If the game is not on local server
|
||||
// Try to load from gcloud
|
||||
data, err := r.onlineStorage.LoadFile(r.director.GetHash())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue