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