Create blueprints for classes and add meshes and textures

This commit is contained in:
2025-02-16 14:02:01 +05:30
parent 32365c408c
commit 6fb1b648ec
16 changed files with 59 additions and 5 deletions

View File

@@ -6,4 +6,5 @@ bUseDistanceScaledCameraSpeed=True
[ContentBrowser] [ContentBrowser]
ContentBrowserTab1.SourcesExpanded=True ContentBrowserTab1.SourcesExpanded=True
[/Script/AdvancedPreviewScene.SharedProfiles]

View File

@@ -64,7 +64,7 @@ bOffsetPlayerGamepadIds=False
GameInstanceClass=/Script/Engine.GameInstance GameInstanceClass=/Script/Engine.GameInstance
GameDefaultMap=/Engine/Maps/Templates/OpenWorld.OpenWorld GameDefaultMap=/Engine/Maps/Templates/OpenWorld.OpenWorld
ServerDefaultMap=/Engine/Maps/Entry.Entry ServerDefaultMap=/Engine/Maps/Entry.Entry
GlobalDefaultGameMode=/Game/StarterContent/Blueprints/Deathmatch.Deathmatch_C GlobalDefaultGameMode=/Game/Blueprints/BP_SpaceShooterGameMode.BP_SpaceShooterGameMode_C
GlobalDefaultServerGameMode=None GlobalDefaultServerGameMode=None
[/Script/UnrealEd.UnrealEdEngine] [/Script/UnrealEd.UnrealEdEngine]

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.

View File

@@ -5,10 +5,21 @@
ASpaceShooterGameMode::ASpaceShooterGameMode() ASpaceShooterGameMode::ASpaceShooterGameMode()
{ {
// Set default pawn class using the inherited DefaultPawnClass
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/Blueprints/BP_SpaceshipPawn"));
if (PlayerPawnBPClass.Class != nullptr)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
// Enable Tick()
PrimaryActorTick.bCanEverTick = true; PrimaryActorTick.bCanEverTick = true;
// Set default pawn class to our spaceship // Debug message
DefaultPawnClass = ASpaceshipPawn::StaticClass(); if (GEngine)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("GameMode Constructor"));
}
} }
void ASpaceShooterGameMode::StartPlay() void ASpaceShooterGameMode::StartPlay()
@@ -18,6 +29,12 @@ void ASpaceShooterGameMode::StartPlay()
// Start spawning enemies // Start spawning enemies
GetWorldTimerManager().SetTimer(EnemySpawnTimer, this, &ASpaceShooterGameMode::SpawnEnemy, GetWorldTimerManager().SetTimer(EnemySpawnTimer, this, &ASpaceShooterGameMode::SpawnEnemy,
EnemySpawnInterval, true); EnemySpawnInterval, true);
// Debug message
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("GameMode StartPlay"));
}
} }
void ASpaceShooterGameMode::Tick(float DeltaTime) void ASpaceShooterGameMode::Tick(float DeltaTime)