Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. let hill = SKSpriteNode(imageNamed: "hill")
  2.  
  3.  
  4.  
  5. hill.position = CGPoint(x: 400, y: self.frame.height / 2 )
  6.  
  7.  
  8.  
  9. hill.setScale(1)
  10.  
  11. hill.physicsBody = SKPhysicsBody(rectangleOfSize: hill.size)
  12.  
  13. hill.physicsBody?.categoryBitMask = 1
  14.  
  15. hill.physicsBody?.collisionBitMask = 2
  16.  
  17. self.addChild(hill)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement