Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // © 2018 Eternal Starlight Studios ALL RIGHTS RESERVED
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Actor.h"
- #include "Components/SkeletalMeshComponent.h"
- #include "WeaponStatsComponent.h"
- #include "Components/ArrowComponent.h"
- #include "BaseWeapon.generated.h"
- UENUM(BlueprintType)
- enum EWeaponType
- {
- Pistol,
- SMG,
- Rifle,
- Shotgun,
- Charge,
- Energy,
- RocketLauncher,
- Sniper
- };
- //class UWeaponStatsComponent;
- UCLASS()
- class PROJECTMELANIE_API ABaseWeapon : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- ABaseWeapon();
- //What is the name of the socket that this weapon attaches to
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Data")
- FName WeaponAttachPoint;
- //Mainly for VFX - can also be used to spawn projectiles
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon Data")
- FName ProjectileSocket;
- //UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
- // TSubclassOf<class UWeaponStatsComponent> WeaponStats;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Components")
- UWeaponStatsComponent* WeaponStats = NULL;
- //Main Abilities
- UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon Type")
- TEnumAsByte<EWeaponType> WeaponType;
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- UPROPERTY(BlueprintReadWrite, VisibleDefaultsOnly, Category = "Mesh")
- USkeletalMeshComponent* WeaponMesh;
- UPROPERTY(BlueprintReadWrite, VisibleDefaultsOnly, Category = "Weapon Data")
- UArrowComponent* FireArrow;
- UFUNCTION(BlueprintCallable, Category = "Weapon Attack")
- void Fire();
- UFUNCTION(BlueprintCallable, Category = "Weapon Reload")
- void Reload();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement