Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import SpriteKit
- class GameScene: SKScene {
- var bird = SKSpriteNode()
- override func didMove(to view: SKView) {
- /* Setup your scene here */
- //Physics
- self.physicsWorld.gravity=CGVector(dx: 0.0, dy: -5.0);
- //Bird
- let BirdTextures = (imageNamed: "bird") //Expression Type(imageNamed: String) is ambiguous without more context.
- BirdTextures.filteringMode = SKTextureFilteringMode.Nearest
- bird = SKSpriteNode(texture : BirdTextures)
- bird.setScale(0.5)
- 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