From 3b417cbe0e64a6de3f83dc8e669e865277ced2f3 Mon Sep 17 00:00:00 2001 From: Aldin Duraki Date: Tue, 5 May 2020 11:16:27 -0700 Subject: [PATCH 1/4] Minor code cleanup --- .../Components/AtkBoostSkillComponent.swift | 5 ++--- .../Components/AttackActionComponent.swift | 8 ++------ .../Components/BackgroundComponent.swift | 5 +---- GoldWars/GoldWars/Components/BaseNode.swift | 11 ++++------ .../GoldWars/Components/ButtonComponent.swift | 5 ++--- GoldWars/GoldWars/Components/ButtonNode.swift | 20 ++++++++----------- .../Components/DefBoostSkillComponent.swift | 5 ++--- .../Components/DefaultBaseComponent.swift | 3 +-- .../Components/ModalBackgroundComponent.swift | 3 +-- .../Components/ModalContentComponent.swift | 1 - .../Components/SpySkillComponent.swift | 5 ++--- .../GoldWars/Components/TeamComponent.swift | 5 +++-- GoldWars/GoldWars/Entities/Background.swift | 5 ----- GoldWars/GoldWars/Entities/Base.swift | 3 ++- GoldWars/GoldWars/Entities/Button.swift | 14 +++++-------- .../GoldWars/Entities/EntityManager.swift | 10 ++++------ GoldWars/GoldWars/Entities/Modal.swift | 6 ++---- GoldWars/GoldWars/Enums/ModalType.swift | 2 -- GoldWars/GoldWars/GameViewController.swift | 6 +++--- GoldWars/GoldWars/Scenes/GameScene.swift | 5 ----- 20 files changed, 44 insertions(+), 83 deletions(-) diff --git a/GoldWars/GoldWars/Components/AtkBoostSkillComponent.swift b/GoldWars/GoldWars/Components/AtkBoostSkillComponent.swift index febccec..a2d36b3 100644 --- a/GoldWars/GoldWars/Components/AtkBoostSkillComponent.swift +++ b/GoldWars/GoldWars/Components/AtkBoostSkillComponent.swift @@ -10,8 +10,8 @@ import GameplayKit class AtkBoostSkillComponent: GKComponent{ - let shapeNode :SKShapeNode - let labelNode :SKLabelNode + let shapeNode: SKShapeNode + let labelNode: SKLabelNode init(text: String, texture: SKTexture?, anchorPoint: CGPoint) { self.labelNode = SKLabelNode(text: text) @@ -24,7 +24,6 @@ class AtkBoostSkillComponent: GKComponent{ shapeNode.fillColor = SKColor.gray } super.init() - } required init?(coder: NSCoder) { diff --git a/GoldWars/GoldWars/Components/AttackActionComponent.swift b/GoldWars/GoldWars/Components/AttackActionComponent.swift index c627fbb..ba46e1a 100644 --- a/GoldWars/GoldWars/Components/AttackActionComponent.swift +++ b/GoldWars/GoldWars/Components/AttackActionComponent.swift @@ -6,17 +6,13 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit -class AttackActionComponent : GKComponent { +class AttackActionComponent: GKComponent { init(unitCount: Int, adjacencyList: Array, position: CGPoint) { - - super.init() - } required init?(coder: NSCoder) { @@ -25,7 +21,7 @@ class AttackActionComponent : GKComponent { func action() { - + // Not implemented yet } } diff --git a/GoldWars/GoldWars/Components/BackgroundComponent.swift b/GoldWars/GoldWars/Components/BackgroundComponent.swift index 349cf2a..7239741 100644 --- a/GoldWars/GoldWars/Components/BackgroundComponent.swift +++ b/GoldWars/GoldWars/Components/BackgroundComponent.swift @@ -6,7 +6,6 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit class BackgroundComponent: GKComponent{ @@ -21,7 +20,7 @@ class BackgroundComponent: GKComponent{ sky.name = "clouds" sky.zPosition = -1 sky.size = CGSize(width: size.width, height: size.height) - sky.position = CGPoint(x: CGFloat(i) * sky.size.width , y: (size.height / 2)) + sky.position = CGPoint(x: CGFloat(i) * sky.size.width, y: (size.height / 2)) nodes.append(sky) } super.init() @@ -36,8 +35,6 @@ class BackgroundComponent: GKComponent{ } } - - required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/GoldWars/GoldWars/Components/BaseNode.swift b/GoldWars/GoldWars/Components/BaseNode.swift index 40e27fc..00da238 100644 --- a/GoldWars/GoldWars/Components/BaseNode.swift +++ b/GoldWars/GoldWars/Components/BaseNode.swift @@ -6,23 +6,20 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import SpriteKit - class BaseNode: SKSpriteNode{ override func touchesBegan(_ touches: Set, with event: UIEvent?) { // TODO: PopUp Einheiten + Close PopUp self.run( SKAction.sequence( - [ - SKAction.resize(byWidth: 20, height: 20, duration: 0.5), - SKAction.resize(byWidth: -20, height: -20, duration: 0.5) - ] + [ + SKAction.resize(byWidth: 20, height: 20, duration: 0.5), + SKAction.resize(byWidth: -20, height: -20, duration: 0.5) + ] ) ) - } override func touchesMoved(_ touches: Set, with event: UIEvent?) { diff --git a/GoldWars/GoldWars/Components/ButtonComponent.swift b/GoldWars/GoldWars/Components/ButtonComponent.swift index 57476db..0fe059f 100644 --- a/GoldWars/GoldWars/Components/ButtonComponent.swift +++ b/GoldWars/GoldWars/Components/ButtonComponent.swift @@ -6,14 +6,13 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit class ButtonComponent: GKComponent { - var buttonNode : ButtonNode + var buttonNode: ButtonNode - init(iconName: String, text: String, position: CGPoint, isEnabled:Bool , onButtonPress: @escaping () -> ()) { + init(iconName: String, text: String, position: CGPoint, isEnabled:Bool, onButtonPress: @escaping () -> ()) { buttonNode = ButtonNode(iconName: iconName, text: text, isEnabled: isEnabled, diff --git a/GoldWars/GoldWars/Components/ButtonNode.swift b/GoldWars/GoldWars/Components/ButtonNode.swift index d1d6ad2..2ebd012 100644 --- a/GoldWars/GoldWars/Components/ButtonNode.swift +++ b/GoldWars/GoldWars/Components/ButtonNode.swift @@ -6,12 +6,11 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import SpriteKit -class ButtonNode : SKSpriteNode { +class ButtonNode: SKSpriteNode { - var isEnabled:Bool{ + var isEnabled: Bool{ didSet{ if isEnabled { self.alpha = 1 @@ -25,7 +24,7 @@ class ButtonNode : SKSpriteNode { let onButtonPress: () -> () - init(iconName: String, text: String,isEnabled:Bool, position: CGPoint, onButtonPress: @escaping () -> ()) { + init(iconName: String, text: String, isEnabled: Bool, position: CGPoint, onButtonPress: @escaping () -> ()) { self.onButtonPress = onButtonPress self.isEnabled = isEnabled let texture = SKTexture(imageNamed: "yellow_button04") @@ -33,42 +32,39 @@ class ButtonNode : SKSpriteNode { self.position = position let label = SKLabelNode(fontNamed: "Courier-Bold") - label.fontSize = 30 label.fontColor = SKColor.black - label.zPosition = 1 label.verticalAlignmentMode = .center label.text = text label.name = "label" - if !iconName.isEmpty { + if iconName.isEmpty { + label.position = CGPoint(x: 0, y: 0) + } else { label.position = CGPoint(x: size.width * 0.25, y: 0) let icon = SKSpriteNode(imageNamed: iconName) icon.position = CGPoint(x: -size.width * 0.25, y: 0) icon.zPosition = 1 self.addChild(icon) - } else { - label.position = CGPoint(x: 0, y: 0) } self.addChild(label) isUserInteractionEnabled = true } override func touchesBegan(_ touches: Set, with event: UIEvent?) { - if isEnabled { let action = SKAction.sequence( [ SKAction.scale(by: (3/4), duration: 0.3), SKAction.scale(by: (4/3), duration: 0.3), - ]) + ] + ) self.childNode(withName: "label")?.run(action) self.run(action) onButtonPress() } - } diff --git a/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift b/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift index 62b9b23..01c0aef 100644 --- a/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift +++ b/GoldWars/GoldWars/Components/DefBoostSkillComponent.swift @@ -10,8 +10,8 @@ import GameplayKit class DefBoostSkillComponent: GKComponent{ - let shapeNode :SKShapeNode - let labelNode :SKLabelNode + let shapeNode: SKShapeNode + let labelNode: SKLabelNode init(text: String, texture: SKTexture?, anchorPoint: CGPoint) { self.labelNode = SKLabelNode(text: text) @@ -24,7 +24,6 @@ class DefBoostSkillComponent: GKComponent{ shapeNode.fillColor = SKColor.gray } super.init() - } required init?(coder: NSCoder) { diff --git a/GoldWars/GoldWars/Components/DefaultBaseComponent.swift b/GoldWars/GoldWars/Components/DefaultBaseComponent.swift index f668990..715840b 100644 --- a/GoldWars/GoldWars/Components/DefaultBaseComponent.swift +++ b/GoldWars/GoldWars/Components/DefaultBaseComponent.swift @@ -6,14 +6,13 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit import SpriteKit class DefaultBaseComponent: GKComponent { var spriteNode: BaseNode - init(texture: SKTexture,position: CGPoint) { + init(texture: SKTexture, position: CGPoint) { spriteNode = BaseNode(texture: texture, size: CGSize(width: 80, height: 80)) spriteNode.position = position super.init() diff --git a/GoldWars/GoldWars/Components/ModalBackgroundComponent.swift b/GoldWars/GoldWars/Components/ModalBackgroundComponent.swift index 2d26122..e81fcf9 100644 --- a/GoldWars/GoldWars/Components/ModalBackgroundComponent.swift +++ b/GoldWars/GoldWars/Components/ModalBackgroundComponent.swift @@ -6,12 +6,11 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit import SpriteKit class ModalBackgroundComponent: GKComponent { - let spriteNode : SKSpriteNode + let spriteNode: SKSpriteNode init(anchorPoint: CGPoint) { let texture = SKTexture(imageNamed:"ModalBackground") diff --git a/GoldWars/GoldWars/Components/ModalContentComponent.swift b/GoldWars/GoldWars/Components/ModalContentComponent.swift index 7c4f803..0b1a09e 100644 --- a/GoldWars/GoldWars/Components/ModalContentComponent.swift +++ b/GoldWars/GoldWars/Components/ModalContentComponent.swift @@ -6,7 +6,6 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit import SpriteKit diff --git a/GoldWars/GoldWars/Components/SpySkillComponent.swift b/GoldWars/GoldWars/Components/SpySkillComponent.swift index d4fb374..b193de5 100644 --- a/GoldWars/GoldWars/Components/SpySkillComponent.swift +++ b/GoldWars/GoldWars/Components/SpySkillComponent.swift @@ -10,8 +10,8 @@ import GameplayKit class SpySkillComponent: GKComponent{ - let shapeNode :SKShapeNode - let labelNode :SKLabelNode + let shapeNode: SKShapeNode + let labelNode: SKLabelNode init(text: String, texture: SKTexture?, anchorPoint: CGPoint) { self.labelNode = SKLabelNode(text: text) @@ -24,7 +24,6 @@ class SpySkillComponent: GKComponent{ shapeNode.fillColor = SKColor.gray } super.init() - } required init?(coder: NSCoder) { diff --git a/GoldWars/GoldWars/Components/TeamComponent.swift b/GoldWars/GoldWars/Components/TeamComponent.swift index dc24f45..379a1cc 100644 --- a/GoldWars/GoldWars/Components/TeamComponent.swift +++ b/GoldWars/GoldWars/Components/TeamComponent.swift @@ -11,7 +11,7 @@ import GameplayKit class TeamComponent: GKComponent { let team: Team - let fire:SKEmitterNode + let fire: SKEmitterNode init(team: Team, position: CGPoint) { fire = SKEmitterNode(fileNamed: "Fire")! @@ -20,7 +20,8 @@ class TeamComponent: GKComponent { fire.name = "fire" fire.particleColorSequence = nil fire.particleColorBlendFactor = 1.0 - switch team { + + switch team { case .team1: fire.particleColor = SKColor.red case .team2: fire.particleColor = SKColor.purple case .team3: fire.particleColor = SKColor.green diff --git a/GoldWars/GoldWars/Entities/Background.swift b/GoldWars/GoldWars/Entities/Background.swift index 423168e..6cc1b74 100644 --- a/GoldWars/GoldWars/Entities/Background.swift +++ b/GoldWars/GoldWars/Entities/Background.swift @@ -6,7 +6,6 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit class Background: GKEntity { @@ -16,7 +15,6 @@ class Background: GKEntity { addComponent(BackgroundComponent(size: size)) } - override func update(deltaTime seconds: TimeInterval) { component(ofType: BackgroundComponent.self)?.update() } @@ -24,7 +22,4 @@ class Background: GKEntity { required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - - - } diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index 6ae0a10..8292bbd 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -9,7 +9,8 @@ import SpriteKit import GameplayKit -class Base : GKEntity { +class Base: GKEntity { + var unitCount: Int var adjacencyList: Array diff --git a/GoldWars/GoldWars/Entities/Button.swift b/GoldWars/GoldWars/Entities/Button.swift index e2c52e2..8ac174d 100644 --- a/GoldWars/GoldWars/Entities/Button.swift +++ b/GoldWars/GoldWars/Entities/Button.swift @@ -6,24 +6,20 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameKit -class Button : GKEntity{ - let name : String +class Button: GKEntity{ + + let name: String var isEnabled = true init(name: String, iconName: String, text: String, position: CGPoint, onButtonPress: @escaping () -> ()) { self.name = name super.init() - self.addComponent(ButtonComponent(iconName: iconName, text: text,position: position, isEnabled: isEnabled, onButtonPress: onButtonPress)) + self.addComponent(ButtonComponent(iconName: iconName, text: text, position: position, isEnabled: isEnabled, onButtonPress: onButtonPress)) } - - - + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - - } diff --git a/GoldWars/GoldWars/Entities/EntityManager.swift b/GoldWars/GoldWars/Entities/EntityManager.swift index b8d8f71..9d0758b 100644 --- a/GoldWars/GoldWars/Entities/EntityManager.swift +++ b/GoldWars/GoldWars/Entities/EntityManager.swift @@ -6,7 +6,6 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import SpriteKit import GameplayKit @@ -14,7 +13,7 @@ class EntityManager { var entities = Set() let scene: SKScene - var isModal:Bool + var isModal: Bool init(scene: SKScene) { self.scene = scene @@ -58,9 +57,8 @@ class EntityManager { scene.addChild(node) } } - - } + func remove(_ entity: GKEntity) { if let spriteNode = entity.component(ofType: DefaultBaseComponent.self)?.spriteNode { spriteNode.removeFromParent() @@ -97,11 +95,11 @@ class EntityManager { return entities.filter{$0 is Background}[0] } - func getBaseNodeByTeam(for team: Team) -> SKSpriteNode?{ + func getBaseNodeByTeam(for team: Team) -> SKSpriteNode? { return getBaseByTeam(for: team)?.component(ofType: DefaultBaseComponent.self)?.spriteNode } - func getButtonByName(buttonName:String) -> Button{ + func getButtonByName(buttonName:String) -> Button { return entities.filter{$0 is Button && ($0 as! Button).name == buttonName }[0] as! Button } } diff --git a/GoldWars/GoldWars/Entities/Modal.swift b/GoldWars/GoldWars/Entities/Modal.swift index 0d96a15..3ef701c 100644 --- a/GoldWars/GoldWars/Entities/Modal.swift +++ b/GoldWars/GoldWars/Entities/Modal.swift @@ -6,12 +6,10 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation import GameplayKit -class Modal:GKEntity{ - - +class Modal: GKEntity{ + init(modaltype: ModalType, base: Base, anchorPoint: CGPoint) { super.init() diff --git a/GoldWars/GoldWars/Enums/ModalType.swift b/GoldWars/GoldWars/Enums/ModalType.swift index 3c98a25..40bcedf 100644 --- a/GoldWars/GoldWars/Enums/ModalType.swift +++ b/GoldWars/GoldWars/Enums/ModalType.swift @@ -6,8 +6,6 @@ // Copyright © 2020 SP2. All rights reserved. // -import Foundation - enum ModalType: String{ case BaseDetails case BaseAttack diff --git a/GoldWars/GoldWars/GameViewController.swift b/GoldWars/GoldWars/GameViewController.swift index 4eed433..9fb663d 100644 --- a/GoldWars/GoldWars/GameViewController.swift +++ b/GoldWars/GoldWars/GameViewController.swift @@ -22,9 +22,9 @@ class GameViewController: UIViewController { //TODO: create dev profile or remove on delivery view.showsFPS = true view.showsNodeCount = true - - GameCenterHelper.helper.viewController = self - } + + GameCenterHelper.helper.viewController = self + } } override var shouldAutorotate: Bool { diff --git a/GoldWars/GoldWars/Scenes/GameScene.swift b/GoldWars/GoldWars/Scenes/GameScene.swift index c9f0dde..92f7819 100644 --- a/GoldWars/GoldWars/Scenes/GameScene.swift +++ b/GoldWars/GoldWars/Scenes/GameScene.swift @@ -28,7 +28,6 @@ class GameScene: SKScene{ } override func touchesEnded(_ touches: Set, with event: UIEvent?) { - guard let touch = touches.first else { return } @@ -36,9 +35,7 @@ class GameScene: SKScene{ let touchLocation = touch.location(in: self) if !isMoveTouch { - for entity in entityManager.entities { - let spriteNode = entity.component(ofType: DefaultBaseComponent.self)?.spriteNode if entityManager.isModal && entity.isMember(of: Modal.self) { @@ -48,7 +45,6 @@ class GameScene: SKScene{ child.alpha = 1 } } - } if atPoint(touchLocation) == spriteNode && !entityManager.isModal { @@ -58,7 +54,6 @@ class GameScene: SKScene{ if(child.name != "fire"){ child.alpha = 0.3 } - } entityManager.add(Modal(modaltype: .BaseDetails, base: entity as! Base, From 185358a3d5c5c78f85cf1401517c58c8d468b087 Mon Sep 17 00:00:00 2001 From: Niko Jochim Date: Wed, 6 May 2020 02:17:25 +0200 Subject: [PATCH 2/4] * Impl. basic attacking functionality * added attacking Modal --- GoldWars/GoldWars.xcodeproj/project.pbxproj | 8 +++ .../Components/ModalContentComponent.swift | 2 +- GoldWars/GoldWars/Components/SliderNode.swift | 66 ++++++++++++++++++ GoldWars/GoldWars/Entities/Base.swift | 14 ++-- .../GoldWars/Entities/EntityManager.swift | 36 ++++++++++ GoldWars/GoldWars/Entities/Modal.swift | 13 +++- GoldWars/GoldWars/Partikels/Fire.sks | Bin 7801 -> 7975 bytes GoldWars/GoldWars/Scenes/GameScene.swift | 50 +++++++++---- 8 files changed, 166 insertions(+), 23 deletions(-) create mode 100644 GoldWars/GoldWars/Components/SliderNode.swift diff --git a/GoldWars/GoldWars.xcodeproj/project.pbxproj b/GoldWars/GoldWars.xcodeproj/project.pbxproj index d28b1c8..072a1dd 100644 --- a/GoldWars/GoldWars.xcodeproj/project.pbxproj +++ b/GoldWars/GoldWars.xcodeproj/project.pbxproj @@ -36,6 +36,8 @@ 9EA3ABEB245C6DFA006BC61D /* BaseNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEA245C6DFA006BC61D /* BaseNode.swift */; }; 9EA3ABED245C8143006BC61D /* ModalBackgroundComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEC245C8143006BC61D /* ModalBackgroundComponent.swift */; }; 9EA3ABEF245C834B006BC61D /* ModalContentComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEE245C834B006BC61D /* ModalContentComponent.swift */; }; + 9EC7E48B2461FBF700396BCD /* SliderNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC7E48A2461FBF700396BCD /* SliderNode.swift */; }; + 9EC7E48D2461FE2C00396BCD /* SliderComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC7E48C2461FE2C00396BCD /* SliderComponent.swift */; }; 9EC86B9F245C88A300796EF3 /* Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC86B9E245C88A300796EF3 /* Modal.swift */; }; 9EC86BA6245C8AD000796EF3 /* ModalType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC86BA5245C8AD000796EF3 /* ModalType.swift */; }; AB1D759C245DD18100671525 /* MapProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1D759A245DD18100671525 /* MapProtocol.swift */; }; @@ -88,6 +90,8 @@ 9EA3ABEA245C6DFA006BC61D /* BaseNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNode.swift; sourceTree = ""; }; 9EA3ABEC245C8143006BC61D /* ModalBackgroundComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalBackgroundComponent.swift; sourceTree = ""; }; 9EA3ABEE245C834B006BC61D /* ModalContentComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalContentComponent.swift; sourceTree = ""; }; + 9EC7E48A2461FBF700396BCD /* SliderNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderNode.swift; sourceTree = ""; }; + 9EC7E48C2461FE2C00396BCD /* SliderComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderComponent.swift; sourceTree = ""; }; 9EC86B9E245C88A300796EF3 /* Modal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Modal.swift; sourceTree = ""; }; 9EC86BA5245C8AD000796EF3 /* ModalType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalType.swift; sourceTree = ""; }; 9ECD3699245C91F7008DEEBD /* GoldWars.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GoldWars.entitlements; sourceTree = ""; }; @@ -179,6 +183,8 @@ 9E174C85245DD91500209FF0 /* ButtonComponent.swift */, 9E174C87245DF1FF00209FF0 /* BackgroundComponent.swift */, 9E04AFAE245E2B73002D5CFC /* AttackActionComponent.swift */, + 9EC7E48A2461FBF700396BCD /* SliderNode.swift */, + 9EC7E48C2461FE2C00396BCD /* SliderComponent.swift */, ); path = Components; sourceTree = ""; @@ -374,8 +380,10 @@ AB1D759C245DD18100671525 /* MapProtocol.swift in Sources */, AB1D75A0245DEC0500671525 /* MapFactory.swift in Sources */, AB1D759D245DD18100671525 /* TwoPlayerDefaultTestMap.swift in Sources */, + 9EC7E48D2461FE2C00396BCD /* SliderComponent.swift in Sources */, ABA03DA0244BD54F00A66916 /* Base.swift in Sources */, 9E174C82245DD81D00209FF0 /* ButtonNode.swift in Sources */, + 9EC7E48B2461FBF700396BCD /* SliderNode.swift in Sources */, 9E174C84245DD8CE00209FF0 /* Button.swift in Sources */, 110360DB244B101A008610AF /* GameViewController.swift in Sources */, 110360D3244B101A008610AF /* AppDelegate.swift in Sources */, diff --git a/GoldWars/GoldWars/Components/ModalContentComponent.swift b/GoldWars/GoldWars/Components/ModalContentComponent.swift index 0b1a09e..df004a3 100644 --- a/GoldWars/GoldWars/Components/ModalContentComponent.swift +++ b/GoldWars/GoldWars/Components/ModalContentComponent.swift @@ -30,7 +30,7 @@ class ModalContentComponent: GKComponent{ self.body.fontSize = 40 self.footer = SKLabelNode(text: footer) - self.footer.position = CGPoint(x: anchorPoint.x, y: anchorPoint.y - 20) + self.footer.position = CGPoint(x: anchorPoint.x, y: anchorPoint.y - 40) self.footer.fontName = "HelveticaNeue-Bold" self.footer.fontSize = 40 super.init() diff --git a/GoldWars/GoldWars/Components/SliderNode.swift b/GoldWars/GoldWars/Components/SliderNode.swift new file mode 100644 index 0000000..93f42d2 --- /dev/null +++ b/GoldWars/GoldWars/Components/SliderNode.swift @@ -0,0 +1,66 @@ +// +// SliderNode.swift +// GoldWars +// +// Created by Niko Jochim on 05.05.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import SpriteKit + + +class SliderNode :SKNode { + + var sliderLine :SKShapeNode + var sliderKnob :SliderKnob + var width: CGFloat + + var getValue: CGFloat{ + get{ + return ((sliderKnob.position.x.rounded() - sliderKnob.min) / width) + } + } + + init(width: CGFloat, position: CGPoint) { + self.width = width + sliderLine = SKShapeNode(rectOf: CGSize(width: width, height: 8)) + sliderLine.position = position + sliderLine.fillColor = SKColor.white + sliderKnob = SliderKnob(circleOfRadius: 20) + sliderKnob.min = position.x - width / 2 + sliderKnob.max = position.x + width / 2 + sliderKnob.fillColor = SKColor.red + sliderKnob.zPosition = sliderLine.zPosition + 1 + sliderKnob.position = CGPoint(x: sliderLine.position.x, y: sliderLine.position.y + 1) + super.init() + + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +class SliderKnob: SKShapeNode { + var min = CGFloat() + var max = CGFloat() + + override func touchesMoved(_ touches: Set, with event: UIEvent?) { + + for touch in touches { + let touchLocation = touch.location(in: self.scene!) + + if self.position.x >= min - 1 && self.position.x <= max + 1{ + self.position.x = touchLocation.x + } + + if(self.position.x <= min){ + self.position.x = min + } + if(self.position.x >= max){ + self.position.x = max + } + } + } +} + diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index 8292bbd..57af8e2 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -2,7 +2,7 @@ // Base.swift // GoldWars // -// Created by Marcel Schwarz on 18.04.20. +// Created by Aldin Duraki on 18.04.20. // Copyright © 2020 SP2. All rights reserved. // @@ -13,21 +13,27 @@ class Base: GKEntity { var unitCount: Int var adjacencyList: Array + var changeOwnerShip: Bool init(position: CGPoint, team: Team! = nil) { self.unitCount = 0 self.adjacencyList = [Base]() - + self.changeOwnerShip = false super.init() addComponent(DefaultBaseComponent(texture: SKTexture(imageNamed: "Base"), position: position)) if(team != nil){ addComponent(TeamComponent(team: team!, position: position)) - self.unitCount = 100 + self.unitCount = 500 } } - + func attackBase(base: Base, units:Int) -> [GKEntity]{ + base.changeOwnerShip = true + self.unitCount -= units + base.unitCount += units + return [self, base] + } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") diff --git a/GoldWars/GoldWars/Entities/EntityManager.swift b/GoldWars/GoldWars/Entities/EntityManager.swift index 9d0758b..f10ef87 100644 --- a/GoldWars/GoldWars/Entities/EntityManager.swift +++ b/GoldWars/GoldWars/Entities/EntityManager.swift @@ -57,6 +57,10 @@ class EntityManager { scene.addChild(node) } } + if let sliderNode = entity.component(ofType: SliderComponent.self)?.sliderNode { + scene.addChild(sliderNode.sliderKnob) + scene.addChild(sliderNode.sliderLine) + } } func remove(_ entity: GKEntity) { @@ -72,9 +76,26 @@ class EntityManager { modal.body.removeFromParent() modal.footer.removeFromParent() } + if let sliderNode = entity.component(ofType: SliderComponent.self)?.sliderNode { + sliderNode.sliderKnob.removeFromParent() + sliderNode.sliderLine.removeFromParent() + } entities.remove(entity) } + func update(_ entities: [GKEntity]){ + for entity in entities { + self.entities.update(with: entity) + let base = (entity as! Base) + + if base.changeOwnerShip { + base.addComponent(TeamComponent(team: (entities[0] as! Base).component(ofType: TeamComponent.self)!.team, position: (base.component(ofType: DefaultBaseComponent.self)?.spriteNode.position)!)) + base.changeOwnerShip = false + scene.addChild(base.component(ofType: TeamComponent.self)!.fire) + } + } + + } func getBaseByTeam(for team: Team) -> GKEntity? { for entity in entities { if let teamComponent = entity.component(ofType: TeamComponent.self), @@ -91,6 +112,19 @@ class EntityManager { return entities.filter{$0 is Base && ($0 as! Base).component(ofType: TeamComponent.self)?.team == team } as! Set } + func getTeamByBase(base: Base) -> Team? { + for entity in entities { + if entity is Base && entity == base{ + for component in entity.components{ + if component is TeamComponent { + return entity.component(ofType: TeamComponent.self)!.team + } + } + } + } + return nil + } + func getBackground() -> GKEntity? { return entities.filter{$0 is Background}[0] } @@ -102,4 +136,6 @@ class EntityManager { func getButtonByName(buttonName:String) -> Button { return entities.filter{$0 is Button && ($0 as! Button).name == buttonName }[0] as! Button } + + } diff --git a/GoldWars/GoldWars/Entities/Modal.swift b/GoldWars/GoldWars/Entities/Modal.swift index 3ef701c..cdafa53 100644 --- a/GoldWars/GoldWars/Entities/Modal.swift +++ b/GoldWars/GoldWars/Entities/Modal.swift @@ -9,10 +9,12 @@ import GameplayKit class Modal: GKEntity{ + + var unitCount:Int init(modaltype: ModalType, base: Base, anchorPoint: CGPoint) { + unitCount = base.unitCount super.init() - switch modaltype{ case .BaseDetails: addComponent(ModalBackgroundComponent(anchorPoint: anchorPoint)) @@ -20,8 +22,13 @@ class Modal: GKEntity{ body: "Diese Basis enthält \(base.unitCount) Einheiten", footer: "", anchorPoint: anchorPoint)) - default: - break + case .BaseAttack: + addComponent(ModalBackgroundComponent(anchorPoint: anchorPoint)) + addComponent(SliderComponent(width: 300, position: CGPoint(x: anchorPoint.x , y: anchorPoint.y - 80))) + addComponent(ModalContentComponent(header: "Angriff", + body: "Schicke \(unitCount / 2) Einheiten", + footer: "", + anchorPoint: anchorPoint)) } } diff --git a/GoldWars/GoldWars/Partikels/Fire.sks b/GoldWars/GoldWars/Partikels/Fire.sks index 839f2cae8f73829f35c01d7837f32551fe61ec66..f25e78f0519eda7cf34d37d2aaf74a2bb8d5574a 100644 GIT binary patch delta 2304 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, with event: UIEvent?) { } @@ -79,6 +94,17 @@ class GameScene: SKScene{ } let touchLocation = touch.location(in: self) + for child in children { + if atPoint(touchLocation) == child { + child.touchesMoved(touches, with: event) + } + } + + for e in entityManager.entities{ + if let body = e.component(ofType: ModalContentComponent.self)?.body{ + body.text = "Schicke \( ((e.component(ofType: SliderComponent.self)?.sliderNode.getValue ?? 0) * CGFloat((e as! Modal).unitCount)).rounded(.up)) Einheiten " + } } + let bases = entityManager.getBasesByTeam(for: .team1) for base in bases { @@ -86,7 +112,6 @@ class GameScene: SKScene{ if !isMoveTouch { currentDraggedBasePos = base.component(ofType: DefaultBaseComponent.self)!.spriteNode.position currentDraggedBase = base - } isMoveTouch = true @@ -101,11 +126,6 @@ class GameScene: SKScene{ } } } - - - - - } override func update(_ currentTime: TimeInterval) { From 3580d5537e06773c9044ce41f9a8553008cc7cb4 Mon Sep 17 00:00:00 2001 From: Niko Jochim Date: Wed, 6 May 2020 12:57:41 +0200 Subject: [PATCH 3/4] fix SliderComponent --- GoldWars/GoldWars.xcodeproj/project.pbxproj | 8 +++---- .../GoldWars/Components/SliderComponent.swift | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 GoldWars/GoldWars/Components/SliderComponent.swift diff --git a/GoldWars/GoldWars.xcodeproj/project.pbxproj b/GoldWars/GoldWars.xcodeproj/project.pbxproj index 072a1dd..c2a5fac 100644 --- a/GoldWars/GoldWars.xcodeproj/project.pbxproj +++ b/GoldWars/GoldWars.xcodeproj/project.pbxproj @@ -36,8 +36,8 @@ 9EA3ABEB245C6DFA006BC61D /* BaseNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEA245C6DFA006BC61D /* BaseNode.swift */; }; 9EA3ABED245C8143006BC61D /* ModalBackgroundComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEC245C8143006BC61D /* ModalBackgroundComponent.swift */; }; 9EA3ABEF245C834B006BC61D /* ModalContentComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA3ABEE245C834B006BC61D /* ModalContentComponent.swift */; }; + 9EBFD7552462CF5A00E1E219 /* SliderComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EBFD7542462CF5A00E1E219 /* SliderComponent.swift */; }; 9EC7E48B2461FBF700396BCD /* SliderNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC7E48A2461FBF700396BCD /* SliderNode.swift */; }; - 9EC7E48D2461FE2C00396BCD /* SliderComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC7E48C2461FE2C00396BCD /* SliderComponent.swift */; }; 9EC86B9F245C88A300796EF3 /* Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC86B9E245C88A300796EF3 /* Modal.swift */; }; 9EC86BA6245C8AD000796EF3 /* ModalType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC86BA5245C8AD000796EF3 /* ModalType.swift */; }; AB1D759C245DD18100671525 /* MapProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1D759A245DD18100671525 /* MapProtocol.swift */; }; @@ -90,8 +90,8 @@ 9EA3ABEA245C6DFA006BC61D /* BaseNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNode.swift; sourceTree = ""; }; 9EA3ABEC245C8143006BC61D /* ModalBackgroundComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalBackgroundComponent.swift; sourceTree = ""; }; 9EA3ABEE245C834B006BC61D /* ModalContentComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalContentComponent.swift; sourceTree = ""; }; + 9EBFD7542462CF5A00E1E219 /* SliderComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliderComponent.swift; sourceTree = ""; }; 9EC7E48A2461FBF700396BCD /* SliderNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderNode.swift; sourceTree = ""; }; - 9EC7E48C2461FE2C00396BCD /* SliderComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderComponent.swift; sourceTree = ""; }; 9EC86B9E245C88A300796EF3 /* Modal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Modal.swift; sourceTree = ""; }; 9EC86BA5245C8AD000796EF3 /* ModalType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalType.swift; sourceTree = ""; }; 9ECD3699245C91F7008DEEBD /* GoldWars.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GoldWars.entitlements; sourceTree = ""; }; @@ -183,8 +183,8 @@ 9E174C85245DD91500209FF0 /* ButtonComponent.swift */, 9E174C87245DF1FF00209FF0 /* BackgroundComponent.swift */, 9E04AFAE245E2B73002D5CFC /* AttackActionComponent.swift */, + 9EBFD7542462CF5A00E1E219 /* SliderComponent.swift */, 9EC7E48A2461FBF700396BCD /* SliderNode.swift */, - 9EC7E48C2461FE2C00396BCD /* SliderComponent.swift */, ); path = Components; sourceTree = ""; @@ -380,7 +380,7 @@ AB1D759C245DD18100671525 /* MapProtocol.swift in Sources */, AB1D75A0245DEC0500671525 /* MapFactory.swift in Sources */, AB1D759D245DD18100671525 /* TwoPlayerDefaultTestMap.swift in Sources */, - 9EC7E48D2461FE2C00396BCD /* SliderComponent.swift in Sources */, + 9EBFD7552462CF5A00E1E219 /* SliderComponent.swift in Sources */, ABA03DA0244BD54F00A66916 /* Base.swift in Sources */, 9E174C82245DD81D00209FF0 /* ButtonNode.swift in Sources */, 9EC7E48B2461FBF700396BCD /* SliderNode.swift in Sources */, diff --git a/GoldWars/GoldWars/Components/SliderComponent.swift b/GoldWars/GoldWars/Components/SliderComponent.swift new file mode 100644 index 0000000..dc46145 --- /dev/null +++ b/GoldWars/GoldWars/Components/SliderComponent.swift @@ -0,0 +1,23 @@ +// +// SliderComponent.swift +// GoldWars +// +// Created by Niko Jochim on 05.05.20. +// Copyright © 2020 SP2. All rights reserved. +// + +import GameplayKit + +class SliderComponent: GKComponent { + + var sliderNode: SliderNode + + init(width: CGFloat, position: CGPoint) { + sliderNode = SliderNode(width: width, position: position) + super.init() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} From c196ba721f7652986492271b5bb60d6d93bb9034 Mon Sep 17 00:00:00 2001 From: 82joni1bif <82joni1bif@hft-stuttgart.de> Date: Thu, 7 May 2020 20:14:53 +0200 Subject: [PATCH 4/4] ... --- GoldWars/GoldWars/Entities/Base.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index 57af8e2..70fe75d 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -2,7 +2,7 @@ // Base.swift // GoldWars // -// Created by Aldin Duraki on 18.04.20. +// Created by Marcel Schwarz on 18.04.20. // Copyright © 2020 SP2. All rights reserved. //