commit
f798fd22b1
@ -0,0 +1,13 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider ignored files
|
||||||
|
/modules.xml
|
||||||
|
/contentModel.xml
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/.idea.TurnBased.iml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
@ -0,0 +1 @@
|
|||||||
|
TurnBased
|
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||||
|
</project>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1 @@
|
|||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,13 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "MainMenuPlayerController.h"
|
||||||
|
#include "Blueprint/UserWidget.h"
|
||||||
|
|
||||||
|
void AMainMenuPlayerController::BeginPlay() {
|
||||||
|
Super::BeginPlay();
|
||||||
|
SetShowMouseCursor(true);
|
||||||
|
UUserWidget *CreatedWidget = CreateWidget<UUserWidget>(
|
||||||
|
GetWorld(), WidgetClass);
|
||||||
|
CreatedWidget->AddToViewport();
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/PlayerController.h"
|
||||||
|
#include "MainMenuPlayerController.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class TURNBASEDTUTORIAL_API
|
||||||
|
AMainMenuPlayerController : public APlayerController {
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
TSubclassOf<UUserWidget> WidgetClass;
|
||||||
|
};
|
@ -0,0 +1,68 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "MyExplosion.h"
|
||||||
|
|
||||||
|
#include "Trooper.h"
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
#include "Net/UnrealNetwork.h"
|
||||||
|
#include "Particles/ParticleSystemComponent.h"
|
||||||
|
|
||||||
|
AMyExplosion::AMyExplosion() {
|
||||||
|
// if (!CollisionComponent) {
|
||||||
|
// CollisionComponent = CreateDefaultSubobject<USphereComponent>(
|
||||||
|
// TEXT("SphereComponent"));
|
||||||
|
// RootComponent = CollisionComponent;
|
||||||
|
// }
|
||||||
|
if (!ParticleSystemComponent) {
|
||||||
|
ParticleSystemComponent = CreateDefaultSubobject<
|
||||||
|
UParticleSystemComponent>(
|
||||||
|
TEXT("ParticleSystemComponent"));
|
||||||
|
RootComponent = ParticleSystemComponent;
|
||||||
|
}
|
||||||
|
InitialLifeSpan = 1.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AMyExplosion::Initialize(float damage,
|
||||||
|
float splashRadius,
|
||||||
|
uint8 playerIndex) {
|
||||||
|
Damage = damage;
|
||||||
|
PlayerIndex = playerIndex;
|
||||||
|
float Scale = splashRadius / 50;
|
||||||
|
// CollisionComponent->SetWorldScale3D({Scale, Scale, Scale});
|
||||||
|
if (ParticleSystemComponent && ParticleSystemComponent->IsValidLowLevel()) {
|
||||||
|
ParticleSystemComponent->SetWorldScale3D({Scale, Scale, Scale});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AMyExplosion::BeginPlay() {
|
||||||
|
Super::BeginPlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AMyExplosion::NotifyActorBeginOverlap(AActor *OtherActor) {
|
||||||
|
Super::NotifyActorBeginOverlap(OtherActor);
|
||||||
|
ATrooper *OtherTrooper = Cast<ATrooper>(OtherActor);
|
||||||
|
if (OtherTrooper) {
|
||||||
|
UE_LOG(LogTemp, Warning,
|
||||||
|
TEXT(
|
||||||
|
"Begin explosion overlap: id: %d, index: %d, damage: %f, my index: %d"
|
||||||
|
),
|
||||||
|
OtherTrooper->GetId(), OtherTrooper->GetPlayerIndex(), Damage,
|
||||||
|
PlayerIndex);
|
||||||
|
if (PlayerIndex != -1 && PlayerIndex != OtherTrooper->
|
||||||
|
GetPlayerIndex()) {
|
||||||
|
OtherTrooper->TakeDamage(Damage);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Overlapped not a trooper"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AMyExplosion::GetLifetimeReplicatedProps(
|
||||||
|
TArray<FLifetimeProperty> &OutLifetimeProps) const {
|
||||||
|
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
|
||||||
|
DOREPLIFETIME(AMyExplosion, Damage);
|
||||||
|
DOREPLIFETIME(AMyExplosion, PlayerIndex);
|
||||||
|
// DOREPLIFETIME(AMyExplosion, CollisionComponent);
|
||||||
|
DOREPLIFETIME(AMyExplosion, ParticleSystemComponent);
|
||||||
|
}
|
@ -0,0 +1,37 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/Actor.h"
|
||||||
|
#include "MyExplosion.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class TURNBASEDTUTORIAL_API AMyExplosion : public AActor {
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
AMyExplosion();
|
||||||
|
|
||||||
|
void Initialize(float damage,
|
||||||
|
float splashRadius,
|
||||||
|
uint8 playerIndex);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
virtual void NotifyActorBeginOverlap(AActor *OtherActor) override;
|
||||||
|
|
||||||
|
UPROPERTY(Replicated)
|
||||||
|
float Damage;
|
||||||
|
|
||||||
|
UPROPERTY(Replicated)
|
||||||
|
int8 PlayerIndex = -1;
|
||||||
|
|
||||||
|
// UPROPERTY(EditAnywhere, Replicated)
|
||||||
|
// USphereComponent *CollisionComponent;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Replicated)
|
||||||
|
UParticleSystemComponent *ParticleSystemComponent;
|
||||||
|
};
|
@ -0,0 +1,2 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeInspection/PencilsConfiguration/ActualSeverity/@EntryValue">INFO</s:String></wpf:ResourceDictionary>
|
@ -0,0 +1,25 @@
|
|||||||
|
TurnBased/Binaries/Win64/TurnBasedTutorial.exe 2023-03-16T03:05:02.259Z
|
||||||
|
TurnBased/Binaries/Win64/OpenImageDenoise.dll 2023-03-16T01:52:15.842Z
|
||||||
|
TurnBased/Binaries/Win64/tbb12.dll 2023-03-16T01:52:15.844Z
|
||||||
|
Engine/Extras/Redist/en-us/UE4PrereqSetup_x64.exe 2023-03-16T01:46:38.646Z
|
||||||
|
Engine/Binaries/ThirdParty/Oculus/OVRPlugin/OVRPlugin/Win64/OVRPlugin.dll 2023-03-16T01:41:33.496Z
|
||||||
|
Engine/Binaries/ThirdParty/DbgHelp/dbghelp.dll 2023-03-16T01:41:25.090Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/PxFoundationPROFILE_x64.dll 2023-03-16T01:41:46.155Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/PxPvdSDKPROFILE_x64.dll 2023-03-16T01:41:46.339Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/PhysX3PROFILE_x64.dll 2023-03-16T01:41:45.025Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/PhysX3CookingPROFILE_x64.dll 2023-03-16T01:41:45.005Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/PhysX3CommonPROFILE_x64.dll 2023-03-16T01:41:44.869Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/APEX_ClothingPROFILE_x64.dll 2023-03-16T01:41:41.229Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/APEX_LegacyPROFILE_x64.dll 2023-03-16T01:41:42.482Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/ApexFrameworkPROFILE_x64.dll 2023-03-16T01:41:43.065Z
|
||||||
|
Engine/Binaries/ThirdParty/PhysX3/Win64/VS2015/NvClothPROFILE_x64.dll 2023-03-16T01:41:43.666Z
|
||||||
|
Engine/Binaries/ThirdParty/Ogg/Win64/VS2015/libogg_64.dll 2023-03-16T01:41:33.497Z
|
||||||
|
Engine/Binaries/ThirdParty/Vorbis/Win64/VS2015/libvorbis_64.dll 2023-03-16T01:41:53.464Z
|
||||||
|
Engine/Binaries/ThirdParty/Vorbis/Win64/VS2015/libvorbisfile_64.dll 2023-03-16T01:41:53.464Z
|
||||||
|
Engine/Binaries/ThirdParty/NVIDIA/NVaftermath/Win64/GFSDK_Aftermath_Lib.x64.dll 2023-03-16T01:41:32.651Z
|
||||||
|
Engine/Binaries/ThirdParty/OpenXR/win64/openxr_loader.dll 2023-03-16T01:41:33.921Z
|
||||||
|
Engine/Binaries/ThirdParty/OpenVR/OpenVRv1_5_17/Win64/openvr_api.dll 2023-03-16T01:41:33.917Z
|
||||||
|
Engine/Binaries/ThirdParty/NVIDIA/GeForceNOW/Win64/GfnRuntimeSdk.dll 2023-03-16T01:41:32.648Z
|
||||||
|
Engine/Binaries/ThirdParty/Windows/WinPixEventRuntime/x64/WinPixEventRuntime.dll 2023-03-16T01:41:53.487Z
|
||||||
|
Engine/Binaries/ThirdParty/Windows/XAudio2_9/x64/xaudio2_9redist.dll 2023-03-16T01:41:54.149Z
|
||||||
|
TurnBasedTutorial.exe 2023-03-16T03:07:14.267Z
|
Binary file not shown.
Loading…
Reference in new issue