Update: SelectPlayerView for create players

dev_views_Game
Nathan VERDIER 10 months ago
parent 1e6db55be4
commit d4362cdf91

@ -7,6 +7,7 @@
import SwiftUI
import SpriteKit
import DouShouQiModel
struct SelectPlayerView: View {
@ -26,7 +27,7 @@ struct SelectPlayerView: View {
HStack {
VStack(alignment: .trailing)
{
MainMenuButton(text: "Start", destination: GameView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
MainMenuButton(text: "Start", destination: GameView(gameVM: PlayingGameVM(withRules: ClassicRules(), andPlayer1: HumanPlayer(withName: player1.player.name, andId: .player1)!, andPlayer2: HumanPlayer(withName: player2.player.name, andId: .player2)!)!), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
MainMenuButton(text: "Settings", destination: ContentView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
}
}

Loading…
Cancel
Save