How should bit fields be declared and used in Swift?
Declaring an enum like this does work, but trying to OR 2 values together fails to compile:
enum
This worked for me.
1 << 3 //1000
enum Collision: Int { case Enemy, Projectile, Debris, Ground func bitmask() -> UInt32 { return 1 << self.rawValue } }