02-03-PY-under-the-stars.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. Ninjas will use their knowledge of the GDP, GDP objects, and the spin function to create their own scene.
  3. New Vocabulary and Concepts
  4. * GDP Asset Library
  5. * Negative Numbers
  6. Reinforced Vocabulary and Concepts
  7. * Functions and Parameters
  8. * GDP Objects and Properties
  9. * GDP spin() function
  10. * Object Names and Renaming
  11. Sensei Notes
  12. * The Ninja needs to demonstrate mastery of the GDP by creating a scene from scratch.
  13. * There are a lot of Ninja characters, backgrounds, and other images in the GDP Assets that can be accessed
  14. by clicking on the magnifying glass on the bottom white bar.
  15. * The Ninja should compose a scene to the best of their ability.
  16. * Encourage them to experiment with changing shape properties.
  17. * Stress the importance of knowing the name of each object. Step 3 shows how to rename an object.
  18. Solution Steps
  19. 1 Make sure the Ninja opens the correct scene.
  20. 2 Encourage the Ninja to be creative within the bounds of the activity. The end goal is to use the spin function
  21. on their own game objects. Changing the offset of an object will drastically change how the object responds
  22. to the spin function. By using an offset, you can simulate shooting stars. Encourage them create complex
  23. items out of the simple shapes. For example, a telescope can be made from rectangles for the legs, an ellipse
  24. for the body, and a circle for the lens.
  25. 3 The GDP gives generic names with numbers to all new objects. Help the Ninja pick appropriate names.
  26. 4 Make sure the Ninja is coding in the scene's Update Every Frame event. If they coded somewhere else, help
  27. them copy and paste the code into the correct location. Because they will be adding to the scene, it is easy
  28. to lose track of what object is selected. Point out that the name of the selected object is always directly
  29. under the Events tab. If the Ninjas have a hard time understanding a negative number, help them write the
  30. code and then ask them what changed.
  31. 5 Before the Ninjas submit their scene, verify that they have used the spin function properly on at least two
  32. objects. Ask them what a negative number does to the spin direction of an object.
  33. */
  34. //All Ninja scripts for this activity should be unique. At minimum, there should be two spin functions. One
  35. //function should have a positive spin rate and the other should have a negative spin rate.
  36. spin(firstObject, 48);
  37. spin(secondObject,-330);
  38. /**
  39. Sensei Stops
  40. 5 Tell a Sensei how you created your scene. Did you use any GDP assets? How did you change the properties?
  41. Explain how you used the spin function.
  42. This is the last activity before new computer science concepts and GDP functions are introduced. Ensure
  43. that the Ninja can explain in their own words what they have learned up to this point.
  44. */