We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i tap on cell of machine it will be replace by my icon Video:
The text was updated successfully, but these errors were encountered:
@eleev I fixed it but i don't have access permission.
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { for touch in touches { let location = touch.location(in: self) let selectedNode = self.atPoint(location) var node: SKSpriteNode if let name = selectedNode.name { if name == Constants.reset || name == Constants.resetLabel { self.stateMachine.enter(StartGameState.self) return } } if gameBoard.isPlayerOne() { guard selectedNode.children.isEmpty else { return } // fixed here let cross = SKSpriteNode(imageNamed: Constants.exCell) cross.size = CGSize(width: Constants.cellSize, height: Constants.cellSize) // cross.zRotation = CGFloat.pi / 4.0 node = cross } else { let circle = SKSpriteNode(imageNamed: Constants.ouCell) circle.size = CGSize(width: Constants.cellSize, height: Constants.cellSize) node = circle } node.alpha = 0.0 let reveal = SKAction.fadeAlpha(to: 1.0, duration: 0.5) node.run(reveal) for i in 0...8 { guard let cellNode: SKSpriteNode = self.childNode(withName: gameBoard.getElementAtBoardLocation(i).node) as? SKSpriteNode else { return } if selectedNode.name == cellNode.name { cellNode.addChild(node) gameBoard.addPlayerValueAtBoardLocation(i, value: gameBoard.isPlayerOne() ? .x : .o) gameBoard.togglePlayer() } } } }
Sorry, something went wrong.
No branches or pull requests
when i tap on cell of machine it will be replace by my icon
Video:
Simulator.mp4
The text was updated successfully, but these errors were encountered: