class ColorRectangle: SKShapeNode {
var width: CGFloat!
var height: CGFloat!
var rectColor: UIColor!
convenience init(rectOfSize: CGSize, colorOfRe
Try changing your initializer like this:
class ColorRectangle: SKShapeNode {
var width: CGFloat!
var height: CGFloat!
var rectColor: UIColor!
convenience init(rectOfSize: CGSize, colorOfRectangle rectColor: UIColor) {
self.init()
self.init(rectOfSize: rectOfSize)
self.rectColor = rectColor
self.fillColor = rectColor
self.strokeColor = rectColor
}
}