Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "WeaponMod.h"
- #include "Classes/Items/Item.h"
- #include "Weapon.generated.h"
- UENUM(BlueprintType)
- namespace EWeaponType
- {
- enum Type
- {
- WT_POWDER UMETA(DisplayName = "Powder Weapon"),
- WT_LASER UMETA(DisplayName = "Laser Weapon"),
- WT_PLASMA UMETA(DisplayName = "Plasma Weapon"),
- WT_EMPW UMETA(DisplayName = "EMPW"),
- WT_THROWING UMETA(DisplayName = "Throwing Weapon"),
- WT_MELEE UMETA(DisplayName = "Melee Weapon")
- };
- }
- UCLASS()
- class RESISTANCE_API AWeapon : public AItem
- {
- GENERATED_UCLASS_BODY()
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Item")
- TEnumAsByte<EWeaponType::Type> WeaponType;
- // global characteristic
- UPROPERTY(EditAnywhere, Category = "Weapon")
- int32 _damage;
- UPROPERTY(EditAnywhere, Category = "Weapon")
- int32 _fireRate;
- UPROPERTY(EditAnywhere, Category = "Weapon")
- int32 _accuracy;
- UPROPERTY(EditAnywhere, Category = "Weapon")
- int32 _control;
- UPROPERTY(EditAnywhere, Category = "Weapon")
- int32 _reloadTime;
- UPROPERTY(EditAnywhere, Category = "Weapon")
- int32 _magazineSize;
- //mod slots
- UPROPERTY(EditAnywhere, Category = "Modifications")
- bool _useStockSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- TSubclassOf<class AWeaponMod> _stockSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- bool _useBarrelSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- TSubclassOf<class AWeaponMod> _barrelSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- bool _useAimingSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- TSubclassOf<class AWeaponMod> _aimingSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- bool _useMagazineSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- TSubclassOf<class AWeaponMod> _magazineSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- bool _useBarrelAttachmentSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- TSubclassOf<class AWeaponMod> _barrelAttachmentSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- bool _useBottomAttachmentSlot;
- UPROPERTY(EditAnywhere, Category = "Modifications")
- TSubclassOf<class AWeaponMod> _bottomAttachmentSlot;
- public:
- UFUNCTION(BlueprintCallable, Category = "Inventory")
- bool equipMod(TSubclassOf<class AWeaponMod> _modToEquip, TEnumAsByte<EWeaponModType::Type> toSlot);
- UFUNCTION(BlueprintCallable, Category = "Weapon")
- int32 getDamage();
- UFUNCTION(BlueprintCallable, Category = "Weapon")
- int32 getFireRate();
- UFUNCTION(BlueprintCallable, Category = "Weapon")
- int32 getAccuracy();
- UFUNCTION(BlueprintCallable, Category = "Weapon")
- int32 getControl();
- UFUNCTION(BlueprintCallable, Category = "Weapon")
- int32 getReloadTime();
- UFUNCTION(BlueprintCallable, Category = "Weapon")
- int32 getMagazineSize();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement