Create blueprints for classes and add meshes and textures
This commit is contained in:
@@ -6,4 +6,5 @@ bUseDistanceScaledCameraSpeed=True
|
|||||||
[ContentBrowser]
|
[ContentBrowser]
|
||||||
ContentBrowserTab1.SourcesExpanded=True
|
ContentBrowserTab1.SourcesExpanded=True
|
||||||
|
|
||||||
|
[/Script/AdvancedPreviewScene.SharedProfiles]
|
||||||
|
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
BIN
Content/Blueprints/BP_EnemySpaceship.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_EnemySpaceship.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Blueprints/BP_SpaceShooterGameMode.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_SpaceShooterGameMode.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Blueprints/BP_SpaceshipPawn.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_SpaceshipPawn.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Blueprints/BP_SpaceshipProjectile.uasset
LFS
Normal file
BIN
Content/Blueprints/BP_SpaceshipProjectile.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Main.umap
LFS
BIN
Content/Main.umap
LFS
Binary file not shown.
BIN
Content/Materials/M_StarSparrow_Blue.uasset
LFS
Normal file
BIN
Content/Materials/M_StarSparrow_Blue.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Materials/M_StarSparrow_Green.uasset
LFS
Normal file
BIN
Content/Materials/M_StarSparrow_Green.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Materials/M_StarSparrow_Grey.uasset
LFS
Normal file
BIN
Content/Materials/M_StarSparrow_Grey.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Materials/M_StarSparrow_Purple.uasset
LFS
Normal file
BIN
Content/Materials/M_StarSparrow_Purple.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Materials/M_StarSparrow_Red.uasset
LFS
Normal file
BIN
Content/Materials/M_StarSparrow_Red.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Materials/M_StarSparrow_White.uasset
LFS
Normal file
BIN
Content/Materials/M_StarSparrow_White.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Meshes/SM_StarSparrow01.uasset
LFS
Normal file
BIN
Content/Meshes/SM_StarSparrow01.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Meshes/SM_StarSparrow02.uasset
LFS
Normal file
BIN
Content/Meshes/SM_StarSparrow02.uasset
LFS
Normal file
Binary file not shown.
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user