pastebin - collaborative debugging tool
alicesucks.kpaste.net RSS


ueoa
Posted by Anonymous on Fri 10th Dec 2010 00:59
raw | new post
view followups (newest first): ueoa by Anonymous

  1. # core classes
  2. from edu.cmu.cs.stage3.alice.core import *
  3. from edu.cmu.cs.stage3.alice.core.response import *
  4. from edu.cmu.cs.stage3.alice.core.property import *
  5.  
  6. # constants
  7. from edu.cmu.cs.stage3.alice.core.Direction import *
  8. from edu.cmu.cs.stage3.alice.core.style.TraditionalAnimationStyle import *
  9.  
  10. # misc
  11. from edu.cmu.cs.stage3.alice.authoringtool import *
  12. from edu.cmu.cs.stage3.alice.authoringtool.util import *
  13.  
  14. # image
  15. from java.awt.image import *
  16.  
  17. graphicsConfiguration = AuthoringTool.getHack().getJAliceFrame().getGraphicsConfiguration()
  18.  
  19. def setTexture(self, img):
  20.         texture = TextureMap()
  21.         texture.setImage(image)
  22.         self.propertyChanged(self.diffuseColorMap, texture)
  23.  
  24. def setImage(self, img):
  25.         self.propertyChanged(self.image, img)
  26.  
  27. TextureMap.setImage = setImage
  28. Billboard.setTexture = setTexture
  29.  
  30. def onScreen(obj):
  31.         world.bool = camera.canSee(obj, false)
  32.  
  33. '''
  34. def move(obj, direction, amount):
  35.         t = ResponsePrototype(MoveAnimation, [StringObjectPair('subject', obj),
  36.                                                 StringObjectPair('amount', amount),
  37.                                                 StringObjectPair('direction', direction),
  38.                                                 StringObjectPair('asSeenBy', camera),
  39.                                                 StringObjectPair('duration', 0),
  40.                                                 StringObjectPair('style', BEGIN_AND_END_ABRUPTLY)], [])
  41.         r = t.createNewResponse()
  42.         rr = r.manufactureRuntimeResponse()
  43.         rr.prologue(0)
  44.         rr.update(0)
  45. '''
  46.  
  47. def main():
  48.         img = graphicsConfiguration.createCompatibleImage(300, 300)
  49.         _169_18.setTexture(img)

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at