Advertisement
Guest User

Untitled

a guest
Jul 24th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local rect = display.newImageRect( "rect.png", yolo, yolo)
  2.     rect.myName = "rect"
  3.     rect:setReferencePoint( display.CenterReferencePoint )
  4.     rect.x = 150 + (rect.width/2)
  5.     rect.y = sidesH + (rect.height/2)      
  6.     local rectShape = {  rect.width/2,rect.height/2,  rect.width/2, -rect.height/2, 0,0,    -rect.width/2, -rect.height/2,   -rect.width/2, rect.height/2 }
  7.     physics.addBody(rect, "dynamic", { density=1.0, bounce=0, friction=0, shape = rectShape})  
  8.     rect:setLinearVelocity (10000, 0) --100 is normal  
  9.     rect:rotate(90)
  10.  
  11.  
  12.  
  13. ---------
  14.  
  15.  
  16. local bottom = display.newImageRect( "bottom.png", levelend, sidesH)
  17.     bottom:setReferencePoint( display.BottomLeftReferencePoint )
  18.     bottom.x = 0
  19.     bottom.y = screenH - sidesH
  20.     physics.addBody( bottom, "static", { density=1.0, bounce=0, friction=0.5, isSensor = false})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement