diff --git a/Content/Audio/BlueMann/Audio_Track-10.uasset b/Content/Audio/BlueMann/Audio_Track-10.uasset new file mode 100644 index 0000000..607bce6 Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-10.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-2.uasset b/Content/Audio/BlueMann/Audio_Track-2.uasset new file mode 100644 index 0000000..41f47fb Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-2.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-3.uasset b/Content/Audio/BlueMann/Audio_Track-3.uasset new file mode 100644 index 0000000..0ad2ba7 Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-3.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-4.uasset b/Content/Audio/BlueMann/Audio_Track-4.uasset new file mode 100644 index 0000000..fff61ca Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-4.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-5.uasset b/Content/Audio/BlueMann/Audio_Track-5.uasset new file mode 100644 index 0000000..0efcf70 Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-5.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-6.uasset b/Content/Audio/BlueMann/Audio_Track-6.uasset new file mode 100644 index 0000000..190d097 Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-6.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-7.uasset b/Content/Audio/BlueMann/Audio_Track-7.uasset new file mode 100644 index 0000000..14889a6 Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-7.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-8.uasset b/Content/Audio/BlueMann/Audio_Track-8.uasset new file mode 100644 index 0000000..2fd8f0a Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-8.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track-9.uasset b/Content/Audio/BlueMann/Audio_Track-9.uasset new file mode 100644 index 0000000..2f19acd Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track-9.uasset differ diff --git a/Content/Audio/BlueMann/Audio_Track.uasset b/Content/Audio/BlueMann/Audio_Track.uasset new file mode 100644 index 0000000..a700852 Binary files /dev/null and b/Content/Audio/BlueMann/Audio_Track.uasset differ diff --git a/Content/Audio/BlueMann/BlueManCue.uasset b/Content/Audio/BlueMann/BlueManCue.uasset new file mode 100644 index 0000000..12fccb5 Binary files /dev/null and b/Content/Audio/BlueMann/BlueManCue.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Cue.uasset b/Content/Audio/GelbMannImpact/GMI-Cue.uasset new file mode 100644 index 0000000..bfdcc86 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Cue.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L1.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L1.uasset new file mode 100644 index 0000000..31fa646 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L1.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L2.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L2.uasset new file mode 100644 index 0000000..8c15fc2 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L2.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L3.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L3.uasset new file mode 100644 index 0000000..1567921 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L3.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L4.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L4.uasset new file mode 100644 index 0000000..c328b7e Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L4.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L5.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L5.uasset new file mode 100644 index 0000000..2d50e4e Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L5.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L6.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L6.uasset new file mode 100644 index 0000000..5b4efab Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L6.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L7.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L7.uasset new file mode 100644 index 0000000..3dfeae7 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L7.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L9.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L9.uasset new file mode 100644 index 0000000..87dbf77 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMI-L9.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Leicht/GMi-L8.uasset b/Content/Audio/GelbMannImpact/GMI-Leicht/GMi-L8.uasset new file mode 100644 index 0000000..0b14656 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Leicht/GMi-L8.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M1.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M1.uasset new file mode 100644 index 0000000..fd0d5c7 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M1.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M2.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M2.uasset new file mode 100644 index 0000000..0bc0ff1 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M2.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M3.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M3.uasset new file mode 100644 index 0000000..bd76fa0 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M3.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M4.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M4.uasset new file mode 100644 index 0000000..76b4507 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M4.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M5.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M5.uasset new file mode 100644 index 0000000..3565038 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M5.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M6.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M6.uasset new file mode 100644 index 0000000..7e38dca Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M6.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M7.uasset b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M7.uasset new file mode 100644 index 0000000..c5f1e58 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Mittel/GMI-M7.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S1.uasset b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S1.uasset new file mode 100644 index 0000000..7a6101a Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S1.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S2.uasset b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S2.uasset new file mode 100644 index 0000000..a7268da Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S2.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S3.uasset b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S3.uasset new file mode 100644 index 0000000..5fbd9ce Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S3.uasset differ diff --git a/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S4.uasset b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S4.uasset new file mode 100644 index 0000000..85c45b1 Binary files /dev/null and b/Content/Audio/GelbMannImpact/GMI-Schwer/GMI-S4.uasset differ diff --git a/Content/Audio/Sound/320789__reznik-krkovicka__horn-01.uasset b/Content/Audio/Sound/320789__reznik-krkovicka__horn-01.uasset index 8759968..c5d9925 100644 Binary files a/Content/Audio/Sound/320789__reznik-krkovicka__horn-01.uasset and b/Content/Audio/Sound/320789__reznik-krkovicka__horn-01.uasset differ diff --git a/Content/Audio/Sound/345684__provan9__radio-alert.uasset b/Content/Audio/Sound/345684__provan9__radio-alert.uasset new file mode 100644 index 0000000..e26e48a Binary files /dev/null and b/Content/Audio/Sound/345684__provan9__radio-alert.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/Cube12_Blueprint.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/Cube12_Blueprint.uasset index d6a07c5..41284f1 100644 Binary files a/Content/EVERYTHINGPROGRAMMINGRELATED/Cube12_Blueprint.uasset and b/Content/EVERYTHINGPROGRAMMINGRELATED/Cube12_Blueprint.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/SM_box_big3_Blueprint.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/SM_box_big3_Blueprint.uasset new file mode 100644 index 0000000..51e8be4 Binary files /dev/null and b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/SM_box_big3_Blueprint.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/SM_box_big5_Blueprint.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/SM_box_big5_Blueprint.uasset new file mode 100644 index 0000000..c9c5dc5 Binary files /dev/null and b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/SM_box_big5_Blueprint.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/untitled2_Blueprint.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/untitled2_Blueprint.uasset new file mode 100644 index 0000000..da846b1 Binary files /dev/null and b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/untitled2_Blueprint.uasset differ diff --git a/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/untitled_Blueprint.uasset b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/untitled_Blueprint.uasset new file mode 100644 index 0000000..d3befa2 Binary files /dev/null and b/Content/EVERYTHINGPROGRAMMINGRELATED/boxensound/untitled_Blueprint.uasset differ diff --git a/Content/Levels/FactoryHall.umap b/Content/Levels/FactoryHall.umap index bfadd6d..ba5fd14 100644 Binary files a/Content/Levels/FactoryHall.umap and b/Content/Levels/FactoryHall.umap differ diff --git a/Content/Levels/FactoryHall_BuiltData.uasset b/Content/Levels/FactoryHall_BuiltData.uasset index 7a2e8e6..bd81655 100644 Binary files a/Content/Levels/FactoryHall_BuiltData.uasset and b/Content/Levels/FactoryHall_BuiltData.uasset differ diff --git a/Content/Levels/PersistentLevel.umap b/Content/Levels/PersistentLevel.umap index 4c70199..2388202 100644 Binary files a/Content/Levels/PersistentLevel.umap and b/Content/Levels/PersistentLevel.umap differ diff --git a/Content/Levels/Raum4.umap b/Content/Levels/Raum4.umap index 7f7ad1a..dbe4acf 100644 Binary files a/Content/Levels/Raum4.umap and b/Content/Levels/Raum4.umap differ diff --git a/Content/Levels/Raum4_BuiltData.uasset b/Content/Levels/Raum4_BuiltData.uasset index bda19b2..cafb2ef 100644 Binary files a/Content/Levels/Raum4_BuiltData.uasset and b/Content/Levels/Raum4_BuiltData.uasset differ diff --git a/Content/Levels/Untitled.umap b/Content/Levels/Untitled.umap index 8b658dc..fcf95fd 100644 Binary files a/Content/Levels/Untitled.umap and b/Content/Levels/Untitled.umap differ diff --git a/Content/Levels/Untitled_BuiltData.uasset b/Content/Levels/Untitled_BuiltData.uasset index b518c97..df506a3 100644 Binary files a/Content/Levels/Untitled_BuiltData.uasset and b/Content/Levels/Untitled_BuiltData.uasset differ diff --git a/Content/Levels/VillaDesign.umap b/Content/Levels/VillaDesign.umap index 28e8c44..9d49332 100644 Binary files a/Content/Levels/VillaDesign.umap and b/Content/Levels/VillaDesign.umap differ diff --git a/Source/BuildingEscape/RotatingActor.cpp b/Source/BuildingEscape/RotatingActor.cpp index d013f8b..0479d74 100644 --- a/Source/BuildingEscape/RotatingActor.cpp +++ b/Source/BuildingEscape/RotatingActor.cpp @@ -2,7 +2,8 @@ #include "Components/AudioComponent.h" #include "Kismet/GameplayStatics.h" - +#include "Engine/World.h" +#include "Engine/Public/TimerManager.h" URotatingActor::URotatingActor() { @@ -34,35 +35,17 @@ void URotatingActor::TickComponent(float DeltaTime, ELevelTick TickType, FActorC void URotatingActor::Rotate(const FRotator TargetRotation) { - this->targetRotation = TargetRotation; - rotating = true; - tempRotation = (TargetRotation.Yaw < 0) ? -1.f : 1.f; - if (Negative) + FTimerHandle handle; + + if(RotationDelay == 0) { - tempRotation = (TargetRotation.Yaw < 0) ? 1.f : -1.f; - } - - TArray Audios; - GetOwner()->GetComponents(Audios); - - if (Audios.Num() == 0) return; - if (soundHasBeenPlayed) return; - - for (auto Audio : Audios) + Move(targetRotation); + }else { - if (Audio->ComponentHasTag("location")) - { - UGameplayStatics::PlaySoundAtLocation(GetOwner(), Audio->Sound, GetOwner()->GetActorLocation(), - GetOwner()->GetActorRotation(), 1, 1, 0, - Audio->AttenuationSettings, nullptr, GetOwner()); - } - else - { - Audio->Play(); - } - } - - soundHasBeenPlayed = true; + GetWorld()->GetTimerManager().SetTimer(handle, [this, TargetRotation]() { + Move(TargetRotation); + }, RotationDelay, 1); + } } void URotatingActor::Rotate() @@ -70,4 +53,37 @@ void URotatingActor::Rotate() FRotator rotation = GetOwner()->GetActorRotation(); rotation.Yaw = TargetAngle; Rotate(rotation); -} \ No newline at end of file +} + +void URotatingActor::Move(const FRotator TargetRotation) +{ + this->targetRotation = TargetRotation; + rotating = true; + tempRotation = (TargetRotation.Yaw < 0) ? -1.f : 1.f; + if (Negative) + { + tempRotation = (TargetRotation.Yaw < 0) ? 1.f : -1.f; + } + + TArray Audios; + GetOwner()->GetComponents(Audios); + + if (Audios.Num() == 0) return; + if (soundHasBeenPlayed) return; + + for (auto Audio : Audios) + { + if (Audio->ComponentHasTag("location")) + { + UGameplayStatics::PlaySoundAtLocation(GetOwner(), Audio->Sound, GetOwner()->GetActorLocation(), + GetOwner()->GetActorRotation(), 1, 1, 0, + Audio->AttenuationSettings, nullptr, GetOwner()); + } + else + { + Audio->Play(); + } + } + + soundHasBeenPlayed = true; +} \ No newline at end of file diff --git a/Source/BuildingEscape/RotatingActor.h b/Source/BuildingEscape/RotatingActor.h index 31f322e..0420ea0 100644 --- a/Source/BuildingEscape/RotatingActor.h +++ b/Source/BuildingEscape/RotatingActor.h @@ -34,7 +34,7 @@ public: float RotationSpeed = 15.f; UPROPERTY(EditAnywhere) - float RotationDelay = 2.f; + float RotationDelay = 0.f; UPROPERTY(EditAnywhere) bool Negative = false; @@ -44,4 +44,5 @@ private: bool rotating; bool soundHasBeenPlayed; float tempRotation; + void Move(FRotator TargetRotation); };