Advertisement
Dirt113

DHItemInfo.h and DHWeaponInfo.h

Nov 9th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.11 KB | None | 0 0
  1. /*******************************************************************************/
  2. ///////////////////// DHItemInfo.h ////////////////////////////////////////////
  3. // Copyright 2015 Dirt Productions. All rights reserved.
  4.  
  5. #pragma once
  6.  
  7. #include "Public/Gameplay/Data/DHInfo.h"
  8. #include "DHItemInfo.generated.h"
  9.  
  10. /**
  11.  *
  12.  */
  13. UCLASS()
  14. class DISTANTHOME_API ADHItemInfo : public ADHInfo
  15. {
  16.     GENERATED_BODY()
  17.    
  18.    
  19.    
  20.    
  21. };
  22.  
  23. USTRUCT(BlueprintType)
  24. // Item information
  25. struct FItemInfo
  26. {
  27.     GENERATED_USTRUCT_BODY();
  28.  
  29.     UPROPERTY()
  30.         FText ItemID;
  31.  
  32.     UPROPERTY()
  33.         FText ItemDisplayName;
  34.  
  35.     UPROPERTY()
  36.         float ItemPrice;
  37.  
  38.     FItemInfo(FText NewItemID, float NewItemPrice)
  39.     {
  40.         ItemID, ItemDisplayName = NewItemID;
  41.         ItemPrice = NewItemPrice;
  42.        
  43.     }
  44.  
  45.     FItemInfo(FText NewItemID, FText NewItemDisplayName, float NewItemPrice)
  46.     {
  47.         ItemID = NewItemID;
  48.         ItemDisplayName = NewItemDisplayName;
  49.         ItemPrice = NewItemPrice;
  50.     }
  51. };
  52.  
  53. /*******************************************************************************/
  54. ///////////////////// DHWeaponInfo.h ////////////////////////////////////////////
  55.  
  56. // Copyright 2015 Dirt Productions. All rights reserved.
  57.  
  58. #pragma once
  59.  
  60. #include "Public/Gameplay/Data/Item/DHItemInfo.h"
  61. #include "DHWeaponInfo.generated.h"
  62.  
  63. /**
  64.  *
  65.  */
  66. UCLASS()
  67. class DISTANTHOME_API ADHWeaponInfo : public ADHItemInfo
  68. {
  69.     GENERATED_BODY()
  70.    
  71.    
  72.    
  73.    
  74. };
  75.  
  76. USTRUCT(BlueprintType)
  77. // Weapon information
  78. struct FWeaponInfo : public FItemInfo
  79. {
  80.     GENERATED_USTRUCT_BODY();
  81.  
  82.     UPROPERTY()
  83.         float BulletSpread;
  84.  
  85.     UPROPERTY()
  86.         float Recoil;
  87.  
  88.     UPROPERTY()
  89.         float Damage;
  90.  
  91.     FWeaponInfo(FText NewItemID, float NewItemPrice, float NewBulletSpread, float NewRecoil, float NewDamage) : FItemInfo(NewItemID, NewItemPrice)
  92.     {
  93.         BulletSpread = NewBulletSpread;
  94.         Recoil = NewRecoil;
  95.         Damage = NewDamage;
  96.     }
  97.  
  98.     FWeaponInfo(FText NewItemID, FText NewItemDisplayName, float NewItemPrice, float NewBulletSpread, float NewRecoil, float NewDamage) : FItemInfo(NewItemID, NewItemDisplayName, NewItemPrice)
  99.     {
  100.         BulletSpread = NewBulletSpread;
  101.         Recoil = NewRecoil;
  102.         Damage = NewDamage;
  103.     }
  104. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement