Fix warning while casting entity to base

This commit is contained in:
Marcel Schwarz 2020-06-10 14:58:32 +02:00
parent 04e55be394
commit 4e8b42d81c

View File

@ -86,7 +86,7 @@ class GameScene: SKScene{
if let baseEntity = entity as? Base { if let baseEntity = entity as? Base {
if baseEntity.ownershipPlayer == GKLocalPlayer.local { if baseEntity.ownershipPlayer == GKLocalPlayer.local {
entityManager.add(Modal(modaltype: .BaseDetails, 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), anchorPoint: CGPoint(x: self.size.width / 2 , y: self.size.height / 2),
gameScene: self, gameScene: self,
currentDraggedBase: currentDraggedBase, touchLocation: touchLocation, collisionBase: collisionBase)) currentDraggedBase: currentDraggedBase, touchLocation: touchLocation, collisionBase: collisionBase))