From 4e8b42d81cad996a93058493db863c31450a8fd5 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Wed, 10 Jun 2020 14:58:32 +0200 Subject: [PATCH] Fix warning while casting entity to base --- GoldWars/GoldWars/Scenes/GameScene.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GoldWars/GoldWars/Scenes/GameScene.swift b/GoldWars/GoldWars/Scenes/GameScene.swift index 3158ca6..9bb380c 100644 --- a/GoldWars/GoldWars/Scenes/GameScene.swift +++ b/GoldWars/GoldWars/Scenes/GameScene.swift @@ -86,7 +86,7 @@ class GameScene: SKScene{ if let baseEntity = entity as? Base { if baseEntity.ownershipPlayer == GKLocalPlayer.local { entityManager.add(Modal(modaltype: .BaseDetails, - base: entity as! Base, + base: entity as? Base, anchorPoint: CGPoint(x: self.size.width / 2 , y: self.size.height / 2), gameScene: self, currentDraggedBase: currentDraggedBase, touchLocation: touchLocation, collisionBase: collisionBase))