Guest User

Untitled

a guest
Mar 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. import SpriteKit
  2.  
  3. class GameScene: SKScene {
  4.  
  5. var bird = SKSpriteNode()
  6.  
  7. override func didMove(to view: SKView) {
  8. /* Setup your scene here */
  9.  
  10. //Physics
  11. self.physicsWorld.gravity=CGVector(dx: 0.0, dy: -5.0);
  12.  
  13. //Bird
  14. let BirdTextures = (imageNamed: "bird") //Expression Type(imageNamed: String) is ambiguous without more context.
  15. BirdTextures.filteringMode = SKTextureFilteringMode.Nearest
  16.  
  17. bird = SKSpriteNode(texture : BirdTextures)
  18. bird.setScale(0.5)
  19. bird.position = CGPoint(x: self.frame.size.width * 0.35, y: self.frame.size.height * 0.6)
Add Comment
Please, Sign In to add comment