diff --git a/Content/Levels/FactoryHall.umap b/Content/Levels/FactoryHall.umap index 1174b5b..0091779 100644 Binary files a/Content/Levels/FactoryHall.umap and b/Content/Levels/FactoryHall.umap differ diff --git a/Content/Levels/PersistentLevel.umap b/Content/Levels/PersistentLevel.umap index 32d43c1..3b453eb 100644 Binary files a/Content/Levels/PersistentLevel.umap and b/Content/Levels/PersistentLevel.umap differ diff --git a/Content/Levels/PersistentLevel_BuiltData.uasset b/Content/Levels/PersistentLevel_BuiltData.uasset index 742a857..d859e24 100644 Binary files a/Content/Levels/PersistentLevel_BuiltData.uasset and b/Content/Levels/PersistentLevel_BuiltData.uasset differ diff --git a/Content/Levels/Raum4.umap b/Content/Levels/Raum4.umap index 3719dd1..a5b363d 100644 Binary files a/Content/Levels/Raum4.umap and b/Content/Levels/Raum4.umap differ diff --git a/Content/Levels/Untitled.umap b/Content/Levels/Untitled.umap index f03b2e5..74d7bfa 100644 Binary files a/Content/Levels/Untitled.umap and b/Content/Levels/Untitled.umap differ diff --git a/Content/Levels/VillaDesign.umap b/Content/Levels/VillaDesign.umap index 28c67d6..3f020c1 100644 Binary files a/Content/Levels/VillaDesign.umap and b/Content/Levels/VillaDesign.umap differ diff --git a/Content/Levels/pipeMaze.umap b/Content/Levels/pipeMaze.umap index 3d23ae5..563ed47 100644 Binary files a/Content/Levels/pipeMaze.umap and b/Content/Levels/pipeMaze.umap differ diff --git a/Source/BuildingEscape/RotatingActor.cpp b/Source/BuildingEscape/RotatingActor.cpp index d995702..fcb38fd 100644 --- a/Source/BuildingEscape/RotatingActor.cpp +++ b/Source/BuildingEscape/RotatingActor.cpp @@ -9,11 +9,6 @@ URotatingActor::URotatingActor() void URotatingActor::BeginPlay() { Super::BeginPlay(); - AudioComponent = GetOwner()->FindComponentByClass(); - if (!AudioComponent) - { - UE_LOG(LogTemp, Error, TEXT("No audio component found on: %s !"), *GetOwner()->GetName()); - } } void URotatingActor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) @@ -42,10 +37,11 @@ void URotatingActor::Rotate(const FRotator TargetRotation) { tempRotation = (TargetRotation.Yaw < 0) ? 1.f : -1.f; } - - if(AudioComponent != nullptr && !soundHasBeenPlayed) + + UAudioComponent * Audio = GetOwner()->FindComponentByClass(); + if(Audio != nullptr && !soundHasBeenPlayed) { - AudioComponent->Play(); + Audio->Play(); soundHasBeenPlayed = true; } } diff --git a/Source/BuildingEscape/RotatingActor.h b/Source/BuildingEscape/RotatingActor.h index ff0b0a4..b2e5879 100644 --- a/Source/BuildingEscape/RotatingActor.h +++ b/Source/BuildingEscape/RotatingActor.h @@ -31,9 +31,6 @@ public: UPROPERTY(EditAnywhere) float TargetAngle = 90.0f; - UPROPERTY(EditAnywhere) - UAudioComponent * AudioComponent; - UPROPERTY(EditAnywhere) float RotationSpeed = 15.f;