Updated autofish to respawn when killed
This commit is contained in:
@ -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")
|
||||
|
||||
|
Reference in New Issue
Block a user