Merge remote-tracking branch 'refs/remotes/origin/devTestBranch'
This commit is contained in:
commit
43ba0be225
@ -61,7 +61,11 @@ class HUD: GKEntity {
|
||||
y: EntityManager.gameEMInstance.scene.size.height * 0.1),
|
||||
onButtonPress: { }
|
||||
)
|
||||
leaveGame = ButtonNode(textureName: "exitButton", text: "" , isEnabled: true, position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.05, y: EntityManager.gameEMInstance.scene.size.height * 0.11), onButtonPress: {
|
||||
leaveGame = ButtonNode(textureName: "exitButton",
|
||||
text: "" ,
|
||||
isEnabled: true,
|
||||
position: CGPoint(x: EntityManager.gameEMInstance.scene.size.width * 0.05, y: EntityManager.gameEMInstance.scene.size.height * 0.11),
|
||||
onButtonPress: {
|
||||
EntityManager.gameEMInstance.add(Modal(modaltype: .QuitGame, base: nil, anchorPoint: CGPoint(x: EntityManager.gameEMInstance.scene.size.width / 2 , y: EntityManager.gameEMInstance.scene.size.height / 2), gameScene: EntityManager.gameEMInstance.scene, currentDraggedBase: nil, touchLocation: nil, collisionBase: nil))
|
||||
})
|
||||
leaveGame.size = CGSize(width: 120, height: 120);
|
||||
|
@ -105,6 +105,7 @@ class Modal: GKEntity{
|
||||
GameCenterManager.sharedInstance.sendStateToPeers(state: State(state: 6))
|
||||
GameCenterManager.sharedInstance.opponentQuit = false
|
||||
GameCenterManager.sharedInstance.quitGame = true
|
||||
(EntityManager.gameEMInstance.scene as! GameScene).gameQuit()
|
||||
}))
|
||||
case .PauseGame:
|
||||
break
|
||||
|
@ -178,6 +178,7 @@ final class GameCenterManager: NSObject, GKMatchmakerViewControllerDelegate, GKG
|
||||
(EntityManager.gameEMInstance.scene as! GameScene).gameEnd()
|
||||
case 6:
|
||||
os_log("State 6 erhalten, Peer hat Spiel verlassen ", log: LOG, type: .info)
|
||||
(EntityManager.gameEMInstance.scene as! GameScene).gameQuit()
|
||||
opponentQuit = true
|
||||
quitGame = true
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user