I'm having trouble converting my project to Swift 3. In previous version of Swift I can declare a class under GKComponentSystem like:
class EnemyMoveComponentSystem: GKComponentSystem {
}
However in swift 3 it forces me to add < GKComponent > in the end as:
class EnemyMoveComponentSystem: GKComponentSystem <GKComponent> {
func updateWithDeltaTime(seconds: TimeInterval, gameScene: GameScene) {
for component in components {
print("something")
}
}
}
But it seems that I can't access each individual component within the system like before
for component in components {
print("something")
}
The line print("something") was never triggered. How can I fix this? Any help is appreciated!