I did not bother to name this...

From Baby Pintail, 1 Month ago, written in C++, viewed 51 times.
URL http://codebin.org/view/6fec7a70 Embed
Download Paste or View Raw
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Actor.h"
  7. #include "BaseAudioTrigger.generated.h"
  8.  
  9. UCLASS()
  10. class PLATFORMER3D_API ABaseAudioTrigger : public AActor
  11. {
  12.         GENERATED_BODY()
  13.        
  14. public:
  15.         // Sets default values for this actor's properties
  16.         ABaseAudioTrigger();
  17.  
  18. protected:
  19.         //  We don't need BeginPlay()
  20.         //      Called when the game starts or when spawned
  21.         //      virtual void BeginPlay() override;
  22.  
  23.         virtual void PostInitializeComponents() override;
  24.  
  25. public:
  26.         // We don't need Tick()
  27.         // Called every frame
  28.         // virtual void Tick(float DeltaTime) override;
  29.  
  30. private:
  31.  
  32.         UPROPERTY(EditAnywhere, Category = "Collision")
  33.         class USphereComponent* SphereTrigger;
  34.  
  35.         UPROPERTY(EditDefaultsOnly, Category = "Audio")
  36.         class USoundCue* CollectedCue;
  37.  
  38.         UPROPERTY(EditDefaultsOnly, Category = "Audio")
  39.         class UAudioComponent* CollectableAudioComponent;
  40.  
  41.         UPROPERTY(EditAnywhere, Category = "Particles")
  42.         class UParticleSystem* ParticleEffect;
  43.  
  44.         bool bFinished;
  45.  
  46.         UFUNCTION()
  47.         void OnOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
  48.                 bool bFromSweep, const FHitResult& SweepResult);
  49.        
  50.         UFUNCTION()
  51.         virtual void OnAudioFinished();
  52.  
  53. };
  54.  

Reply to "I did not bother to name this..."

Here you can reply to the paste above