add some changes and add arkit project

Ar_kit
étudiant 10 months ago
parent a95cb5a93a
commit 82a2129b4c

@ -65,6 +65,9 @@
ECB636532C0463A9007CD5E2 /* SoundPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB636522C0463A9007CD5E2 /* SoundPlayer.swift */; };
ECB636552C047992007CD5E2 /* Image.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ECB636542C047992007CD5E2 /* Image.xcassets */; };
ECE777142C2068F400D354B0 /* EditPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECE777132C2068F400D354B0 /* EditPlayerView.swift */; };
ECF3FD242C25B83000F5E62B /* SelectFighterSound.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = ECF3FD232C25B83000F5E62B /* SelectFighterSound.mp3 */; };
ECF3FD262C25BDCF00F5E62B /* Start.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = ECF3FD252C25BDCF00F5E62B /* Start.mp3 */; };
ECF3FD282C25C83100F5E62B /* Fight.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = ECF3FD272C25C83100F5E62B /* Fight.mp3 */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -82,6 +85,13 @@
remoteGlobalIDString = 645834572BF5F92300E18321;
remoteInfo = DouShouQi_App;
};
ECF3FD212C2582B300F5E62B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = ECF3FD0A2C2582B200F5E62B;
remoteInfo = ArKit;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
@ -147,6 +157,10 @@
ECB636522C0463A9007CD5E2 /* SoundPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoundPlayer.swift; sourceTree = "<group>"; };
ECB636542C047992007CD5E2 /* Image.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Image.xcassets; sourceTree = "<group>"; };
ECE777132C2068F400D354B0 /* EditPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditPlayerView.swift; sourceTree = "<group>"; };
ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ArKit.xcodeproj; path = ../../Swift/ArKit/ArKit.xcodeproj; sourceTree = "<group>"; };
ECF3FD232C25B83000F5E62B /* SelectFighterSound.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = SelectFighterSound.mp3; path = ../../../../../../Downloads/SelectFighterSound.mp3; sourceTree = "<group>"; };
ECF3FD252C25BDCF00F5E62B /* Start.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = Start.mp3; path = ../../../../../../Downloads/Start.mp3; sourceTree = "<group>"; };
ECF3FD272C25C83100F5E62B /* Fight.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = Fight.mp3; path = ../../../../../../Downloads/Fight.mp3; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -182,6 +196,7 @@
6458344F2BF5F92300E18321 = {
isa = PBXGroup;
children = (
ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */,
6458345A2BF5F92300E18321 /* DouShouQi_App */,
6458346B2BF5F92600E18321 /* DouShouQi_AppTests */,
645834752BF5F92600E18321 /* DouShouQi_AppUITests */,
@ -409,6 +424,9 @@
EC62C5032C045BD30048CD0B /* Sounds */ = {
isa = PBXGroup;
children = (
ECF3FD272C25C83100F5E62B /* Fight.mp3 */,
ECF3FD252C25BDCF00F5E62B /* Start.mp3 */,
ECF3FD232C25B83000F5E62B /* SelectFighterSound.mp3 */,
EC62C50C2C046D9E0048CD0B /* SplashScreenSound.mp3 */,
EC62C5052C045C1A0048CD0B /* TitleScreenButtonSound.mp3 */,
);
@ -469,6 +487,14 @@
path = CoreData;
sourceTree = "<group>";
};
ECF3FD1E2C2582B300F5E62B /* Products */ = {
isa = PBXGroup;
children = (
ECF3FD222C2582B300F5E62B /* ArKit.app */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -557,6 +583,12 @@
mainGroup = 6458344F2BF5F92300E18321;
productRefGroup = 645834592BF5F92300E18321 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = ECF3FD1E2C2582B300F5E62B /* Products */;
ProjectRef = ECF3FD1D2C2582B300F5E62B /* ArKit.xcodeproj */;
},
);
projectRoot = "";
targets = (
645834572BF5F92300E18321 /* DouShouQi_App */,
@ -566,6 +598,16 @@
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
ECF3FD222C2582B300F5E62B /* ArKit.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = ArKit.app;
remoteRef = ECF3FD212C2582B300F5E62B /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
645834562BF5F92300E18321 /* Resources */ = {
isa = PBXResourcesBuildPhase;
@ -576,8 +618,11 @@
6493C1C02C046BF900B5121D /* samurai.ttf in Resources */,
EC62C5062C045C1A0048CD0B /* TitleScreenButtonSound.mp3 in Resources */,
EC62C5172C0620C00048CD0B /* rap.mp3 in Resources */,
ECF3FD262C25BDCF00F5E62B /* Start.mp3 in Resources */,
EC62C50D2C046D9E0048CD0B /* SplashScreenSound.mp3 in Resources */,
645834632BF5F92500E18321 /* Preview Assets.xcassets in Resources */,
ECF3FD282C25C83100F5E62B /* Fight.mp3 in Resources */,
ECF3FD242C25B83000F5E62B /* SelectFighterSound.mp3 in Resources */,
645834602BF5F92500E18321 /* Assets.xcassets in Resources */,
ECB636552C047992007CD5E2 /* Image.xcassets in Resources */,
EC62C4FF2C0457AD0048CD0B /* TitleScreenMusic.mp3 in Resources */,

@ -9,18 +9,25 @@ import SwiftUI
import SpriteKit
struct GameView: View {
var gameScene : GameScene = GameScene(size: CGSize(width: 700, height: 900))
var gameScene: GameScene = GameScene(size: CGSize(width: 700, height: 900))
var body: some View {
VStack {
TopGameBoard().frame(maxHeight: 200)
SpriteView(scene: gameScene)
}
.onAppear {
playSound(named: "Fight")
//MusicPlayer.shared.playBackgroundMusic(music: "GameMusic")
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
MusicPlayer.shared.playBackgroundMusic(music: "GameMusic")
}
}
.onDisappear {
MusicPlayer.shared.stopBackgroundMusic()
}
.navigationBarHidden(true) // Hide the navigation bar
}
}

@ -37,7 +37,7 @@ struct MainMenuView: View {
VStack {
HStack {
VStack(spacing: 25) {
MainMenuButton(text: "Play", destination: ScoreBoardView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Play", destination: SelectPlayerView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Historique", destination: HistoricView(historicVM: HistoricVM()), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Best Scores", destination: ScoreBoardView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10)
MainMenuButton(text: "Players", destination: PlayersView(), sound: "TitleScreenButtonSound", topRightCorner: 10, bottomRightCorner: 10)

@ -21,13 +21,25 @@ struct SelectPlayerView: View {
HStack {
VStack(alignment: .trailing)
{
MainMenuButton(text: "Start", destination: ContentView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
MainMenuButton(text: "Start", destination: GameView(), sound: "Start", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
MainMenuButton(text: "Settings", destination: ContentView(), sound: "TitleScreenButtonSound", horizontalAlignment: .trailing, topLeftCorner: 10, bottomLeftCorner: 10)
}
}
Spacer()
}
.onAppear {
playSound(named: "SelectFighterSound")
//MusicPlayer.shared.playBackgroundMusic(music: "GameMusic")
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
MusicPlayer.shared.playBackgroundMusic(music: "TitleScreenMusic")
}
}
.onDisappear {
MusicPlayer.shared.stopBackgroundMusic()
}
}
}

Loading…
Cancel
Save