In Fast and Furri-ous,
the petMove()
function is defined with brackets().
Why aren’t the brackets used in the function call pet.on("spawn", petMove)
as well? I realize there is no parameter being passed to it, but… why?
# Benutze einen Ereignisbehandler damit hero und pet beide zur gleichen Zeit laufen.
def petMove():
pet.moveXY(50, 21)
# Benutze pet.on("spawn", petMove) anstelle von petMove().
# So werden Dein hero und pet zur gleichen Zeit laufen.
pet.on("spawn", petMove)# Ersetze dies mit pet.on("spawn", petMove)
hero.moveXY(50, 12)