属性'GameDelegate?'的属性'委托'不能覆盖类型为SKSceneDelegate的属性?' XCODE SWIFT SCENEKIT

时间:2016-08-19 04:34:07

标签: ios swift xcode

嘿,我有一个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?
}

enter image description here

0 个答案:

没有答案