O GoConqr está de visual novo! Conte para nós o que você achou.

Slides

How to do the Counter

Usuário eliminado O usuário eliminou as informações de disciplina Inglês 10 slides

How to do the Counter

Slides do conjunto (10)

  1. How to code for the Counter

    • World
    • Actor
    • We are going to use the example of the a ship and Iceberg in the Ocean world.
  2. Code for the World (At the top)

    • Code for the World (At the top)
    • Legenda: This blue box is adding the counter to the world. Therefore with this reference, the world can link with the actor and the counter. BEWARE NO BRACKETS
  3. Code for the World (Near bottom)

    • Code for the World (Near bottom)
    • Legenda: This part is especially important. If this is forgotten, the counter WILL NOT WORK.
  4. Code for the Actor Class

    • Code for the Actor Class
    • Legenda: Pay attention to the pink boxes. These links to the world are important as without them, the actor will not be able to work with the counter
  5. Version 2 - Different GREENFOOT

    • This Greenfoot is for the Newer version.
  6. Key Concept

    • Key Concept
    • Legenda: This is a key concept when programming Greenfoot. This is that the various Actors and the World - using references - can communicate or talk to each other. They cannot communicate without references.
  7. IN THE WORLD

    • IN THE WORLD
    • Legenda: This is to go in the prepare section in the World. This is adding the Counter object - manually - into the world. This can be done automatically by dragging the counter where you want it and pressing "Save the World".
  8. IN THE WORLD (contd.)

    • IN THE WORLD (contd.)
    • Legenda: If you could please pay attention to the purple box. The reason the word "counter" is placed in the brackets for when the Turtle is being created is that when that is done, a reference for the counter to the turtle is being created. Now the turtle will know and recognize the counter, therefore it can tell the counter to update a score if needed, when the parameter is updated on to its own class area for coding and programming.
  9. IN THE ACTOR

    • IN THE ACTOR
    • Legenda: This makes the final reference to the Counter. The blue box is focusing on the code while the pink box is focusing on the position of the code. It is before the "act" function.
  10. IN THE ACTOR (contd.)

    • IN THE ACTOR (contd.)
    • Legenda: Please focus on the purple box. This is telling the counter to add 5 when the Actor - the turtle in this case - eats another Actor - the Lettuce.

Informações

Descrição
O usuário eliminou as informações de disciplina Slides sobre How to do the Counter, criado por Usuário eliminado em 15-09-2016.
Criado por
Usuário eliminado
Visualizações
14
Histórico
  • Criado por Leann McLeod · 3 mai 2016
  • Copiado por Leann McLeod · 15 set 2016
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?