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)
答案 0 :(得分:0)
let BirdTextures = SKTexture(imageNamed: "bird")