Advertisement
Guest User

Untitled

a guest
Jun 16th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.12 KB | None | 0 0
  1. // Copyright Damir Halilovic 2014 - 2015
  2.  
  3. #pragma once
  4.  
  5. #include "GameFramework/Actor.h"
  6. #include "WeaponBase.h"
  7. #include "RangedWeaponBase.generated.h"
  8.  
  9. UCLASS()
  10. class PROJECTWA_API ARangedWeaponBase : public AWeaponBase
  11. {
  12.     GENERATED_UCLASS_BODY()
  13.  
  14. public:
  15.     UPROPERTY(Category = "Wa Combat", VisibleAnywhere, BlueprintReadOnly)
  16.     UChildActorComponent* ProjectileChildActor;
  17.  
  18. public:
  19.     UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Wa Weapons")
  20.     TSubclassOf<class AProjectileBase> ProjectileClass;
  21.  
  22. public:
  23.     UFUNCTION(BlueprintCallable, Category = "Wa Weapons")
  24.     void FireProjectile(const FVector& Direction, const float SpeedMultiplier = 1.f, const bool bWorldSpace = true);
  25.     UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Wa Weapons")
  26.     bool IsLoaded() const;
  27.     UFUNCTION(BlueprintCallable, Category = "Wa Weapons")
  28.     void Reload();
  29.  
  30.     bool ProcessProjectileDamage(AActor* OtherActor);
  31.    
  32. public:
  33.  
  34.  
  35.     // Called when the game starts or when spawned
  36.     virtual void BeginPlay() override;
  37.    
  38.     virtual void OnConstruction(const FTransform& Transform) override;
  39.  
  40. private:
  41.     bool bIsLoaded;
  42.    
  43.    
  44. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement