diff --git a/Config/DefaultEditorSettings.ini b/Config/DefaultEditorSettings.ini new file mode 100644 index 000000000..67378ce84 --- /dev/null +++ b/Config/DefaultEditorSettings.ini @@ -0,0 +1,3 @@ +[/Script/SourceCodeAccess.SourceCodeAccessSettings] +PreferredAccessor=Rider + diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 08ad92ffb..9a1a6ef0e 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -1,6 +1,6 @@ [/Script/EngineSettings.GameMapsSettings] -GameDefaultMap=/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap -EditorStartupMap=/Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap +GameDefaultMap=/Game/Maps/MainMenu.MainMenu +EditorStartupMap=/Game/Maps/MainMenu.MainMenu GlobalDefaultGameMode="/Script/TG_ARPG.TG_ARPGGameMode" TransitionMap=/Game/Maps/Transition_Level.Transition_Level @@ -13,6 +13,9 @@ r.Shadow.Virtual.Enable=1 r.Mobile.EnableNoPrecomputedLightingCSMShader=1 r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=true +r.ClearCoatNormal=True +r.Material.EnergyConservation=False +r.DefaultFeature.AutoExposure=False [/Script/WindowsTargetPlatform.WindowsTargetSettings] DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 @@ -69,3 +72,65 @@ ConnectionType=USBOnly bUseManualIPAddress=False ManualIPAddress= +[/Script/Engine.CollisionProfile] +-Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision",bCanModify=False) +-Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ",bCanModify=False) +-Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ",bCanModify=False) +-Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic",Response=ECR_Block),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.",bCanModify=False) +-Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors",bCanModify=False) +-Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors",bCanModify=False) +-Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.",bCanModify=False) +-Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.",bCanModify=False) +-Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="UI",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Block),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) ++Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision") ++Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.") ++Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ") ++Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ") ++Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic"),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.") ++Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.") ++Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors") ++Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors") ++Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.") ++Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.") ++Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.") ++Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.") ++Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.") ++Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="NPC",CollisionEnabled=NoCollision,bCanModify=True,ObjectTypeName="NPC",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore),(Channel="missile",Response=ECR_Ignore)),HelpMessage="Needs description") ++Profiles=(Name="Raidar",CollisionEnabled=NoCollision,bCanModify=True,ObjectTypeName="Raidar",CustomResponses=((Channel="WorldStatic",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore),(Channel="NPC",Response=ECR_Overlap),(Channel="missile",Response=ECR_Ignore),(Channel="Raidar",Response=ECR_Ignore),(Channel="RaidarTrace",Response=ECR_Ignore)),HelpMessage="Needs description") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Ignore,bTraceType=False,bStaticObject=False,Name="NPC") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel2,DefaultResponse=ECR_Block,bTraceType=False,bStaticObject=False,Name="missile") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel3,DefaultResponse=ECR_Overlap,bTraceType=False,bStaticObject=False,Name="Raidar") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel4,DefaultResponse=ECR_Overlap,bTraceType=True,bStaticObject=False,Name="RaidarTrace") +-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") +-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") +-ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") +-ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") +-ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") ++ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") ++ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") ++ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") ++ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") ++ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") +-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") +-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") +-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") +-CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") ++CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") ++CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") ++CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") ++CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") + diff --git a/Content/Blueprint/Base/TG_GameModeBase.uasset b/Content/Blueprint/Base/TG_GameModeBase.uasset index 66125fe08..5b2a65b4f 100644 Binary files a/Content/Blueprint/Base/TG_GameModeBase.uasset and b/Content/Blueprint/Base/TG_GameModeBase.uasset differ diff --git a/Content/Blueprint/Base/TG_PlayerControllerBase.uasset b/Content/Blueprint/Base/TG_PlayerControllerBase.uasset index 2dab34963..4135f2e32 100644 Binary files a/Content/Blueprint/Base/TG_PlayerControllerBase.uasset and b/Content/Blueprint/Base/TG_PlayerControllerBase.uasset differ diff --git a/Content/Blueprint/Character/BP_NPCBase.uasset b/Content/Blueprint/Character/BP_NPCBase.uasset new file mode 100644 index 000000000..53ef4662c Binary files /dev/null and b/Content/Blueprint/Character/BP_NPCBase.uasset differ diff --git a/Content/Blueprint/Character/BP_Player1.uasset b/Content/Blueprint/Character/BP_Player1.uasset index 4b114844c..01a1ef91b 100644 Binary files a/Content/Blueprint/Character/BP_Player1.uasset and b/Content/Blueprint/Character/BP_Player1.uasset differ diff --git a/Content/Blueprint/Character/BP_PlayerBase.uasset b/Content/Blueprint/Character/BP_PlayerBase.uasset index ac8c633d5..fe1a92766 100644 Binary files a/Content/Blueprint/Character/BP_PlayerBase.uasset and b/Content/Blueprint/Character/BP_PlayerBase.uasset differ diff --git a/Content/Blueprint/FunctionLib/F_SetLoadingScreen.uasset b/Content/Blueprint/FunctionLib/F_SetLoadingScreen.uasset new file mode 100644 index 000000000..4424574ce Binary files /dev/null and b/Content/Blueprint/FunctionLib/F_SetLoadingScreen.uasset differ diff --git a/Content/Blueprint/GamePlay/TG_PlayerControllerGamePlay.uasset b/Content/Blueprint/GamePlay/TG_PlayerControllerGamePlay.uasset index 42a5dabd6..5cd27f464 100644 Binary files a/Content/Blueprint/GamePlay/TG_PlayerControllerGamePlay.uasset and b/Content/Blueprint/GamePlay/TG_PlayerControllerGamePlay.uasset differ diff --git a/Content/Blueprint/Lobby/NPC_SessionGame.uasset b/Content/Blueprint/Lobby/NPC_SessionGame.uasset new file mode 100644 index 000000000..018f8a08f Binary files /dev/null and b/Content/Blueprint/Lobby/NPC_SessionGame.uasset differ diff --git a/Content/Blueprint/Lobby/NPC_StartGame.uasset b/Content/Blueprint/Lobby/NPC_StartGame.uasset new file mode 100644 index 000000000..4742941a7 Binary files /dev/null and b/Content/Blueprint/Lobby/NPC_StartGame.uasset differ diff --git a/Content/Blueprint/Lobby/TG_PlayerControllerLobby.uasset b/Content/Blueprint/Lobby/TG_PlayerControllerLobby.uasset index cb27b8a8a..019eb718d 100644 Binary files a/Content/Blueprint/Lobby/TG_PlayerControllerLobby.uasset and b/Content/Blueprint/Lobby/TG_PlayerControllerLobby.uasset differ diff --git a/Content/Blueprint/MainMenu/Default__TG_GameModeMainnume_C.uasset b/Content/Blueprint/MainMenu/Default__TG_GameModeMainnume_C.uasset new file mode 100644 index 000000000..931239f53 Binary files /dev/null and b/Content/Blueprint/MainMenu/Default__TG_GameModeMainnume_C.uasset differ diff --git a/Content/Blueprint/MainMenu/TG_GameModeMainMenu.uasset b/Content/Blueprint/MainMenu/TG_GameModeMainMenu.uasset new file mode 100644 index 000000000..0b2fc92ca Binary files /dev/null and b/Content/Blueprint/MainMenu/TG_GameModeMainMenu.uasset differ diff --git a/Content/Blueprint/MainMenu/TG_GameModeMainnume.uasset b/Content/Blueprint/MainMenu/TG_GameModeMainnume.uasset new file mode 100644 index 000000000..0447894eb Binary files /dev/null and b/Content/Blueprint/MainMenu/TG_GameModeMainnume.uasset differ diff --git a/Content/Blueprint/MainMenu/TG_GameModeMainnume_C.uasset b/Content/Blueprint/MainMenu/TG_GameModeMainnume_C.uasset new file mode 100644 index 000000000..306242612 Binary files /dev/null and b/Content/Blueprint/MainMenu/TG_GameModeMainnume_C.uasset differ diff --git a/Content/Blueprint/MainMenu/TG_GameStateMainMenu.uasset b/Content/Blueprint/MainMenu/TG_GameStateMainMenu.uasset new file mode 100644 index 000000000..7b82793b2 Binary files /dev/null and b/Content/Blueprint/MainMenu/TG_GameStateMainMenu.uasset differ diff --git a/Content/Blueprint/MainMenu/TG_PlayerControllerMainMenu.uasset b/Content/Blueprint/MainMenu/TG_PlayerControllerMainMenu.uasset new file mode 100644 index 000000000..73f5d1a1d Binary files /dev/null and b/Content/Blueprint/MainMenu/TG_PlayerControllerMainMenu.uasset differ diff --git a/Content/Blueprint/MainMenu/TG_PlayerStateMainMenu.uasset b/Content/Blueprint/MainMenu/TG_PlayerStateMainMenu.uasset new file mode 100644 index 000000000..334d1a21d Binary files /dev/null and b/Content/Blueprint/MainMenu/TG_PlayerStateMainMenu.uasset differ diff --git a/Content/Maps/LoadingScreen.umap b/Content/Maps/LoadingScreen.umap new file mode 100644 index 000000000..c3209fbc7 Binary files /dev/null and b/Content/Maps/LoadingScreen.umap differ diff --git a/Content/Maps/Main.umap b/Content/Maps/Main.umap new file mode 100644 index 000000000..dfd6fe06d Binary files /dev/null and b/Content/Maps/Main.umap differ diff --git a/Content/Maps/MainMenu.umap b/Content/Maps/MainMenu.umap new file mode 100644 index 000000000..f1a14fc57 Binary files /dev/null and b/Content/Maps/MainMenu.umap differ diff --git a/Content/Maps/Mainnume.umap b/Content/Maps/Mainnume.umap new file mode 100644 index 000000000..ad8dd2254 Binary files /dev/null and b/Content/Maps/Mainnume.umap differ diff --git a/Content/Maps/NewYorkCity.umap b/Content/Maps/NewYorkCity.umap index 2beee247a..1f3632483 100644 Binary files a/Content/Maps/NewYorkCity.umap and b/Content/Maps/NewYorkCity.umap differ diff --git a/Content/TenGenUI/battle_btn_x.uasset b/Content/TenGenUI/battle_btn_x.uasset new file mode 100644 index 000000000..0a32693a0 Binary files /dev/null and b/Content/TenGenUI/battle_btn_x.uasset differ diff --git a/Content/Tengen/Data/S_CharacterData.uasset b/Content/Tengen/Data/S_CharacterData.uasset new file mode 100644 index 000000000..1eea03ce4 Binary files /dev/null and b/Content/Tengen/Data/S_CharacterData.uasset differ diff --git a/Content/Tengen/Data/WBS_Weapon.uasset b/Content/Tengen/Data/WBS_Weapon.uasset new file mode 100644 index 000000000..086d3daa4 Binary files /dev/null and b/Content/Tengen/Data/WBS_Weapon.uasset differ diff --git a/Content/Tengen/Data/WBS_Weapon_Table.uasset b/Content/Tengen/Data/WBS_Weapon_Table.uasset new file mode 100644 index 000000000..4fff4a454 Binary files /dev/null and b/Content/Tengen/Data/WBS_Weapon_Table.uasset differ diff --git a/Content/Tengen/Dialogue/AC_DialogueNPC.uasset b/Content/Tengen/Dialogue/AC_DialogueNPC.uasset new file mode 100644 index 000000000..670b78cf9 Binary files /dev/null and b/Content/Tengen/Dialogue/AC_DialogueNPC.uasset differ diff --git a/Content/Tengen/Dialogue/DS_DialogueNPC.uasset b/Content/Tengen/Dialogue/DS_DialogueNPC.uasset new file mode 100644 index 000000000..20aa005cc Binary files /dev/null and b/Content/Tengen/Dialogue/DS_DialogueNPC.uasset differ diff --git a/Content/Tengen/Dialogue/DT_NPC0.uasset b/Content/Tengen/Dialogue/DT_NPC0.uasset new file mode 100644 index 000000000..def17ec0f Binary files /dev/null and b/Content/Tengen/Dialogue/DT_NPC0.uasset differ diff --git a/Content/Tengen/Dialogue/DT_NPC1.uasset b/Content/Tengen/Dialogue/DT_NPC1.uasset new file mode 100644 index 000000000..10d0e90f4 Binary files /dev/null and b/Content/Tengen/Dialogue/DT_NPC1.uasset differ diff --git a/Content/Tengen/Dialogue/DT_NPC3.uasset b/Content/Tengen/Dialogue/DT_NPC3.uasset new file mode 100644 index 000000000..6f9095237 Binary files /dev/null and b/Content/Tengen/Dialogue/DT_NPC3.uasset differ diff --git a/Content/Tengen/Dialogue/DT_NPC4.uasset b/Content/Tengen/Dialogue/DT_NPC4.uasset new file mode 100644 index 000000000..0c2ce9794 Binary files /dev/null and b/Content/Tengen/Dialogue/DT_NPC4.uasset differ diff --git a/Content/Tengen/Dialogue/UI_Dailogue_botton.uasset b/Content/Tengen/Dialogue/UI_Dailogue_botton.uasset new file mode 100644 index 000000000..a919a2458 Binary files /dev/null and b/Content/Tengen/Dialogue/UI_Dailogue_botton.uasset differ diff --git a/Content/Tengen/Dialogue/UI_NPC_Dailogue.uasset b/Content/Tengen/Dialogue/UI_NPC_Dailogue.uasset new file mode 100644 index 000000000..6c2d9ec69 Binary files /dev/null and b/Content/Tengen/Dialogue/UI_NPC_Dailogue.uasset differ diff --git a/Content/Tengen/Dialogue/UI_NPC_dailogue_Menu.uasset b/Content/Tengen/Dialogue/UI_NPC_dailogue_Menu.uasset new file mode 100644 index 000000000..3f0e95cc5 Binary files /dev/null and b/Content/Tengen/Dialogue/UI_NPC_dailogue_Menu.uasset differ diff --git a/Content/Tengen/Interfaces/AN_ComboWindow.uasset b/Content/Tengen/Interfaces/AN_ComboWindow.uasset new file mode 100644 index 000000000..8401f85b0 Binary files /dev/null and b/Content/Tengen/Interfaces/AN_ComboWindow.uasset differ diff --git a/Content/Tengen/Interfaces/AN_GamePlayEven.uasset b/Content/Tengen/Interfaces/AN_GamePlayEven.uasset new file mode 100644 index 000000000..9b7e3f961 Binary files /dev/null and b/Content/Tengen/Interfaces/AN_GamePlayEven.uasset differ diff --git a/Content/Tengen/Interfaces/BPI_Combat.uasset b/Content/Tengen/Interfaces/BPI_Combat.uasset new file mode 100644 index 000000000..c07abfa07 Binary files /dev/null and b/Content/Tengen/Interfaces/BPI_Combat.uasset differ diff --git a/Content/Tengen/Interfaces/BPI_HUD.uasset b/Content/Tengen/Interfaces/BPI_HUD.uasset new file mode 100644 index 000000000..d062eeb76 Binary files /dev/null and b/Content/Tengen/Interfaces/BPI_HUD.uasset differ diff --git a/Content/Tengen/Interfaces/BPI_NPC.uasset b/Content/Tengen/Interfaces/BPI_NPC.uasset new file mode 100644 index 000000000..dc5bf8f75 Binary files /dev/null and b/Content/Tengen/Interfaces/BPI_NPC.uasset differ diff --git a/Content/Tengen/Interfaces/BPI_UI.uasset b/Content/Tengen/Interfaces/BPI_UI.uasset new file mode 100644 index 000000000..24733d359 Binary files /dev/null and b/Content/Tengen/Interfaces/BPI_UI.uasset differ diff --git a/Content/Tengen/UI/UI_ShowConfirm.uasset b/Content/Tengen/UI/UI_ShowConfirm.uasset new file mode 100644 index 000000000..1bc34bd14 Binary files /dev/null and b/Content/Tengen/UI/UI_ShowConfirm.uasset differ diff --git a/Content/Widget/LoadingScreen/Jeong_Ah_Kim.uasset b/Content/Widget/LoadingScreen/Jeong_Ah_Kim.uasset new file mode 100644 index 000000000..584febe70 Binary files /dev/null and b/Content/Widget/LoadingScreen/Jeong_Ah_Kim.uasset differ diff --git a/Content/Widget/LoadingScreen/WB_LoadingScreen.uasset b/Content/Widget/LoadingScreen/WB_LoadingScreen.uasset new file mode 100644 index 000000000..3c805bf0e Binary files /dev/null and b/Content/Widget/LoadingScreen/WB_LoadingScreen.uasset differ diff --git a/Content/Widget/WB_MainMenu.uasset b/Content/Widget/WB_MainMenu.uasset new file mode 100644 index 000000000..18e618ff1 Binary files /dev/null and b/Content/Widget/WB_MainMenu.uasset differ diff --git a/Content/__ExternalActors__/Maps/ThirdPersonMap/0/DH/8EKIC3WLQU7Z0G3U42PFC1.uasset b/Content/__ExternalActors__/Maps/ThirdPersonMap/0/DH/8EKIC3WLQU7Z0G3U42PFC1.uasset new file mode 100644 index 000000000..f677d073a Binary files /dev/null and b/Content/__ExternalActors__/Maps/ThirdPersonMap/0/DH/8EKIC3WLQU7Z0G3U42PFC1.uasset differ diff --git a/Content/__ExternalActors__/Maps/ThirdPersonMap/2/6T/15W3SF88A3UMBA6VHWIRQ9.uasset b/Content/__ExternalActors__/Maps/ThirdPersonMap/2/6T/15W3SF88A3UMBA6VHWIRQ9.uasset new file mode 100644 index 000000000..dc213e560 Binary files /dev/null and b/Content/__ExternalActors__/Maps/ThirdPersonMap/2/6T/15W3SF88A3UMBA6VHWIRQ9.uasset differ diff --git a/Plugins/Developer/RiderLink/Binaries/Win64/UnrealEditor.modules b/Plugins/Developer/RiderLink/Binaries/Win64/UnrealEditor.modules index 6fce1c0dc..4c19110e2 100644 --- a/Plugins/Developer/RiderLink/Binaries/Win64/UnrealEditor.modules +++ b/Plugins/Developer/RiderLink/Binaries/Win64/UnrealEditor.modules @@ -1,5 +1,5 @@ { - "BuildId": "932c2020-a33d-4161-b628-beb96286e741", + "BuildId": "9b27490c-8fd3-4797-99ba-639eb0705412", "Modules": { "RD": "UnrealEditor-RD.dll", diff --git a/Plugins/Developer/RiderLink/Intermediate/FileSystemMappings.ini b/Plugins/Developer/RiderLink/Intermediate/FileSystemMappings.ini index 1338132b7..4d421f400 100644 --- a/Plugins/Developer/RiderLink/Intermediate/FileSystemMappings.ini +++ b/Plugins/Developer/RiderLink/Intermediate/FileSystemMappings.ini @@ -1,7 +1,7 @@ /Engine=C:/GitHub/UnrealEngine/Engine/Shaders /ShaderAutogen=E:/UE5/TG_ARPG/Intermediate/ShaderAutogen +/Plugin/FX/Niagara=C:/GitHub/UnrealEngine/Engine/Plugins/FX/Niagara/Shaders /Plugin/ExrReaderShaders=C:/GitHub/UnrealEngine/Engine/Plugins/Media/ImgMedia/Shaders /Plugin/WmfMedia=C:/GitHub/UnrealEngine/Engine/Plugins/Media/WmfMedia/Shaders /Plugin/GLTFExporter=C:/GitHub/UnrealEngine/Engine/Plugins/Enterprise/GLTFExporter/Shaders -/Plugin/FX/Niagara=C:/GitHub/UnrealEngine/Engine/Plugins/FX/Niagara/Shaders /Plugin/Experimental/ChaosNiagara=C:/GitHub/UnrealEngine/Engine/Plugins/Experimental/ChaosNiagara/Shaders diff --git a/Source/TG_ARPG/Private/AT_PlayMontageAndWaitForEvent.cpp b/Source/TG_ARPG/Private/AT_PlayMontageAndWaitForEvent.cpp new file mode 100644 index 000000000..0c48b9b15 --- /dev/null +++ b/Source/TG_ARPG/Private/AT_PlayMontageAndWaitForEvent.cpp @@ -0,0 +1,267 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "AT_PlayMontageAndWaitForEvent.h" +#include "AbilitySystemComponent.h" +#include "AbilitySystemGlobals.h" +#include "TGAbilitySystemComponent.h" +#include "GameFramework/Character.h" + + + +UAT_PlayMontageAndWaitForEvent::UAT_PlayMontageAndWaitForEvent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ + Rate = 1.f; + bStopWhenAbilityEnds = true; +} + +UAbilitySystemComponent* UAT_PlayMontageAndWaitForEvent::GetTargetASC() +{ + return Cast(AbilitySystemComponent); +} + +void UAT_PlayMontageAndWaitForEvent::OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted) +{ + if (Ability && Ability->GetCurrentMontage() == MontageToPlay) + { + if (Montage == MontageToPlay) + { + AbilitySystemComponent->ClearAnimatingAbility(Ability); + + // Reset AnimRootMotionTranslationScale + ACharacter* Character = Cast(GetAvatarActor()); + if (Character && (Character->GetLocalRole() == ROLE_Authority || + (Character->GetLocalRole() == ROLE_AutonomousProxy && Ability->GetNetExecutionPolicy() == EGameplayAbilityNetExecutionPolicy::LocalPredicted))) + { + Character->SetAnimRootMotionTranslationScale(1.f); + } + + } + } + + if (bInterrupted) + { + if (ShouldBroadcastAbilityTaskDelegates()) + { + OnInterrupted.Broadcast(FGameplayTag(), FGameplayEventData()); + } + } + else + { + if (ShouldBroadcastAbilityTaskDelegates()) + { + OnBlendOut.Broadcast(FGameplayTag(), FGameplayEventData()); + } + } +} + +void UAT_PlayMontageAndWaitForEvent::OnAbilityCancelled() +{ + + if (StopPlayingMontage()) + { + // Let the BP handle the interrupt as well + if (ShouldBroadcastAbilityTaskDelegates()) + { + OnCancelled.Broadcast(FGameplayTag(), FGameplayEventData()); + } + } +} + +void UAT_PlayMontageAndWaitForEvent::OnMontageEnded(UAnimMontage* Montage, bool bInterrupted) +{ + if (!bInterrupted) + { + if (ShouldBroadcastAbilityTaskDelegates()) + { + OnCompleted.Broadcast(FGameplayTag(), FGameplayEventData()); + } + } + + EndTask(); +} + +void UAT_PlayMontageAndWaitForEvent::OnGameplayEvent(FGameplayTag EventTag, const FGameplayEventData* Payload) +{ + if (ShouldBroadcastAbilityTaskDelegates()) + { + FGameplayEventData TempData = *Payload; + TempData.EventTag = EventTag; + + EventReceived.Broadcast(EventTag, TempData); + } +} + +UAT_PlayMontageAndWaitForEvent* UAT_PlayMontageAndWaitForEvent::PlayMontageAndWaitForEvent(UGameplayAbility* OwningAbility, + FName TaskInstanceName, UAnimMontage* MontageToPlay, FGameplayTagContainer EventTags, float Rate, FName StartSection, bool bStopWhenAbilityEnds, float AnimRootMotionTranslationScale) +{ + UAbilitySystemGlobals::NonShipping_ApplyGlobalAbilityScaler_Rate(Rate); + + UAT_PlayMontageAndWaitForEvent* MyObj = NewAbilityTask(OwningAbility, TaskInstanceName); + MyObj->MontageToPlay = MontageToPlay; + MyObj->EventTags = EventTags; + MyObj->Rate = Rate; + MyObj->StartSection = StartSection; + MyObj->AnimRootMotionTranslationScale = AnimRootMotionTranslationScale; + MyObj->bStopWhenAbilityEnds = bStopWhenAbilityEnds; + + return MyObj; +} + +void UAT_PlayMontageAndWaitForEvent::Activate() +{ + if (Ability == nullptr) + { + return; + } + + bool bPlayedMontage = false; + UAbilitySystemComponent* GDAbilitySystemComponent = GetTargetASC(); + + if (GDAbilitySystemComponent) + { + const FGameplayAbilityActorInfo* ActorInfo = Ability->GetCurrentActorInfo(); + UAnimInstance* AnimInstance = ActorInfo->GetAnimInstance(); + if (AnimInstance != nullptr) + { + // Bind to event callback + EventHandle = GDAbilitySystemComponent->AddGameplayEventTagContainerDelegate(EventTags, FGameplayEventTagMulticastDelegate::FDelegate::CreateUObject(this, &UAT_PlayMontageAndWaitForEvent::OnGameplayEvent)); + + if (GDAbilitySystemComponent->PlayMontage(Ability, Ability->GetCurrentActivationInfo(), MontageToPlay, Rate, StartSection) > 0.f) + { + // Playing a montage could potentially fire off a callback into game code which could kill this ability! Early out if we are pending kill. + if (ShouldBroadcastAbilityTaskDelegates() == false) + { + return; + } + + CancelledHandle = Ability->OnGameplayAbilityCancelled.AddUObject(this, &UAT_PlayMontageAndWaitForEvent::OnAbilityCancelled); + + BlendingOutDelegate.BindUObject(this, &UAT_PlayMontageAndWaitForEvent::OnMontageBlendingOut); + AnimInstance->Montage_SetBlendingOutDelegate(BlendingOutDelegate, MontageToPlay); + + MontageEndedDelegate.BindUObject(this, &UAT_PlayMontageAndWaitForEvent::OnMontageEnded); + AnimInstance->Montage_SetEndDelegate(MontageEndedDelegate, MontageToPlay); + + ACharacter* Character = Cast(GetAvatarActor()); + if (Character && (Character->GetLocalRole() == ROLE_Authority || + (Character->GetLocalRole() == ROLE_AutonomousProxy && Ability->GetNetExecutionPolicy() == EGameplayAbilityNetExecutionPolicy::LocalPredicted))) + { + Character->SetAnimRootMotionTranslationScale(AnimRootMotionTranslationScale); + } + + bPlayedMontage = true; + } + } + else + { + UE_LOG(LogTemp, Warning, TEXT("UGDAbilityTask_PlayMontageAndWaitForEvent call to PlayMontage failed!")); + } + } + else + { + UE_LOG(LogTemp, Warning, TEXT("UGDAbilityTask_PlayMontageAndWaitForEvent called on invalid AbilitySystemComponent")); + } + + if (!bPlayedMontage) + { + UE_LOG(LogTemp, Warning, TEXT("UGDAbilityTask_PlayMontageAndWaitForEvent called in Ability %s failed to play montage %s; Task Instance Name %s."), *Ability->GetName(), *GetNameSafe(MontageToPlay), *InstanceName.ToString()); + if (ShouldBroadcastAbilityTaskDelegates()) + { + //ABILITY_LOG(Display, TEXT("%s: OnCancelled"), *GetName()); + OnCancelled.Broadcast(FGameplayTag(), FGameplayEventData()); + } + } + + SetWaitingOnAvatar(); +} + +void UAT_PlayMontageAndWaitForEvent::ExternalCancel() +{ + //check(AbilitySystemComponent); + + OnAbilityCancelled(); + + Super::ExternalCancel(); +} + +void UAT_PlayMontageAndWaitForEvent::OnDestroy(bool AbilityEnded) +{ + // Note: Clearing montage end delegate isn't necessary since its not a multicast and will be cleared when the next montage plays. + // (If we are destroyed, it will detect this and not do anything) + + // This delegate, however, should be cleared as it is a multicast + if (Ability) + { + Ability->OnGameplayAbilityCancelled.Remove(CancelledHandle); + if (AbilityEnded && bStopWhenAbilityEnds) + { + StopPlayingMontage(); + } + } + + UAbilitySystemComponent* GDAbilitySystemComponent = GetTargetASC(); + if (GDAbilitySystemComponent) + { + GDAbilitySystemComponent->RemoveGameplayEventTagContainerDelegate(EventTags, EventHandle); + } + + Super::OnDestroy(AbilityEnded); + +} + +bool UAT_PlayMontageAndWaitForEvent::StopPlayingMontage() +{ + const FGameplayAbilityActorInfo* ActorInfo = Ability->GetCurrentActorInfo(); + if (!ActorInfo) + { + return false; + } + + UAnimInstance* AnimInstance = ActorInfo->GetAnimInstance(); + if (AnimInstance == nullptr) + { + return false; + } + + // Check if the montage is still playing + // The ability would have been interrupted, in which case we should automatically stop the montage + //if (AbilitySystemComponent && Ability) + if ( Ability) + { + if (AbilitySystemComponent->GetAnimatingAbility() == Ability + && AbilitySystemComponent->GetCurrentMontage() == MontageToPlay) + { + // Unbind delegates so they don't get called as well + FAnimMontageInstance* MontageInstance = AnimInstance->GetActiveInstanceForMontage(MontageToPlay); + if (MontageInstance) + { + MontageInstance->OnMontageBlendingOutStarted.Unbind(); + MontageInstance->OnMontageEnded.Unbind(); + } + + AbilitySystemComponent->CurrentMontageStop(); + return true; + } + } + + return false; +} + +FString UAT_PlayMontageAndWaitForEvent::GetDebugString() const +{ + UAnimMontage* PlayingMontage = nullptr; + if (Ability) + { + const FGameplayAbilityActorInfo* ActorInfo = Ability->GetCurrentActorInfo(); + UAnimInstance* AnimInstance = ActorInfo->GetAnimInstance(); + + if (AnimInstance != nullptr) + { + PlayingMontage = AnimInstance->Montage_IsActive(MontageToPlay) ? MontageToPlay : AnimInstance->GetCurrentActiveMontage(); + } + } + + return FString::Printf(TEXT("PlayMontageAndWaitForEvent. MontageToPlay: %s (Currently Playing): %s"), *GetNameSafe(MontageToPlay), *GetNameSafe(PlayingMontage)); +} diff --git a/Source/TG_ARPG/Private/AsyncLoadingFunctionLibrary.cpp b/Source/TG_ARPG/Private/AsyncLoadingFunctionLibrary.cpp new file mode 100644 index 000000000..9fbf1a031 --- /dev/null +++ b/Source/TG_ARPG/Private/AsyncLoadingFunctionLibrary.cpp @@ -0,0 +1,86 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "AsyncLoadingFunctionLibrary.h" + +#include "Components/TimelineComponent.h" +#include "Engine/AssetManager.h" +#include "Engine/StreamableManager.h" + + + +void UAsyncLoadingFunctionLibrary::TenGenAsyncLoad(TSoftObjectPtr<> PageageLoad,FString& LoadPackagePath, + const FOnAsyncLoadFinished& OnAsyncLoadFinished) +{ + LoadPackagePath = FPaths::GetBaseFilename(PageageLoad.ToString(), false); + + //打印loadpackagepath + // GEngine->AddOnScreenDebugMessage(-1, 20.0f, FColor::Green, LoadPackagePath); +//shu + + + + + // UE_LOG(LogTemp, Warning, TEXT("String: %s"), *LoadPackagePath); + + LoadPackageAsync(LoadPackagePath,FLoadPackageAsyncDelegate::CreateLambda([=](const FName& PackageName, UPackage* LoadedPackage, EAsyncLoadingResult::Type Result) + { + if (Result == EAsyncLoadingResult::Failed) + { + UE_LOG(LogTemp, Warning, TEXT("Load Failed")); + } + else if (Result == EAsyncLoadingResult::Succeeded) + { + UE_LOG(LogTemp, Warning, TEXT("Load Succeeded")); + OnAsyncLoadFinished.ExecuteIfBound(LoadPackagePath); + } + }), 0, PKG_ContainsMap); + + +} + + + + +void UAsyncLoadingFunctionLibrary::AsyncLoadWithStreamableManager(TSoftObjectPtr AssetPtr, FString& LoadPackagePath, const FOnAsyncLoadFinished& OnAsyncLoadFinished) +{ + + LoadPackagePath = FPaths::GetBaseFilename(AssetPtr.ToString(), false); + + //异步加载 + FStreamableManager& Streamable = UAssetManager::GetStreamableManager(); + Streamable.RequestAsyncLoad(AssetPtr.ToSoftObjectPath(), FStreamableDelegate::CreateLambda([=]() + { + OnAsyncLoadFinished.ExecuteIfBound(LoadPackagePath); + })); + + + + + + +} + + + +float UAsyncLoadingFunctionLibrary::GetLoadProgress(FString LoadPackagePath) +{ + //取得加载进度,压缩到0-1之间 + float FloatPercentage = GetAsyncLoadPercentage(*LoadPackagePath) / 100.0f; + + + // FString ResultStr = FString::Printf(TEXT("Percentage: %f"), FloatPercentage); + // GEngine->AddOnScreenDebugMessage(-1, 2.0f, FColor::Green, ResultStr); + // UE_LOG(LogTemp, Warning, TEXT("Percentage: %f"), FloatPercentage); + + return FloatPercentage; + +} + + + + + + + + diff --git a/Source/TG_ARPG/Private/OSBlueprintFunctionLibrary.cpp b/Source/TG_ARPG/Private/OSBlueprintFunctionLibrary.cpp new file mode 100644 index 000000000..6fcf691c5 --- /dev/null +++ b/Source/TG_ARPG/Private/OSBlueprintFunctionLibrary.cpp @@ -0,0 +1,115 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "OSBlueprintFunctionLibrary.h" + +#include "GameFramework/PlayerState.h" +//#include "Animation/WidgetAnimation.h" +//#include "Components/WidgetComponent.h" +//设置SceneComponent的朝向为面向当前摄像机 +void UOSBlueprintFunctionLibrary::FaceActorToCamera(USceneComponent* SceneComponent) +{ + if (SceneComponent) + { + //获取当前摄像机的位置 + FVector CameraLocation = GEngine->GetFirstLocalPlayerController(GWorld)->PlayerCameraManager->GetCameraLocation(); + //获取SceneComponent的位置 + FVector SceneComponentLocation = SceneComponent->GetComponentLocation(); + //计算朝向 + FVector Direction = CameraLocation - SceneComponentLocation; + //设置朝向 + SceneComponent->SetWorldRotation(Direction.Rotation()); + } +} + +//输入一个actor数组,求出其中距离自身最近的actor,并且检查结果与上一帧的结果是否一致,如果不一致则输出一个bool值,用于判断是否需要更新最近的actor. +AActor* UOSBlueprintFunctionLibrary::GetNearestActor(TArray Actors, AActor* SelfActor,AActor* LastNearestActor, bool& bIsNeedUpdate) +{ + + AActor* NearestActor = nullptr; + float MinDistance = 0.0f; + for (auto Actor : Actors) + { + if (Actor != SelfActor) + { + float Distance = FVector::Distance(Actor->GetActorLocation(), SelfActor->GetActorLocation()); + if (MinDistance == 0.0f) + { + MinDistance = Distance; + NearestActor = Actor; + } + else + { + if (Distance < MinDistance) + { + MinDistance = Distance; + NearestActor = Actor; + } + } + } + } + + + if (NearestActor != nullptr) + { + //如果最近的actor与上一帧的最近actor不一致或者最近actor是null的时候,则需要更新 + if (NearestActor != LastNearestActor || LastNearestActor == nullptr) + { + bIsNeedUpdate = true; + } + else + { + bIsNeedUpdate = false; + } + } + else + { + if (LastNearestActor != nullptr) + { + bIsNeedUpdate = true; + } + bIsNeedUpdate = false; + } + return NearestActor; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/TG_ARPG/Public/AT_PlayMontageAndWaitForEvent.h b/Source/TG_ARPG/Public/AT_PlayMontageAndWaitForEvent.h new file mode 100644 index 000000000..453e21e1c --- /dev/null +++ b/Source/TG_ARPG/Public/AT_PlayMontageAndWaitForEvent.h @@ -0,0 +1,84 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Abilities/Tasks/AbilityTask.h" +#include "AT_PlayMontageAndWaitForEvent.generated.h" + + +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FPlayMontageAndWaitForEventDelegate,FGameplayTag,EventTag,FGameplayEventData,EventData); +/** + * + */ +UCLASS() +class TG_ARPG_API UAT_PlayMontageAndWaitForEvent : public UAbilityTask +{ + GENERATED_BODY() +public: + UAT_PlayMontageAndWaitForEvent(const FObjectInitializer& ObjectInitializer); + + virtual void Activate() override; + virtual void ExternalCancel() override; + virtual FString GetDebugString() const override; + virtual void OnDestroy(bool AbilityEnded) override; + + UPROPERTY(BlueprintAssignable) + FPlayMontageAndWaitForEventDelegate OnCompleted; + + UPROPERTY(BlueprintAssignable) + FPlayMontageAndWaitForEventDelegate OnBlendOut; + + UPROPERTY(BlueprintAssignable) + FPlayMontageAndWaitForEventDelegate OnInterrupted; + + UPROPERTY(BlueprintAssignable) + FPlayMontageAndWaitForEventDelegate OnCancelled; + + UPROPERTY(BlueprintAssignable) + FPlayMontageAndWaitForEventDelegate EventReceived; + + UFUNCTION(BlueprintCallable, Category = "Ability|Tasks", meta = (HidePin = "OwningAbility", DefaultToSelf = "OwningAbility", BlueprintInternalUseOnly = "TRUE")) + static UAT_PlayMontageAndWaitForEvent* PlayMontageAndWaitForEvent( + UGameplayAbility* OwningAbility, + FName TaskInstanceName, + UAnimMontage* MontageToPlay, + FGameplayTagContainer EventTags, + float Rate = 1.f, + FName StartSection = NAME_None, + bool bStopWhenAbilityEnds = true, + float AnimRootMotionTranslationScale = 1.f); + +private: + UPROPERTY() + UAnimMontage* MontageToPlay; + + UPROPERTY() + FGameplayTagContainer EventTags; + + UPROPERTY() + float Rate; + + UPROPERTY() + FName StartSection; + + UPROPERTY() + float AnimRootMotionTranslationScale; + + UPROPERTY() + bool bStopWhenAbilityEnds; + + bool StopPlayingMontage(); + + UAbilitySystemComponent* GetTargetASC(); + + void OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted); + void OnAbilityCancelled(); + void OnMontageEnded(UAnimMontage* Montage, bool bInterrupted); + void OnGameplayEvent(FGameplayTag EventTag, const FGameplayEventData* Payload); + + FOnMontageBlendingOutStarted BlendingOutDelegate; + FOnMontageEnded MontageEndedDelegate; + FDelegateHandle CancelledHandle; + FDelegateHandle EventHandle; +}; diff --git a/Source/TG_ARPG/Public/AsyncLoadingFunctionLibrary.h b/Source/TG_ARPG/Public/AsyncLoadingFunctionLibrary.h new file mode 100644 index 000000000..70e09cf13 --- /dev/null +++ b/Source/TG_ARPG/Public/AsyncLoadingFunctionLibrary.h @@ -0,0 +1,53 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Kismet/BlueprintAsyncActionBase.h" +#include "Kismet/BlueprintFunctionLibrary.h" +#include "AsyncLoadingFunctionLibrary.generated.h" + + + +DECLARE_DYNAMIC_DELEGATE_OneParam(FOnAsyncLoadFinished, FString, LoadPackagePath); +//注册委托,回调一个float,用于进度条 +DECLARE_DYNAMIC_DELEGATE_OneParam(FOnAsyncLoadProgress, float, LoadProgress); +/** + * + */ + +UCLASS() +class TG_ARPG_API UAsyncLoadingFunctionLibrary : public UBlueprintFunctionLibrary +{ + GENERATED_BODY() + + + +public: + + + + /** + * 普通异步加载 + * @param PageageLoad 要加载的资源 + */ + UFUNCTION(BlueprintCallable,Category = "AsyncLoad") + static void TenGenAsyncLoad(TSoftObjectPtr PageageLoad ,FString& LoadPackagePath,const FOnAsyncLoadFinished& OnAsyncLoadFinished); + + /** + * 使用SteamableManger的异步加载 + * @param AssetPtr 要加载的资源 + */ + UFUNCTION(BlueprintCallable,Category = "AsyncLoad") + static void AsyncLoadWithStreamableManager(TSoftObjectPtr AssetPtr, FString& LoadPackagePath, const FOnAsyncLoadFinished& OnAsyncLoadFinished); + + + //一个函数,用于加载进度条 + UFUNCTION(BlueprintCallable, Category = "AsyncLoad") + static float GetLoadProgress(FString LoadPackagePath); + + + +}; + + diff --git a/Source/TG_ARPG/Public/OSBlueprintFunctionLibrary.h b/Source/TG_ARPG/Public/OSBlueprintFunctionLibrary.h new file mode 100644 index 000000000..8801fb2a2 --- /dev/null +++ b/Source/TG_ARPG/Public/OSBlueprintFunctionLibrary.h @@ -0,0 +1,46 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Kismet/BlueprintFunctionLibrary.h" +#include "OSBlueprintFunctionLibrary.generated.h" + + + +/** + * + */ +//一个数据结构,用于储存一个数组的值用来做执行引脚 +UENUM(BlueprintType) +enum class EBlueprintExecNodePin : uint8 +{ + False1, + True1 +}; + + +UCLASS() +class TG_ARPG_API UOSBlueprintFunctionLibrary : public UBlueprintFunctionLibrary +{ + GENERATED_BODY() + + + + UFUNCTION(BlueprintCallable,Category="OSBlueprintFunctionLibrary") + static void FaceActorToCamera(USceneComponent* SceneComponent); + // + UFUNCTION(BlueprintCallable,Category="OSBlueprintFunctionLibrary") + static AActor* GetNearestActor(TArray Actors, AActor* SelfActor, AActor* LastNearestActor,bool& bIsNeedUpdate); + + +}; + + + + + + + + + diff --git a/Source/TG_ARPG/TG_ARPGGameMode.cpp b/Source/TG_ARPG/TG_ARPGGameMode.cpp index 798529504..dd26298f9 100644 --- a/Source/TG_ARPG/TG_ARPGGameMode.cpp +++ b/Source/TG_ARPG/TG_ARPGGameMode.cpp @@ -4,6 +4,11 @@ #include "TG_ARPGCharacter.h" #include "UObject/ConstructorHelpers.h" + + + + + ATG_ARPGGameMode::ATG_ARPGGameMode() { // set default pawn class to our Blueprinted character @@ -13,3 +18,7 @@ ATG_ARPGGameMode::ATG_ARPGGameMode() DefaultPawnClass = PlayerPawnBPClass.Class; } } + + + + diff --git a/Source/TG_ARPG/TG_ARPGGameMode.h b/Source/TG_ARPG/TG_ARPGGameMode.h index 812979542..07aed9b56 100644 --- a/Source/TG_ARPG/TG_ARPGGameMode.h +++ b/Source/TG_ARPG/TG_ARPGGameMode.h @@ -6,6 +6,8 @@ #include "GameFramework/GameMode.h" #include "TG_ARPGGameMode.generated.h" + + UCLASS(minimalapi) class ATG_ARPGGameMode : public AGameMode { @@ -13,6 +15,7 @@ class ATG_ARPGGameMode : public AGameMode public: ATG_ARPGGameMode(); + };