Advertisement
SirusAmory

Untitled

Sep 27th, 2018
1,122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // © 2018 Eternal Starlight Studios ALL RIGHTS RESERVED
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Actor.h"
  7. #include "Components/SkeletalMeshComponent.h"
  8. #include "WeaponStatsComponent.h"
  9. #include "Components/ArrowComponent.h"
  10. #include "BaseWeapon.generated.h"
  11.  
  12.  
  13. UENUM(BlueprintType)
  14. enum EWeaponType
  15. {
  16.     Pistol,
  17.     SMG,
  18.     Rifle,
  19.     Shotgun,
  20.     Charge,
  21.     Energy,
  22.     RocketLauncher,
  23.     Sniper
  24. };
  25.  
  26. //class UWeaponStatsComponent;
  27.  
  28.  
  29. UCLASS()
  30. class PROJECTMELANIE_API ABaseWeapon : public AActor
  31. {
  32.     GENERATED_BODY()
  33.    
  34. public:
  35.     // Sets default values for this actor's properties
  36.     ABaseWeapon();
  37.  
  38.     //What is the name of the socket that this weapon attaches to
  39.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Data")
  40.         FName WeaponAttachPoint;
  41.  
  42.     //Mainly for VFX - can also be used to spawn projectiles
  43.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Data")
  44.         FName ProjectileSocket;
  45.  
  46.     //UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
  47.     //  TSubclassOf<class UWeaponStatsComponent> WeaponStats;
  48.  
  49.         UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
  50.         UWeaponStatsComponent* WeaponStats = NULL;
  51.  
  52.  
  53.     //Main Abilities
  54.     UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon Type")
  55.         TEnumAsByte<EWeaponType> WeaponType;
  56.  
  57. protected:
  58.     // Called when the game starts or when spawned
  59.     virtual void BeginPlay() override;
  60.  
  61.  
  62. public:
  63.     // Called every frame
  64.     virtual void Tick(float DeltaTime) override;
  65.  
  66.     UPROPERTY(BlueprintReadWrite, VisibleDefaultsOnly, Category = "Mesh")
  67.         USkeletalMeshComponent* WeaponMesh;
  68.  
  69.    
  70.  
  71.     UPROPERTY(BlueprintReadWrite, VisibleDefaultsOnly, Category = "Weapon Data")
  72.         UArrowComponent* FireArrow;
  73.  
  74.     UFUNCTION(BlueprintCallable, Category = "Weapon Attack")
  75.         void Fire();
  76.  
  77.     UFUNCTION(BlueprintCallable, Category = "Weapon Reload")
  78.         void Reload();
  79.    
  80. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement