我想知道我是否可以用x,y对作为我字典的 keys
let activeSquares = Dictionary <(x: Int, y: Int), SKShapeNode>()
但我得到了一个错误:
Cannot convert the expression's type '<<error type>>' to type '$T1'
错误是:
Type '(x: Int, y: Int)?' does not conform to protocol 'Hashable'
所以我们怎样才能让它符合?