Merge pull request #36 from Computeiful/Autofish

Updated autofish to respawn when killed
This commit is contained in:
Tnze
2020-01-29 11:21:12 +08:00
committed by GitHub

View File

@ -33,6 +33,7 @@ func main() {
c.Events.ChatMsg = onChatMsg
c.Events.Disconnect = onDisconnect
c.Events.SoundPlay = onSound
c.Events.Die = onDeath
//JoinGame
err = c.HandleGame()
@ -41,6 +42,12 @@ func main() {
}
}
func onDeath() error {
log.Println("Died and Respawned")
c.Respawn() // If we exclude Respawn(...) then the player won't press the "Respawn" button upon death
return nil
}
func onGameStart() error {
log.Println("Game start")