- # core classes
- from edu.cmu.cs.stage3.alice.core import *
- from edu.cmu.cs.stage3.alice.core.response import *
- from edu.cmu.cs.stage3.alice.core.property import *
- # constants
- from edu.cmu.cs.stage3.alice.core.Direction import *
- from edu.cmu.cs.stage3.alice.core.style.TraditionalAnimationStyle import *
- # misc
- from edu.cmu.cs.stage3.alice.authoringtool import *
- from edu.cmu.cs.stage3.alice.authoringtool.util import *
- # image
- from java.awt.image import *
- graphicsConfiguration = AuthoringTool.getHack().getJAliceFrame().getGraphicsConfiguration()
- def setTexture(self, img):
- texture = TextureMap()
- texture.setImage(image)
- self.propertyChanged(self.diffuseColorMap, texture)
- def setImage(self, img):
- self.propertyChanged(self.image, img)
- TextureMap.setImage = setImage
- Billboard.setTexture = setTexture
- def onScreen(obj):
- world.bool = camera.canSee(obj, false)
- '''
- def move(obj, direction, amount):
- t = ResponsePrototype(MoveAnimation, [StringObjectPair('subject', obj),
- StringObjectPair('amount', amount),
- StringObjectPair('direction', direction),
- StringObjectPair('asSeenBy', camera),
- StringObjectPair('duration', 0),
- StringObjectPair('style', BEGIN_AND_END_ABRUPTLY)], [])
- r = t.createNewResponse()
- rr = r.manufactureRuntimeResponse()
- rr.prologue(0)
- rr.update(0)
- '''
- def main():
- img = graphicsConfiguration.createCompatibleImage(300, 300)
- _169_18.setTexture(img)
ueoa
Posted by Anonymous on Fri 10th Dec 2010 00:59
raw | new post
view followups (newest first): ueoa by Anonymous
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.