PASO 6: Completemos la función add_player() . ¡Recuerde agregar un nuevo código de función debajo de la cadena de documentación!

  • Haga clic en GRÁFICOS. Ir a y coloque el Player 1 dentro de add_player() .
  • Cambia el nombre del sprite a player . Coloque el sprite del jugador en ( 0 , -155 ) .
  • Haga clic en LÓGICA. Ir a . En la última línea de main() , arrastre Function Call into Variable .
  • Cambie my_var a player y cambie la función de my_function() a add_player() .

To navigate the page using the TAB key, first press ESC to exit the code editor.

def set_stage(): """ Sets up the stage for the game """ stage.set_background("soccerfield") stage.disable_floor() def add_player(): """ Adds a player to the stage for the user to control """ def main(): """ Sets up the program and calls other functions """ set_stage() main()
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)