Zmiany

Skocz do: nawigacji, wyszukiwania

Module 2 - The “Cat Chasing a Mouse” Project

Dodane 1407 bajtów, 20:26, 6 lip 2015
'''We ask the following question:'''
What should happen when the Mouse meets (touches) the Kitten (i.e. the Cat catches the Mouse)?
: ''Ideas will probably vary, ranging from an explosion to the Mouse being eaten. We should prompt the students to get the Mouse to think e.g. “Oh, the Kitten has caught me!” and stop. We discuss what blocks we can use in this case, in what order, and in which part of the Mouse script. We write down subsequent ideas on the board – for example: ''
 
 
 
 
'''A sample programme written down on the board:'''
 
# When the green flag has been clicked
# Always:
#* Rotate in the direction of the <mouse pointer>
#* If it <touches the Kitten>
#** Think <Oh, the Kitten has caught me!>
#** Stop the script
#* Move by 2 steps
 
 
 
 
 
 
 
 
 
===Introduction of the initial Mouse settings – entering the coordinates ===
'''Time to complete this part: about 15 minutes '''
 
'''We ask the following question: '''
Does a game character always start from the same position, or can the starting position vary?
: ''Answers may vary, but we prompt the students that in many games (e.g. Angry Birds) we always start from the same position (we have the same chance of winning). That is why it is worth entering into the script a command which will set the Mouse in a certain position after starting the programme. ''
 
 
'''Task:'''
After our explanation we ask the students to find the right blocks and add them to the Mouse script in such a way as to make the Mouse, by default, always start in the middle of the right side of the stage and look towards its centre (i.e. left).
: ''Students should find the blocks '''got to x: y:''' and '''set the direction to <90>.''' They should not find it difficult set the direction '''to the left (-90)''' – one of the additional tasks in Module I was to set the sprite facing a specific direction (up, down, left, right). ''
197
edycji