From ff2ffc1164b0a1d9f943564fe7a0f9b1c31b676d Mon Sep 17 00:00:00 2001 From: Simon Kellner Date: Thu, 25 Jun 2020 14:59:31 +0200 Subject: [PATCH] Add skill cooldowns and new skill button assets --- GoldWars/GoldWars.xcodeproj/project.pbxproj | 4 ++ .../atk_button.imageset/Contents.json | 21 +++++++ .../atk_button.imageset/atk_button.png | Bin 0 -> 7061 bytes .../def_button.imageset/Contents.json | 21 +++++++ .../def_button.imageset/def_button.png | Bin 0 -> 6930 bytes .../spy_button.imageset/Contents.json | 21 +++++++ .../spy_button.imageset/spy_button.png | Bin 0 -> 7852 bytes .../GoldWars/Components/SkillButtonNode.swift | 56 ++++++++++++++++++ GoldWars/GoldWars/Entities/HUD.swift | 34 +++++++---- GoldWars/GoldWars/GameCenterManager.swift | 1 - 10 files changed, 145 insertions(+), 13 deletions(-) create mode 100644 GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/Contents.json create mode 100644 GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/atk_button.png create mode 100644 GoldWars/GoldWars/Assets.xcassets/def_button.imageset/Contents.json create mode 100644 GoldWars/GoldWars/Assets.xcassets/def_button.imageset/def_button.png create mode 100644 GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/Contents.json create mode 100644 GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/spy_button.png create mode 100644 GoldWars/GoldWars/Components/SkillButtonNode.swift diff --git a/GoldWars/GoldWars.xcodeproj/project.pbxproj b/GoldWars/GoldWars.xcodeproj/project.pbxproj index 7d6a026..cd744fc 100644 --- a/GoldWars/GoldWars.xcodeproj/project.pbxproj +++ b/GoldWars/GoldWars.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ 3EBD242E245D9332003CECE7 /* Team.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EBD242D245D9332003CECE7 /* Team.swift */; }; 3F79FFE02486F7CD003F79C3 /* Explosion.sks in Resources */ = {isa = PBXBuildFile; fileRef = 3F79FFDF2486F7CD003F79C3 /* Explosion.sks */; }; 3FE19DB5246C7A22004827AB /* RoundCalculatorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE19DB4246C7A22004827AB /* RoundCalculatorService.swift */; }; + 8B9CA5F1249A3C2E00561704 /* SkillButtonNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B9CA5F0249A3C2E00561704 /* SkillButtonNode.swift */; }; 8BB6FF402472B8F000162BBD /* SingeClickButtonNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BB6FF3F2472B8F000162BBD /* SingeClickButtonNode.swift */; }; 9E0E459724796262009817A6 /* GameCenterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E0E459624796262009817A6 /* GameCenterManager.swift */; }; 9E11FF79245CD81100EED3BE /* Fire.sks in Resources */ = {isa = PBXBuildFile; fileRef = 9E11FF77245CD81100EED3BE /* Fire.sks */; }; @@ -92,6 +93,7 @@ 3EBD242D245D9332003CECE7 /* Team.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Team.swift; sourceTree = ""; }; 3F79FFDF2486F7CD003F79C3 /* Explosion.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = Explosion.sks; sourceTree = ""; }; 3FE19DB4246C7A22004827AB /* RoundCalculatorService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundCalculatorService.swift; sourceTree = ""; }; + 8B9CA5F0249A3C2E00561704 /* SkillButtonNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillButtonNode.swift; sourceTree = ""; }; 8BB6FF3F2472B8F000162BBD /* SingeClickButtonNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingeClickButtonNode.swift; sourceTree = ""; }; 9E0E459624796262009817A6 /* GameCenterManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameCenterManager.swift; sourceTree = ""; }; 9E11FF77245CD81100EED3BE /* Fire.sks */ = {isa = PBXFileReference; lastKnownFileType = file.sks; path = Fire.sks; sourceTree = ""; }; @@ -217,6 +219,7 @@ C064E9A7246C0EA50022B228 /* LabelNode.swift */, 9EC2FBA62476B1EC00ABF11F /* PlayerInfoComponent.swift */, 8BB6FF3F2472B8F000162BBD /* SingeClickButtonNode.swift */, + 8B9CA5F0249A3C2E00561704 /* SkillButtonNode.swift */, C05BB9C3247D890C00411249 /* SliderComponent.swift */, 9EC7E48A2461FBF700396BCD /* SliderNode.swift */, 9E78ACB7245CB75B00526FF7 /* TeamComponent.swift */, @@ -427,6 +430,7 @@ 9E174C8A245E1A0A00209FF0 /* Background.swift in Sources */, 8BB6FF402472B8F000162BBD /* SingeClickButtonNode.swift in Sources */, C064E9A8246C0EA50022B228 /* LabelNode.swift in Sources */, + 8B9CA5F1249A3C2E00561704 /* SkillButtonNode.swift in Sources */, 3EAD889524801B6A0048A10A /* RoundTimer.swift in Sources */, 3E67854024728368007B9DE4 /* CElements.swift in Sources */, ABA03DA0244BD54F00A66916 /* Base.swift in Sources */, diff --git a/GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/Contents.json b/GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/Contents.json new file mode 100644 index 0000000..fc47f62 --- /dev/null +++ b/GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "atk_button.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/atk_button.png b/GoldWars/GoldWars/Assets.xcassets/atk_button.imageset/atk_button.png new file mode 100644 index 0000000000000000000000000000000000000000..7b685da673af8b6ebab907f6540f7d0d2f8ba147 GIT binary patch literal 7061 zcma)BWmr^Ex1J%ClvG+mI%en|QX~fu5Ku}Qq;qIyknWB_N*xeEI){`LkZu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qf##qnBYRaKD3g9q!Cb#-+l#mr}SYiSqw@!x_^ zcPs!?`c)|OCbEhFKiQ?`gmMdrVhvi zFjN8v3sf^80s6Gj45~f@%#O$%|Jau3+kw^z6lK^^7u(X|>1f!LsTTKE{>=diiEC+zSp4CDua1 zJx(lF`qn)Dyx)HU7SJ3LXrZiOX?WL}S=$*ZZ@Pg8x7*~l+K+PFBdCrFS2RE9Xt&zH z3-;n?V@2C#`4=J=i>vNk^cZAv6-Mtwk~oyZFK^Tmu43c%P-6FmkVy)iO1WmGh(Q11 z%p1)t7dRV_>K*%$(D$^7_5{*|n#0ULnD3kvnPlw`atf$-KpwI3iHpkBWCjrNESxk! z`XaK2m`9S=&$gA2rVEifGD_p0uU;~=37l!8&2he%jOj$_otA}dHvW5iBwsU^X5&U; zMCfw$Mo%BebCaG1fiXLl_#j6{r(zL5|E)i?nI})s0!4B(8_1aI^F39b zT%@|J=uJJ$Z0E2gJz>C~CC+i&>%>B^QiqZAGaPs-+l*{Kr{}|6xXaWfl~0!pc08iE zF6|SDSr_M9LK{cvBtH9@>(olejXJ^0dp;DS$?GA1S}kE{svT)>d7sal&r+Y!Jm99> zg8a-q{aEtTqUNxsX#Df_F!OZUgq>`qv8kQ%`cU`~{RDiN@KcSX8G1vC@HC*I&BpkU?n-CR1;BEsVLDnGrKl2Y+ZCk;}iJ*?E3#dm*5Uh%Ng# zfGy*wn>+qTRrEpIMQ&2ppr)^l!W%r=Y%nI!rHHfx!ZnX;W^*RFv3AD4QxSnb_xGgy z_sP-Eq!K`9lzjskU^A6pDWj*=S;8v}stpPVnhZTP% zWKz>rKcU+laqRDsSxWPOs7+aFa!u-*FMIFS&bE&-8@lNH(U2)Z;Okjd0+pTp|Kl() bxKQfT*YHkwLLT<-r!0iJo?5kv-LwAzgnL56 literal 0 HcmV?d00001 diff --git a/GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/Contents.json b/GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/Contents.json new file mode 100644 index 0000000..9f41e34 --- /dev/null +++ b/GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "spy_button.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/spy_button.png b/GoldWars/GoldWars/Assets.xcassets/spy_button.imageset/spy_button.png new file mode 100644 index 0000000000000000000000000000000000000000..975c77aefe82af8132922d8c6df3c271fce3e420 GIT binary patch literal 7852 zcmch6WmFVUyDkhcGjw+iBi-FK)_)hXy@o-?<5%F<@+y=g(a^P;%n#N;S>O|cXDy_R)8LK^+F+T zjtWpy2_0b_UsWepH+YzzlVO;ykwch=gN!3oNs&N4MD`zmms5ZpB*e?p+g~f5D^!KNXZC_ND7Nfi10&1g+-)< zge8Q8B?W{Hl{!M;|J@$O z!ESeZGvCkV@3C_g=$*$CR)o2cm8daX6KqT65|bBMW{I9MIk9d`4BJ`K-3#jQO2Dbc z5*>Ix<}DsiD~q}(q@B(nvXlq1R2EEj%vb8o=lKJ?(*5wNT;XA%dNNiI?Yr3if?yg# zANNEMaDhnt$X15R!W{#==1i=aqAY&##4>TeP%Ep0YphY6*Ih2nP zktHRvNWH8J4n$R8ZNTV^`gh|6nowUrCIyY_aW+M7qYQt(-Eiehq=1Xo91()!eaJWV zXj{zGDmy8k|5W}9mnMtT$6FiHk#OQ3dy0GAt1>{Uxnw&1$zOhEO_LFVx6-+P&1*@I^Z|~AwVr~KA9*XSfDTbIH zG-d_+m)yFa5L_251FPe9vOCmW%I|%0w{Am5e4FeYGhRfUCxQefisokjj{DHY)p{N! z7JfYqwDjE!rLqyBnO?7SaKH*;L0R(2cvIr}TYiKo8I!trN4*pEU=<(=T zaq_vaElBcw5Ck)`1PpTK`*ubrE`;IrFq^9WO#ttIo2I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O`El(t9b*w9L{&BVLd2jyuY{Uzr&O&%*fi8h-WJd{Y@jr3GfT}0GF5$J1Gi;F^-fl0_m2oM=Yh$2U zaNp6t?*kq2k^p(#yoK0#&HFhwAfFH}v<`00`MbhOOG=}t_|3X7>>gGH)k+B(-?z2e znj`HGf6+eHoW~!76%$B1VHYhpAXJxtxyV^z+zd>ArHHgM1btO5dgfj`|Vd zILgFhzhxT4diuf+$v+~j{QobkTaP^x5%H#9e}hX<@YRvijHnl~H#{X6;wim0OZL1t zJ-SSrb+d(`FXx+zGmv%qkCL5XbX8i08xE7q`NX}=G zEb*t{>Dc4q^13ngw_JD0oRy&qU?fut8hk}6;T^6m0Ze+KI=fZ{q6+#}lrEybc0L=r zKkJ5+U9)+ydf8>nyZZ3PE+%bC{PHg)@0Uh7xAERaI_M!9M^Nz|U67M> z`|}}bv^sFH?p=Wzfp@6dcA8J2xN;O;M`qenD6gSN->xJU5)?w48*&SJH;mtX=)l8= zGgzgYTL0H@@!3x0_KhNjj_$T&HM*Dx3lYDfBY%8Jx*XJTppo$q9+yjfhs%R^f5(ws zq8K@YBt5MC_N@91unM`QhysDBRKl3isM3Th;`-=bT-EH z=0o%jm;RdfnrY!cercYlvbk%1kji5;@9Bz)K=Q1+t(t6JPMIh?jfgdZ2a_jeLs#Nt zPRM^Lo_GGm5t)`tBp;(#vZhTtwF`gKH(0pkC(SHs40M44FIUNs&vsl!9c{(0)xca~ zWTBEE0Pl5cIGL+P$zVGul2cDZ^JLPM$oBumd?k+`uuU4$etQr-q501zvzEH9TBC|> G%zpu6^)c@N literal 0 HcmV?d00001 diff --git a/GoldWars/GoldWars/Components/SkillButtonNode.swift b/GoldWars/GoldWars/Components/SkillButtonNode.swift new file mode 100644 index 0000000..069b9d5 --- /dev/null +++ b/GoldWars/GoldWars/Components/SkillButtonNode.swift @@ -0,0 +1,56 @@ +// +// SkillButtonNode.swift +// GoldWars +// +// Created by Simon Kellner on 17.06.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import SpriteKit + +class SkillButtonNode: ButtonNode { + + + var cooldownCounter = 0 + var hasCooled: Bool = false + let cooldown: Int + let displayText: String + + init(textureName: String, text: String, isEnabled: Bool, cooldown: Int, position: CGPoint, onButtonPress: @escaping () -> ()) { + self.cooldown = cooldown + self.displayText = text + super.init(textureName: textureName, text: text, isEnabled: isEnabled, position: position, onButtonPress: onButtonPress) + } + + + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + super.touchesBegan(touches, with: event) + super.isEnabled = false + self.cooldownCounter = self.cooldown + self.hasCooled = true + } + + func decreaseCooldown() { + if self.cooldownCounter <= 1 { + super.isEnabled = true + super.label.text = self.displayText + let newRoundAction = SKAction.sequence([ + SKAction.scale(by: 1.5, duration: 1), + SKAction.scale(by: 1/1.5, duration: 1), + ]) + if hasCooled { + self.run(newRoundAction) + self.hasCooled = false + } + } else { + super.isEnabled = false + self.cooldownCounter -= 1 + super.label.text = self.cooldownCounter.description + } + } + + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} diff --git a/GoldWars/GoldWars/Entities/HUD.swift b/GoldWars/GoldWars/Entities/HUD.swift index 54793d5..659215d 100644 --- a/GoldWars/GoldWars/Entities/HUD.swift +++ b/GoldWars/GoldWars/Entities/HUD.swift @@ -18,9 +18,9 @@ class HUD: GKEntity { var peerLabel:SKLabelNode var peerUnitsLabel:SKLabelNode - var spySkill: SingeClickButtonNode - var defSkill: SingeClickButtonNode - var atkSkill: SingeClickButtonNode + var spySkill: SkillButtonNode + var defSkill: SkillButtonNode + var atkSkill: SkillButtonNode var roundTimerLabel: SKLabelNode let roundTimer: RoundTimer @@ -50,11 +50,12 @@ class HUD: GKEntity { self.roundTimer = RoundTimer() - spySkill = SingeClickButtonNode( - textureName: "yellow_circle", + spySkill = SkillButtonNode( + textureName: "spy_button", text: "Spy", isEnabled: true, - position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.75, y: EntityManager.gameEMInstance.scene.size.height * 0.1), + cooldown: 3, + position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.80, y: EntityManager.gameEMInstance.scene.size.height * 0.1), onButtonPress: { EntityManager.gameEMInstance.getOpponentBases(for: EntityManager.gameEMInstance.getTeam()).forEach({base in base.component(ofType: TeamComponent.self)?.unitcountLabel.text = "\(base.unitCount)"}) GameCenterManager.sharedInstance.addAchievementProgress(identifier: "de.hft.stuttgart.ip2.goldwars.skill.first.time", increasePercentComplete: 100) @@ -62,11 +63,12 @@ class HUD: GKEntity { SoundManager.sharedInstance.playSoundEffect(pathToFile: "use_boost",fileExtension: "wav", volumeLevel: 0.0) } ) - defSkill = SingeClickButtonNode( - textureName: "yellow_circle", + defSkill = SkillButtonNode( + textureName: "def_button", text: "Def", isEnabled: true, - position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.85, y: EntityManager.gameEMInstance.scene.size.height * 0.1), + cooldown: 4, + position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.90, y: EntityManager.gameEMInstance.scene.size.height * 0.1), onButtonPress: { DataService.sharedInstance.localRoundData.hasDefenceBoost = true GameCenterManager.sharedInstance.addAchievementProgress(identifier: "de.hft.stuttgart.ip2.goldwars.skill.first.time", increasePercentComplete: 100) @@ -74,11 +76,12 @@ class HUD: GKEntity { SoundManager.sharedInstance.playSoundEffect(pathToFile: "use_boost",fileExtension: "wav",volumeLevel: 0.0) } ) - atkSkill = SingeClickButtonNode( - textureName: "yellow_circle", + atkSkill = SkillButtonNode( + textureName: "atk_button", text: "Atk", isEnabled: true, - position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.95, y: EntityManager.gameEMInstance.scene.size.height * 0.1), + cooldown: 4, + position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.70, y: EntityManager.gameEMInstance.scene.size.height * 0.1), onButtonPress: { DataService.sharedInstance.localRoundData.hasAttackBoost = true GameCenterManager.sharedInstance.addAchievementProgress(identifier: "de.hft.stuttgart.ip2.goldwars.skill.first.time", increasePercentComplete: 100) @@ -190,5 +193,12 @@ class HUD: GKEntity { ]) currentRoundLabel.run(newRoundAction) SoundManager.sharedInstance.playSoundEffect(pathToFile: "new_round", fileExtension: "wav", volumeLevel: 0.0) + self.decreaseSkillRoundCooldownCounter() + } + + func decreaseSkillRoundCooldownCounter() { + self.spySkill.decreaseCooldown() + self.atkSkill.decreaseCooldown() + self.defSkill.decreaseCooldown() } } diff --git a/GoldWars/GoldWars/GameCenterManager.swift b/GoldWars/GoldWars/GameCenterManager.swift index a29fdd2..f3b15df 100644 --- a/GoldWars/GoldWars/GameCenterManager.swift +++ b/GoldWars/GoldWars/GameCenterManager.swift @@ -100,7 +100,6 @@ final class GameCenterManager: NSObject, GKMatchmakerViewControllerDelegate, GKG GKAchievement.loadAchievements { (achievements: [GKAchievement]?, err: Error?) in var achievementExists: Bool = false achievements?.forEach({ (achievement: GKAchievement) in - print(achievement.identifier) if achievement.identifier == identifier { achievementExists = true achievement.percentComplete += increasePercentComplete