SKSpriteNode subclassing swift
问题 I have found a few posts on this but I'm still confused on how to do this. I know I have to use the "designated initializer" which is the init(texture: SKTexture!, color: UIColor!, size: CGSize). Really I won't use that anyway. I'd like to just add some properties to the sprite nodes. class Piece: SKSpriteNode { enum Type: Int { case type1 = 1, type2, type3, type4, type5 } var piecetype : Type init(texture: SKTexture!, color: UIColor!, size: CGSize) { self.piecetype = .type1 super.init