嘿,我有一个HUD / OverlayScene,基本上只显示按钮。所以现在我试图让这个Delegate / GameDelegate没有这个错误。请查看底部的图片
代码:
import iAd
import simd
import UIKit
import GLKit
import GameKit
import SceneKit
import StoreKit
import SpriteKit
import QuartzCore
import Foundation
import AVFoundation
import AudioToolbox
import GameController
@available(iOS 9.0, *)
extension GameViewController: GameDelegate {
func Kick() {
print("Runnnnnnnininig")
//-----Animate-Guy-----Working-Perfectly-----------
let KickAnimation = CAAnimation.animationWithSceneNamed("art.scnassets/The1Anima.dae")!
Guy.addAnimation(KickAnimation, forKey: "Go")
Guy.removeAnimationForKey("Go", fadeOutDuration: 3.0)
}
}
protocol GameDelegate {
func Kick()
}
class HUD: SKScene {
var delegate: GameDelegate?
}