Add function to button
This commit is contained in:
parent
c68ed6ea97
commit
c0153d43d4
@ -15,6 +15,7 @@ class Base: GKEntity{
|
||||
var unitCount: Int
|
||||
var hasAttackBoost = false
|
||||
var hasDefenseBoost = false
|
||||
var hasSpyBoost = false
|
||||
var adjacencyList: Array<Base>
|
||||
var changeOwnership: Bool
|
||||
var ownershipPlayer: GKPlayer?
|
||||
|
@ -56,10 +56,10 @@ class HUD: GKEntity {
|
||||
isEnabled: true,
|
||||
position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.75, y: EntityManager.gameEMInstance.scene.size.height * 0.1),
|
||||
onButtonPress: {
|
||||
print("Not implemented")
|
||||
EntityManager.gameEMInstance.getBasesByTeam(for: .team2).forEach({base in base.hasSpyBoost = true})
|
||||
GameCenterManager.sharedInstance.addAchievementProgress(identifier: "de.hft.stuttgart.ip2.goldwars.skill.first.time", increasePercentComplete: 100)
|
||||
GameCenterManager.sharedInstance.addAchievementProgress(identifier: "de.hft.stuttgart.ip2.goldwars.skill.spy.ten", increasePercentComplete: 10)
|
||||
}
|
||||
}
|
||||
)
|
||||
defSkill = SingeClickButtonNode(
|
||||
textureName: "yellow_circle",
|
||||
|
Loading…
Reference in New Issue
Block a user