title: Swift ios - fatal error: use of unimplemented initializer 'init(texture:color:size)'
body: <p>I have a Swift file titled Entity.swift:</p>
  
  <pre><code>import Foundation
  import SpriteKit
  import UIKit
  
  class Entity: SKSpriteNode { // possibly turn this into a protocol
      init(imageNamed: String) {
          alive = true
          health = 1
          SKSpriteNode(imageNamed: imageNamed)
          super.init()
      }
  
      var alive:Bool {
          didSet {
              if !alive {
                  self.removeFromParent()
              }
          }
      }
  
      var health:Int {
          didSet {
              if health == 0 {
                  alive = false
              }
          }
      }
  
      func modifyHealth(n: Int) {
          health += n
      }
  
      func getHealth() -&gt; Int {
          return health
      }
  
      func setHealth(h: Int) {
          health = h
      }
  
      func isAlive() -&gt; Bool {
          return alive
      }
  
      func setAlive(a: Bool) {
          alive = a
      }
  }
  </code></pre>
  
  <p>This is meant to be a superclass that other classes can implement, e.g. Enemy or Player. I considered making this a protocol since no instance of Entity will ever be made, but I want to be able to have methods in Entity. There is an error at the line <code>class Entity: SKSpriteNode {</code>: Thread 1: EXC_BAD_INSTRUCTION(code=EXC_I386_INVOP,subcode=0x0)</p>
  
  <p>The error also says: <code>spritekit_game_test/Entity.swift: 13: 7: fatal error: use of unimplemented initializer 'init(texture:color:size:)' for class 'spritekit_game_test.Entity'</code></p>
  
  <p>Any advice on what these errors mean and how to fix them? Thanks in advance.</p>