-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. Unreal Engine 5 C++ | Coding and Debugging with Rider
- Loading branch information
1 parent
39f8eee
commit 4c61ae8
Showing
11 changed files
with
142 additions
and
3 deletions.
There are no files selected for viewing
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Fab by Kai Jurgeit | ||
|
||
|
||
#include "EnemyCharacter.h" | ||
|
||
|
||
AEnemyCharacter::AEnemyCharacter() | ||
{ | ||
PrimaryActorTick.bCanEverTick = true; | ||
} | ||
|
||
void AEnemyCharacter::BeginPlay() | ||
{ | ||
Super::BeginPlay(); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Fab by Kai Jurgeit | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "FabCharacterBase.h" | ||
#include "EnemyCharacter.generated.h" | ||
|
||
UCLASS() | ||
class FAB_API AEnemyCharacter : public AFabCharacterBase | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
AEnemyCharacter(); | ||
|
||
protected: | ||
virtual void BeginPlay() override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Fab by Kai Jurgeit | ||
|
||
|
||
#include "FabCharacterBase.h" | ||
|
||
|
||
AFabCharacterBase::AFabCharacterBase() | ||
{ | ||
PrimaryActorTick.bCanEverTick = true; | ||
} | ||
|
||
void AFabCharacterBase::BeginPlay() | ||
{ | ||
Super::BeginPlay(); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Fab by Kai Jurgeit | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "GameFramework/Character.h" | ||
#include "FabCharacterBase.generated.h" | ||
|
||
UCLASS() | ||
class FAB_API AFabCharacterBase : public ACharacter | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
AFabCharacterBase(); | ||
|
||
protected: | ||
virtual void BeginPlay() override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Fab by Kai Jurgeit | ||
|
||
|
||
#include "PlayerCharacter.h" | ||
|
||
#include "FabMacros.h" | ||
|
||
|
||
APlayerCharacter::APlayerCharacter() | ||
{ | ||
PrimaryActorTick.bCanEverTick = true; | ||
} | ||
|
||
void APlayerCharacter::Tick(float DeltaSeconds) | ||
{ | ||
Super::Tick(DeltaSeconds); | ||
SPHERE_TICK(GetActorLocation()); | ||
LINE_TICK(GetActorLocation(), FVector(2200.f, 700.f, 150.f)); | ||
} | ||
|
||
void APlayerCharacter::BeginPlay() | ||
{ | ||
Super::BeginPlay(); | ||
|
||
UE_LOG(LogTemp, Warning, TEXT("%s"), *FString(__FUNCTION__)); | ||
UE_LOG(LogTemp, Warning, TEXT("PrimaryActorTick.bCanEverTick = %s"), PrimaryActorTick.bCanEverTick ? TEXT("true") : TEXT("false")); | ||
PRINT("Hello, %s", *FString(__FUNCTION__)); | ||
FVector TargetLocation(2200.f, 700.f, 150.f); | ||
SPHERE(TargetLocation); | ||
LINE(GetActorLocation(), TargetLocation); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Fab by Kai Jurgeit | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "FabCharacterBase.h" | ||
#include "PlayerCharacter.generated.h" | ||
|
||
UCLASS() | ||
class FAB_API APlayerCharacter : public AFabCharacterBase | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
APlayerCharacter(); | ||
virtual void Tick(float DeltaSeconds) override; | ||
|
||
protected: | ||
virtual void BeginPlay() override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
#include "DrawDebugHelpers.h" | ||
|
||
#define PRINT(DebugMessage, ...) { GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Purple, FString::Printf(TEXT(DebugMessage), __VA_ARGS__)); } | ||
#define SPHERE(Center) if (GetWorld()) DrawDebugSphere(GetWorld(), Center, 20.f, 16, FColor::Blue, true); | ||
#define SPHERE_TICK(Center) if (GetWorld()) DrawDebugSphere(GetWorld(), Center, 20.f, 16, FColor::Green, false); | ||
#define LINE(LineStart, LineEnd) if (GetWorld()) DrawDebugLine(GetWorld(), LineStart, LineEnd, FColor::Blue, true); | ||
#define LINE_TICK(LineStart, LineEnd) if (GetWorld()) DrawDebugLine(GetWorld(), LineStart, LineEnd, FColor::Green, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo 'Cleaning' | ||
powershell.exe -NoExit -ExecutionPolicy -Bypass -Command "ls -Recurse -Include Build, Intermediate, Binaries, *.sln, .vs | rmdir -Force -Recurse;" |