Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Actor.h"
- #include <Animation/AnimBlueprint.h>
- #include <Animation/AnimationAsset.h>
- #include <Image.h>
- #include <Engine/Texture2D.h>
- #include <Curves/CurveFloat.h>
- #include <Curves/CurveVector.h>
- #include "Item.generated.h"
- UENUM(BlueprintType) //"BlueprintType" is essential to include
- enum class EScopeEnum : uint8
- {
- SE_IronSight UMETA(DisplayName = "Iron Sights"),
- SE_RedDot UMETA(DisplayName = "Red Dot"),
- SE_Scope UMETA(DisplayName = "Scope")
- };
- UCLASS(BlueprintType)
- class TUNICS_API AItem : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- AItem();
- UFUNCTION(BlueprintCallable, Category = Weapon)
- virtual void OnFire();
- UFUNCTION(BlueprintCallable, Category = Weapon)
- virtual void OnReload();
- UFUNCTION(BlueprintCallable, Category = Weapon)
- virtual void OnReloadFinished();
- UFUNCTION(BlueprintCallable, Category = Weapon)
- virtual void OnChambered();
- UFUNCTION(BlueprintCallable, Category = Weapon)
- virtual void OnChamberedFinished();
- UFUNCTION(BlueprintCallable, Category = Weapon)
- UTexture2D* GetIcon();
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Weapon)
- UCurveVector *RecoilCurve;
- bool IsFiring;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- bool CanBeDropped = true;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- UTexture2D* Icon;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- UTexture2D* InventoryImage;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- int SlotSizeX;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- int SlotSizeY;
- UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite, Category = Item)
- bool CanPickup;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- int MaxStackSize = 1;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
- int Stack = 1;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimBlueprintGeneratedClass* ABP;
- protected:
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimationAsset* ChamberAnimation;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimationAsset* ReloadAnimation;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimationAsset* FireAnimation;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimationAsset* EmptyIdleAnimation;
- //TODO Remove
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimationAsset* EquipAnimation;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animation)
- UAnimationAsset* UnEquipAnimation;
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement