diff --git a/Content/Legumix/Player/BP_Play.uasset b/Content/Legumix/Player/BP_Play.uasset index 2bef94d..099de9f 100644 --- a/Content/Legumix/Player/BP_Play.uasset +++ b/Content/Legumix/Player/BP_Play.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99f31a0c81b1ba2e75659ef3126d975cb0422f42e56d9952b875f69eec1b376b -size 687533 +oid sha256:afcadbb313be0cd15c4e326c756d83a0de86b0a76ebb4720e69e5a60dac3dc4d +size 713087 diff --git a/Content/Legumix/Player/HUD/T_ShotgunCrosshair.uasset b/Content/Legumix/Player/HUD/T_ShotgunCrosshair.uasset new file mode 100644 index 0000000..c4cbdf1 --- /dev/null +++ b/Content/Legumix/Player/HUD/T_ShotgunCrosshair.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab237c4afde8f24276605c7724e2e1488454a6d7cf479ad545acf7f3e48eb271 +size 41210 diff --git a/Content/Legumix/Player/HUD/WB_MainHud.uasset b/Content/Legumix/Player/HUD/WB_MainHud.uasset index 471bf3b..80882a2 100644 --- a/Content/Legumix/Player/HUD/WB_MainHud.uasset +++ b/Content/Legumix/Player/HUD/WB_MainHud.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:479433f7844bb85f8fa14caa17f005b8569f6a638483b5a549156b8724fa373a -size 248729 +oid sha256:28f44a81fe0880c01e7e2d3e4efdaad09d56d9ee002dcdc36bce3c2e1684f00b +size 298315 diff --git a/Content/Legumix/Spawner/CurveEnemyInWave.uasset b/Content/Legumix/Spawner/CurveEnemyInWave.uasset new file mode 100644 index 0000000..d2713be --- /dev/null +++ b/Content/Legumix/Spawner/CurveEnemyInWave.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:211f21ded83c8ae8f2bffab238f6f41187bbeef06774a9bcf5368f66083834dc +size 4438 diff --git a/Content/Legumix/Spawner/CurveMaxEnemyInstantiate.uasset b/Content/Legumix/Spawner/CurveMaxEnemyInstantiate.uasset new file mode 100644 index 0000000..7422011 --- /dev/null +++ b/Content/Legumix/Spawner/CurveMaxEnemyInstantiate.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4cf7bc325a49870065d324c7612329763c3870879b4edc7896bdf10a8847fa9f +size 4478 diff --git a/Content/Legumix/Spawner/LVL_TestSpawn.umap b/Content/Legumix/Spawner/LVL_TestSpawn.umap index 9aa2c26..02b3c12 100644 --- a/Content/Legumix/Spawner/LVL_TestSpawn.umap +++ b/Content/Legumix/Spawner/LVL_TestSpawn.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ecedf90fe425d082e08ed371e587646a9ca00ba244055c3a596101546e4a6a31 -size 88904 +oid sha256:f2c5bc46e66035a39d7796584b3b676cec30f92b377193201f88fec8e58573a2 +size 89235 diff --git a/Content/Legumix/Spawner/WB_DebugWaveWidget.uasset b/Content/Legumix/Spawner/WB_DebugWaveWidget.uasset new file mode 100644 index 0000000..f9af9ae --- /dev/null +++ b/Content/Legumix/Spawner/WB_DebugWaveWidget.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77f47fed708378f9d00c939d2c90f8d0ad1f526b16732ea594b1451e6e574761 +size 125965 diff --git a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset index 188c555..227723b 100644 --- a/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset +++ b/Content/Legumix/Weapon/Shotgun/BP_Shotgun.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bcff5f51ae323d5d0051d37584e05b0d7c2154c89075ac3be33f4080017555aa -size 287 +oid sha256:cdd0744e8d203d302b969d24473a8203934f8c0382cf6331f8847b92ee81de0d +size 40826 diff --git a/Source/LegumeMix/Private/LMSpawnPosition.cpp b/Source/LegumeMix/Private/LMSpawnPosition.cpp index 74c1c0a..8ec7aef 100644 --- a/Source/LegumeMix/Private/LMSpawnPosition.cpp +++ b/Source/LegumeMix/Private/LMSpawnPosition.cpp @@ -74,14 +74,14 @@ bool ALMSpawnPosition::IsPlayerVisible() const void ALMSpawnPosition::StarCooldown() { 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); } void ALMSpawnPosition::EndCooldown() { IsOnCooldow = false; - UE_LOG(LogTemp, Warning, TEXT("Spawner End Cooldown")); + //UE_LOG(LogTemp, Warning, TEXT("Spawner End Cooldown")); } diff --git a/Source/LegumeMix/Private/LMWaveManager.cpp b/Source/LegumeMix/Private/LMWaveManager.cpp index 999c8aa..085c1db 100644 --- a/Source/LegumeMix/Private/LMWaveManager.cpp +++ b/Source/LegumeMix/Private/LMWaveManager.cpp @@ -18,7 +18,6 @@ ALMWaveManager::ALMWaveManager() void ALMWaveManager::BeginPlay() { Super::BeginPlay(); - StartWave(); SpawnPositionsList.Empty(); // Nettoie la liste avant de remplir @@ -30,6 +29,8 @@ void ALMWaveManager::BeginPlay() SpawnPositionsList.Add(SpawnPos); } } + + StartWave(); } void ALMWaveManager::SpawnEnemy(ALMSpawnPosition* spawnPosition) @@ -114,9 +115,12 @@ void ALMWaveManager::GetRandomDataWaveRow() CurrentWaveName = WaveName.ToString(); FLMWaveStructure* InfoWaveRow = WaveDatePreset->FindRow(WaveName, ""); + + //Set le nombre d'ennemis dans la wave en fonction de la Row, de la courbe et du nombre de vague passée + EnemyNumberInWave = FMath::CeilToInt((InfoWaveRow->EnemyCount)* CurveForScalingEnemyInWave->GetFloatValue(WaveNumber)); - EnemyNumberInWave = InfoWaveRow->EnemyCount; - MaxEnemyInstantiate = InfoWaveRow->MaxEnemyCount; + //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(); for (const FLMEnemyRatio& EnemyRatio : InfoWaveRow->WaveComposition) @@ -175,18 +179,18 @@ void ALMWaveManager::Tick(float DeltaTime) { //lauch break time // Lance un breaktime avant de relancer une wave - UE_LOG(LogTemp, Warning, TEXT("Start a new wave")); OnCooldown = true; GetWorld()->GetTimerManager().SetTimer(BreakTimer, this, &ALMWaveManager::StartWave, BreakTime, false); } } - } void ALMWaveManager::StartWave() { + UE_LOG(LogTemp, Warning, TEXT("Start a new wave")); GetRandomDataWaveRow(); EnemySpawned = 0; OnCooldown = false; + WaveNumber++; } diff --git a/Source/LegumeMix/Public/LMWaveManager.h b/Source/LegumeMix/Public/LMWaveManager.h index bea087d..b40087f 100644 --- a/Source/LegumeMix/Public/LMWaveManager.h +++ b/Source/LegumeMix/Public/LMWaveManager.h @@ -35,7 +35,7 @@ public: int MaxEnemyInstantiate; // Nombre d'ennemis max spawnés 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") UDataTable* WaveDatePreset; @@ -48,6 +48,15 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Legumix") TArray 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: // Called when the game starts or when spawned