add gamegit and gkplayer to teamcomponent
This commit is contained in:
parent
fa1b40b263
commit
f67c673ca7
@ -8,12 +8,14 @@
|
|||||||
|
|
||||||
import SpriteKit
|
import SpriteKit
|
||||||
import GameplayKit
|
import GameplayKit
|
||||||
|
import GameKit
|
||||||
|
|
||||||
class TeamComponent: GKComponent {
|
class TeamComponent: GKComponent {
|
||||||
let team: Team
|
let team: Team
|
||||||
let fire: SKEmitterNode
|
let fire: SKEmitterNode
|
||||||
|
let player: GKPlayer
|
||||||
|
|
||||||
init(team: Team, position: CGPoint) {
|
init(team: Team, position: CGPoint, player: GKPlayer) {
|
||||||
fire = SKEmitterNode(fileNamed: "Fire")!
|
fire = SKEmitterNode(fileNamed: "Fire")!
|
||||||
fire.zPosition = -1
|
fire.zPosition = -1
|
||||||
fire.position = position
|
fire.position = position
|
||||||
@ -29,6 +31,7 @@ class TeamComponent: GKComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.team = team
|
self.team = team
|
||||||
|
self.player = player
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user