Class 4 - Methods, continued 1 Goals for Today n n n Reuse...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Methods, continued 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Goals for Today n Reuse a class-level method in multiple worlds n Use dummies to reposition the camera for different shots within a scene n Understand how an object’s position, orientation, and point of view are determined 2 MGMT 290D
Background image of page 2
Alice Tip: Reusing Your Work n Copy and paste techniques speed up development n How to use make copy to duplicate statements ¨ Right-click bar in editing area containing method ¨ Select make copy n Example using make copy ¨ Refer to my_first_method() in Toy Soldier program ¨ Copy three march() statements from first march() 3 MGMT 290D
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alice Tip: Reusing Your Work (continued) 4 MGMT 290D
Background image of page 4
Using the Clipboard n Alice clipboard ¨ Used to copy and paste all statement types ¨ Located in the events area n Using Alice clipboard in Toy Soldier program ¨ Drag doInOrder in my_first_method() to clipboard ¨ Create scene1() method ¨ Drag statement in clipboard to editing area ¨ Drop statement in the scene1() method n Only one statement may be placed in the clipboard n You can increase the number of available clipboards 5 MGMT 290D
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Using the Clipboard (continued) 6 MGMT 290D
Background image of page 6
Using the Clipboard (continued) 7 MGMT 290D
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Reusing an Object in a Different World n Alice lets you reuse objects in different worlds n Reusing operation involves save and import tasks n How to save the dragon object ¨ Rename the dragon object flappingDragon ¨ Right-click flappingDragon , select save object… ¨ Navigate to appropriate storage location in the directory ¨ Click the Save button n How to import an object into a new world ¨ Open new world and choose Import from File menu ¨ Navigate to object location and select .a2c file 8 MGMT 290D
Background image of page 8
Reusing an Object in a Different World (continued) 9 MGMT 290D
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Reusing an Object in a Different World (continued) 10 MGMT 290D
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/04/2012 for the course MGMT 290 taught by Professor Staff during the Fall '08 term at Purdue University.

Page1 / 35

Class 4 - Methods, continued 1 Goals for Today n n n Reuse...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online