Merge branch 'master' of https://git.tlimon.fr/ICAN_4JV/LegumeMix
This commit is contained in:
commit
8b84450ea9
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Player/BP_Play.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Player/HUD/T_ShotgunCrosshair.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Player/HUD/T_ShotgunCrosshair.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Player/HUD/WB_MainHud.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Player/HUD/WB_MainHud.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Spawner/CurveEnemyInWave.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Spawner/CurveEnemyInWave.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Spawner/CurveMaxEnemyInstantiate.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Spawner/CurveMaxEnemyInstantiate.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Spawner/LVL_TestSpawn.umap
(Stored with Git LFS)
BIN
Content/Legumix/Spawner/LVL_TestSpawn.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Spawner/WB_DebugWaveWidget.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Spawner/WB_DebugWaveWidget.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset
(Stored with Git LFS)
Binary file not shown.
@ -74,14 +74,14 @@ bool ALMSpawnPosition::IsPlayerVisible() const
|
|||||||
void ALMSpawnPosition::StarCooldown()
|
void ALMSpawnPosition::StarCooldown()
|
||||||
{
|
{
|
||||||
IsOnCooldow = true;
|
IsOnCooldow = true;
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Spawner Cooldown"));
|
//UE_LOG(LogTemp, Warning, TEXT("Spawner Cooldown"));
|
||||||
GetWorld()->GetTimerManager().SetTimer(ProcessCooldown, this, &ALMSpawnPosition::EndCooldown, TimerCooldown, false);
|
GetWorld()->GetTimerManager().SetTimer(ProcessCooldown, this, &ALMSpawnPosition::EndCooldown, TimerCooldown, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALMSpawnPosition::EndCooldown()
|
void ALMSpawnPosition::EndCooldown()
|
||||||
{
|
{
|
||||||
IsOnCooldow = false;
|
IsOnCooldow = false;
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Spawner End Cooldown"));
|
//UE_LOG(LogTemp, Warning, TEXT("Spawner End Cooldown"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ ALMWaveManager::ALMWaveManager()
|
|||||||
void ALMWaveManager::BeginPlay()
|
void ALMWaveManager::BeginPlay()
|
||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
StartWave();
|
|
||||||
|
|
||||||
SpawnPositionsList.Empty(); // Nettoie la liste avant de remplir
|
SpawnPositionsList.Empty(); // Nettoie la liste avant de remplir
|
||||||
|
|
||||||
@ -30,6 +29,8 @@ void ALMWaveManager::BeginPlay()
|
|||||||
SpawnPositionsList.Add(SpawnPos);
|
SpawnPositionsList.Add(SpawnPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StartWave();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALMWaveManager::SpawnEnemy(ALMSpawnPosition* spawnPosition)
|
void ALMWaveManager::SpawnEnemy(ALMSpawnPosition* spawnPosition)
|
||||||
@ -115,8 +116,11 @@ void ALMWaveManager::GetRandomDataWaveRow()
|
|||||||
CurrentWaveName = WaveName.ToString();
|
CurrentWaveName = WaveName.ToString();
|
||||||
FLMWaveStructure* InfoWaveRow = WaveDatePreset->FindRow<FLMWaveStructure>(WaveName, "");
|
FLMWaveStructure* InfoWaveRow = WaveDatePreset->FindRow<FLMWaveStructure>(WaveName, "");
|
||||||
|
|
||||||
EnemyNumberInWave = InfoWaveRow->EnemyCount;
|
//Set le nombre d'ennemis dans la wave en fonction de la Row, de la courbe et du nombre de vague passée
|
||||||
MaxEnemyInstantiate = InfoWaveRow->MaxEnemyCount;
|
EnemyNumberInWave = FMath::CeilToInt((InfoWaveRow->EnemyCount)* CurveForScalingEnemyInWave->GetFloatValue(WaveNumber));
|
||||||
|
|
||||||
|
//Set le nombre d'ennemis max spawnés en fonction de la Row, de la courbe, et du nombre de vague passée
|
||||||
|
MaxEnemyInstantiate = FMath::CeilToInt((InfoWaveRow->MaxEnemyCount) * CurveForScalingMaxEnemyInstantiate->GetFloatValue(WaveNumber));
|
||||||
|
|
||||||
AllEnemyType.Empty();
|
AllEnemyType.Empty();
|
||||||
for (const FLMEnemyRatio& EnemyRatio : InfoWaveRow->WaveComposition)
|
for (const FLMEnemyRatio& EnemyRatio : InfoWaveRow->WaveComposition)
|
||||||
@ -175,18 +179,18 @@ void ALMWaveManager::Tick(float DeltaTime)
|
|||||||
{
|
{
|
||||||
//lauch break time
|
//lauch break time
|
||||||
// Lance un breaktime avant de relancer une wave
|
// Lance un breaktime avant de relancer une wave
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Start a new wave"));
|
|
||||||
OnCooldown = true;
|
OnCooldown = true;
|
||||||
GetWorld()->GetTimerManager().SetTimer(BreakTimer, this, &ALMWaveManager::StartWave, BreakTime, false);
|
GetWorld()->GetTimerManager().SetTimer(BreakTimer, this, &ALMWaveManager::StartWave, BreakTime, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ALMWaveManager::StartWave()
|
void ALMWaveManager::StartWave()
|
||||||
{
|
{
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Start a new wave"));
|
||||||
GetRandomDataWaveRow();
|
GetRandomDataWaveRow();
|
||||||
EnemySpawned = 0;
|
EnemySpawned = 0;
|
||||||
OnCooldown = false;
|
OnCooldown = false;
|
||||||
|
WaveNumber++;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
int MaxEnemyInstantiate; // Nombre d'ennemis max spawnés
|
int MaxEnemyInstantiate; // Nombre d'ennemis max spawnés
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
||||||
float BreakTime; // Nombre d'ennemis dans la wave
|
float BreakTime;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
||||||
UDataTable* WaveDatePreset;
|
UDataTable* WaveDatePreset;
|
||||||
@ -49,6 +49,15 @@ public:
|
|||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Legumix")
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Legumix")
|
||||||
TArray<int> EnemiesPerType;
|
TArray<int> EnemiesPerType;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Legumix")
|
||||||
|
int WaveNumber = 0;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category="Legumix")
|
||||||
|
UCurveFloat* CurveForScalingEnemyInWave; // Nombre d'ennemis max spawnés
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category="Legumix")
|
||||||
|
UCurveFloat* CurveForScalingMaxEnemyInstantiate; // Nombre d'ennemis max spawnés
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
Reference in New Issue
Block a user