diff --git a/Content/Assets/Blocks/SM_Block.uasset b/Content/Assets/Blocks/SM_Block.uasset index d3c62f7..ab41a6c 100644 Binary files a/Content/Assets/Blocks/SM_Block.uasset and b/Content/Assets/Blocks/SM_Block.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Explosive_BaseColor.uasset b/Content/Assets/Blocks/Textures/SM_Block_Explosive_BaseColor.uasset new file mode 100644 index 0000000..837866e Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Explosive_BaseColor.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Explosive_Normal.uasset b/Content/Assets/Blocks/Textures/SM_Block_Explosive_Normal.uasset new file mode 100644 index 0000000..02cc485 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Explosive_Normal.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Explosive_OcclusionRoughnessMetallic.uasset b/Content/Assets/Blocks/Textures/SM_Block_Explosive_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..65f16f3 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Explosive_OcclusionRoughnessMetallic.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Moving_BaseColor.uasset b/Content/Assets/Blocks/Textures/SM_Block_Moving_BaseColor.uasset new file mode 100644 index 0000000..1ec9ea3 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Moving_BaseColor.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Moving_Normal.uasset b/Content/Assets/Blocks/Textures/SM_Block_Moving_Normal.uasset new file mode 100644 index 0000000..2d3bbed Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Moving_Normal.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Moving_OcclusionRoughnessMetallic.uasset b/Content/Assets/Blocks/Textures/SM_Block_Moving_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..22f88cf Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Moving_OcclusionRoughnessMetallic.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Multi_BaseColor.uasset b/Content/Assets/Blocks/Textures/SM_Block_Multi_BaseColor.uasset new file mode 100644 index 0000000..1fddc68 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Multi_BaseColor.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Multi_Normal.uasset b/Content/Assets/Blocks/Textures/SM_Block_Multi_Normal.uasset new file mode 100644 index 0000000..7c23ac0 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Multi_Normal.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Multi_OcclusionRoughnessMetallic.uasset b/Content/Assets/Blocks/Textures/SM_Block_Multi_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..bf2f8ee Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Multi_OcclusionRoughnessMetallic.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Regenerative_BaseColor.uasset b/Content/Assets/Blocks/Textures/SM_Block_Regenerative_BaseColor.uasset new file mode 100644 index 0000000..5a4ceb4 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Regenerative_BaseColor.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Regenerative_Normal.uasset b/Content/Assets/Blocks/Textures/SM_Block_Regenerative_Normal.uasset new file mode 100644 index 0000000..34f99a7 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Regenerative_Normal.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Regenerative_OcclusionRoughnessMetallic.uasset b/Content/Assets/Blocks/Textures/SM_Block_Regenerative_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..d1841b2 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Regenerative_OcclusionRoughnessMetallic.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Singlehit_BaseColor.uasset b/Content/Assets/Blocks/Textures/SM_Block_Singlehit_BaseColor.uasset new file mode 100644 index 0000000..32c722f Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Singlehit_BaseColor.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Singlehit_Normal.uasset b/Content/Assets/Blocks/Textures/SM_Block_Singlehit_Normal.uasset new file mode 100644 index 0000000..8dd8275 Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Singlehit_Normal.uasset differ diff --git a/Content/Assets/Blocks/Textures/SM_Block_Singlehit_OcclusionRoughnessMetallic.uasset b/Content/Assets/Blocks/Textures/SM_Block_Singlehit_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..9db73fc Binary files /dev/null and b/Content/Assets/Blocks/Textures/SM_Block_Singlehit_OcclusionRoughnessMetallic.uasset differ diff --git a/Content/Blueprints/BP_FireworkBase.uasset b/Content/Blueprints/BP_FireworkBase.uasset index 21ca3a1..187c16b 100644 Binary files a/Content/Blueprints/BP_FireworkBase.uasset and b/Content/Blueprints/BP_FireworkBase.uasset differ diff --git a/Content/Blueprints/BP_FireworksPawn.uasset b/Content/Blueprints/BP_FireworksPawn.uasset index e9f260a..988f436 100644 Binary files a/Content/Blueprints/BP_FireworksPawn.uasset and b/Content/Blueprints/BP_FireworksPawn.uasset differ diff --git a/Content/Blueprints/BP_InventoryCrateBase.uasset b/Content/Blueprints/BP_InventoryCrateBase.uasset index b8b6798..69b9256 100644 Binary files a/Content/Blueprints/BP_InventoryCrateBase.uasset and b/Content/Blueprints/BP_InventoryCrateBase.uasset differ diff --git a/Content/Blueprints/BP_Lighter.uasset b/Content/Blueprints/BP_Lighter.uasset index cc769fa..b6f4f63 100644 Binary files a/Content/Blueprints/BP_Lighter.uasset and b/Content/Blueprints/BP_Lighter.uasset differ diff --git a/Content/Blueprints/BP_PowerupBase.uasset b/Content/Blueprints/BP_PowerupBase.uasset new file mode 100644 index 0000000..44662b3 Binary files /dev/null and b/Content/Blueprints/BP_PowerupBase.uasset differ diff --git a/Content/Blueprints/BP_SpawnManager.uasset b/Content/Blueprints/BP_SpawnManager.uasset index 689517e..a3e4759 100644 Binary files a/Content/Blueprints/BP_SpawnManager.uasset and b/Content/Blueprints/BP_SpawnManager.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_1.uasset b/Content/Blueprints/Blocks/BP_Block_1.uasset deleted file mode 100644 index eda293b..0000000 Binary files a/Content/Blueprints/Blocks/BP_Block_1.uasset and /dev/null differ diff --git a/Content/Blueprints/Blocks/BP_Block_4.uasset b/Content/Blueprints/Blocks/BP_Block_4.uasset deleted file mode 100644 index c88ca9c..0000000 Binary files a/Content/Blueprints/Blocks/BP_Block_4.uasset and /dev/null differ diff --git a/Content/Blueprints/Blocks/BP_Block_Basic.uasset b/Content/Blueprints/Blocks/BP_Block_Basic.uasset new file mode 100644 index 0000000..1c5e3f5 Binary files /dev/null and b/Content/Blueprints/Blocks/BP_Block_Basic.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_3.uasset b/Content/Blueprints/Blocks/BP_Block_Explosive.uasset similarity index 57% rename from Content/Blueprints/Blocks/BP_Block_3.uasset rename to Content/Blueprints/Blocks/BP_Block_Explosive.uasset index a09e6dd..4989287 100644 Binary files a/Content/Blueprints/Blocks/BP_Block_3.uasset and b/Content/Blueprints/Blocks/BP_Block_Explosive.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_Gummy.uasset b/Content/Blueprints/Blocks/BP_Block_Gummy.uasset new file mode 100644 index 0000000..65cde2f Binary files /dev/null and b/Content/Blueprints/Blocks/BP_Block_Gummy.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_5.uasset b/Content/Blueprints/Blocks/BP_Block_Moving.uasset similarity index 55% rename from Content/Blueprints/Blocks/BP_Block_5.uasset rename to Content/Blueprints/Blocks/BP_Block_Moving.uasset index 2da80eb..7bb61e6 100644 Binary files a/Content/Blueprints/Blocks/BP_Block_5.uasset and b/Content/Blueprints/Blocks/BP_Block_Moving.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_Portal.uasset b/Content/Blueprints/Blocks/BP_Block_Portal.uasset new file mode 100644 index 0000000..c32a40c Binary files /dev/null and b/Content/Blueprints/Blocks/BP_Block_Portal.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_Regenerative.uasset b/Content/Blueprints/Blocks/BP_Block_Regenerative.uasset new file mode 100644 index 0000000..7013cd3 Binary files /dev/null and b/Content/Blueprints/Blocks/BP_Block_Regenerative.uasset differ diff --git a/Content/Blueprints/Blocks/BP_Block_2.uasset b/Content/Blueprints/Blocks/BP_Block_Tough.uasset similarity index 59% rename from Content/Blueprints/Blocks/BP_Block_2.uasset rename to Content/Blueprints/Blocks/BP_Block_Tough.uasset index 0060296..5bbad06 100644 Binary files a/Content/Blueprints/Blocks/BP_Block_2.uasset and b/Content/Blueprints/Blocks/BP_Block_Tough.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_InstantDeath.uasset b/Content/Blueprints/Fireworks/BP_Bouncing.uasset similarity index 55% rename from Content/Blueprints/Fireworks/BP_InstantDeath.uasset rename to Content/Blueprints/Fireworks/BP_Bouncing.uasset index 47db145..74e973e 100644 Binary files a/Content/Blueprints/Fireworks/BP_InstantDeath.uasset and b/Content/Blueprints/Fireworks/BP_Bouncing.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_AtomBomb.uasset b/Content/Blueprints/Fireworks/BP_Cluster.uasset similarity index 65% rename from Content/Blueprints/Fireworks/BP_AtomBomb.uasset rename to Content/Blueprints/Fireworks/BP_Cluster.uasset index 8e961d0..97f7a51 100644 Binary files a/Content/Blueprints/Fireworks/BP_AtomBomb.uasset and b/Content/Blueprints/Fireworks/BP_Cluster.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_GreenGoblin.uasset b/Content/Blueprints/Fireworks/BP_GreenGoblin.uasset deleted file mode 100644 index 4c453dc..0000000 Binary files a/Content/Blueprints/Fireworks/BP_GreenGoblin.uasset and /dev/null differ diff --git a/Content/Blueprints/Fireworks/BP_Impact.uasset b/Content/Blueprints/Fireworks/BP_Impact.uasset new file mode 100644 index 0000000..e6f17dd Binary files /dev/null and b/Content/Blueprints/Fireworks/BP_Impact.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_Panzerfaust.uasset b/Content/Blueprints/Fireworks/BP_Panzerfaust.uasset deleted file mode 100644 index 8c984ba..0000000 Binary files a/Content/Blueprints/Fireworks/BP_Panzerfaust.uasset and /dev/null differ diff --git a/Content/Blueprints/Fireworks/BP_QuadrupleBazooka.uasset b/Content/Blueprints/Fireworks/BP_QuadrupleBazooka.uasset deleted file mode 100644 index f18dd19..0000000 Binary files a/Content/Blueprints/Fireworks/BP_QuadrupleBazooka.uasset and /dev/null differ diff --git a/Content/Blueprints/Fireworks/BP_RedDragon.uasset b/Content/Blueprints/Fireworks/BP_RedDragon.uasset deleted file mode 100644 index 3010a82..0000000 Binary files a/Content/Blueprints/Fireworks/BP_RedDragon.uasset and /dev/null differ diff --git a/Content/Blueprints/Fireworks/BP_Kamikaze.uasset b/Content/Blueprints/Fireworks/BP_RocketGuided.uasset similarity index 64% rename from Content/Blueprints/Fireworks/BP_Kamikaze.uasset rename to Content/Blueprints/Fireworks/BP_RocketGuided.uasset index 34f963b..88e3403 100644 Binary files a/Content/Blueprints/Fireworks/BP_Kamikaze.uasset and b/Content/Blueprints/Fireworks/BP_RocketGuided.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_Whistle.uasset b/Content/Blueprints/Fireworks/BP_RocketImpact.uasset similarity index 64% rename from Content/Blueprints/Fireworks/BP_Whistle.uasset rename to Content/Blueprints/Fireworks/BP_RocketImpact.uasset index 52fb4f8..b3dc169 100644 Binary files a/Content/Blueprints/Fireworks/BP_Whistle.uasset and b/Content/Blueprints/Fireworks/BP_RocketImpact.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_RocketLauncher.uasset b/Content/Blueprints/Fireworks/BP_RocketLauncher.uasset deleted file mode 100644 index 923846c..0000000 Binary files a/Content/Blueprints/Fireworks/BP_RocketLauncher.uasset and /dev/null differ diff --git a/Content/Blueprints/Fireworks/BP_RedHornet.uasset b/Content/Blueprints/Fireworks/BP_RocketTimed.uasset similarity index 65% rename from Content/Blueprints/Fireworks/BP_RedHornet.uasset rename to Content/Blueprints/Fireworks/BP_RocketTimed.uasset index f8c3ad3..65cd690 100644 Binary files a/Content/Blueprints/Fireworks/BP_RedHornet.uasset and b/Content/Blueprints/Fireworks/BP_RocketTimed.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_LongFuse.uasset b/Content/Blueprints/Fireworks/BP_Sticky.uasset similarity index 55% rename from Content/Blueprints/Fireworks/BP_LongFuse.uasset rename to Content/Blueprints/Fireworks/BP_Sticky.uasset index 080beaf..b2a50b1 100644 Binary files a/Content/Blueprints/Fireworks/BP_LongFuse.uasset and b/Content/Blueprints/Fireworks/BP_Sticky.uasset differ diff --git a/Content/Blueprints/Fireworks/BP_WhiteWidow.uasset b/Content/Blueprints/Fireworks/BP_WhiteWidow.uasset deleted file mode 100644 index d62870f..0000000 Binary files a/Content/Blueprints/Fireworks/BP_WhiteWidow.uasset and /dev/null differ diff --git a/Content/Blueprints/UI/BP_Menu.uasset b/Content/Blueprints/UI/BP_Menu.uasset index 4de542f..6c07c2b 100644 Binary files a/Content/Blueprints/UI/BP_Menu.uasset and b/Content/Blueprints/UI/BP_Menu.uasset differ diff --git a/Content/Blueprints/UI/BP_WristMenu.uasset b/Content/Blueprints/UI/BP_WristMenu.uasset index 00f4d1e..588c71d 100644 Binary files a/Content/Blueprints/UI/BP_WristMenu.uasset and b/Content/Blueprints/UI/BP_WristMenu.uasset differ diff --git a/Content/Data/DT_FireworkTemplates.uasset b/Content/Data/DT_FireworkTemplates.uasset index 0649822..02967c0 100644 Binary files a/Content/Data/DT_FireworkTemplates.uasset and b/Content/Data/DT_FireworkTemplates.uasset differ diff --git a/Content/Levels/L_LevelBase.uasset b/Content/Levels/L_LevelBase.uasset new file mode 100644 index 0000000..c5bed65 Binary files /dev/null and b/Content/Levels/L_LevelBase.uasset differ diff --git a/Content/Levels/L_MainLevel.umap b/Content/Levels/L_MainLevel.umap index d1bc49a..bc5f1ca 100644 Binary files a/Content/Levels/L_MainLevel.umap and b/Content/Levels/L_MainLevel.umap differ diff --git a/Content/Materials/M_BG_Sphere.uasset b/Content/Materials/M_BG_Sphere.uasset new file mode 100644 index 0000000..3f1dade Binary files /dev/null and b/Content/Materials/M_BG_Sphere.uasset differ diff --git a/Content/Materials/M_Block.uasset b/Content/Materials/M_Block.uasset index b2947cf..6870aed 100644 Binary files a/Content/Materials/M_Block.uasset and b/Content/Materials/M_Block.uasset differ diff --git a/Content/Materials/M_Block_2.uasset b/Content/Materials/M_Block_2.uasset deleted file mode 100644 index 0c741b5..0000000 Binary files a/Content/Materials/M_Block_2.uasset and /dev/null differ diff --git a/Content/Materials/M_Block_3.uasset b/Content/Materials/M_Block_3.uasset deleted file mode 100644 index 9c01461..0000000 Binary files a/Content/Materials/M_Block_3.uasset and /dev/null differ diff --git a/Content/Materials/M_Block_4.uasset b/Content/Materials/M_Block_4.uasset deleted file mode 100644 index da206f2..0000000 Binary files a/Content/Materials/M_Block_4.uasset and /dev/null differ diff --git a/Content/Materials/M_Block_5.uasset b/Content/Materials/M_Block_5.uasset deleted file mode 100644 index caaece1..0000000 Binary files a/Content/Materials/M_Block_5.uasset and /dev/null differ diff --git a/Content/Materials/M_Block_Explosive.uasset b/Content/Materials/M_Block_Explosive.uasset new file mode 100644 index 0000000..7785ffd Binary files /dev/null and b/Content/Materials/M_Block_Explosive.uasset differ diff --git a/Content/Materials/M_Block_Moving.uasset b/Content/Materials/M_Block_Moving.uasset new file mode 100644 index 0000000..ea33658 Binary files /dev/null and b/Content/Materials/M_Block_Moving.uasset differ diff --git a/Content/Materials/M_Block_Multihit.uasset b/Content/Materials/M_Block_Multihit.uasset new file mode 100644 index 0000000..ed54244 Binary files /dev/null and b/Content/Materials/M_Block_Multihit.uasset differ diff --git a/Content/Materials/M_Block_Regenerative.uasset b/Content/Materials/M_Block_Regenerative.uasset new file mode 100644 index 0000000..b222818 Binary files /dev/null and b/Content/Materials/M_Block_Regenerative.uasset differ diff --git a/Content/Materials/M_Block_1.uasset b/Content/Materials/M_Block_Singlehit.uasset similarity index 76% rename from Content/Materials/M_Block_1.uasset rename to Content/Materials/M_Block_Singlehit.uasset index 470feef..8a3f06d 100644 Binary files a/Content/Materials/M_Block_1.uasset and b/Content/Materials/M_Block_Singlehit.uasset differ diff --git a/Content/UI/UI_ShopTile.uasset b/Content/UI/UI_ShopTile.uasset index 717aafe..2813661 100644 Binary files a/Content/UI/UI_ShopTile.uasset and b/Content/UI/UI_ShopTile.uasset differ diff --git a/Content/UI/W_Shop.uasset b/Content/UI/W_Shop.uasset index 56bb6b5..f9cf1a6 100644 Binary files a/Content/UI/W_Shop.uasset and b/Content/UI/W_Shop.uasset differ diff --git a/Source/FireworkDuels/BuildingBlock.h b/Source/FireworkDuels/BuildingBlock.h index 6228898..9256284 100644 --- a/Source/FireworkDuels/BuildingBlock.h +++ b/Source/FireworkDuels/BuildingBlock.h @@ -21,6 +21,9 @@ public: UPROPERTY(BlueprintReadWrite, EditAnywhere) float Health = 100.0f; + UPROPERTY(BlueprintReadOnly) + int32 Index = 0; + UPROPERTY(BlueprintReadOnly) float InitialHealth; diff --git a/Source/FireworkDuels/CustomDataTypes.h b/Source/FireworkDuels/CustomDataTypes.h index 5d5c4f3..d0f2752 100644 --- a/Source/FireworkDuels/CustomDataTypes.h +++ b/Source/FireworkDuels/CustomDataTypes.h @@ -14,35 +14,24 @@ UENUM(BlueprintType) enum FireworksCategory { Firecracker UMETA(DisplayName="Firecracker"), - Volcano UMETA(DisplayName = "Volcano"), RomanFire UMETA(DisplayName = "RomanFire"), Rocket UMETA(DisplayName = "Rocket"), - Battery UMETA(DisplayName = "Battery"), None UMETA(DisplayName="None") }; UENUM(BlueprintType) enum Firework { - RedDragon UMETA(DisplayName = "RedDragon"), - Pirate UMETA(DisplayName = "Pirate"), - DoubleTrouble UMETA(DisplayName = "DoubleTrouble"), - InstantDeath UMETA(DisplayName = "InstantDeath"), - LongFuse UMETA(DisplayName = "LongFuse"), - WhiteWidow UMETA(DisplayName = "WhiteWidow"), - GreenGoblin UMETA(DisplayName = "GreenGoblin"), - TwelveGauge UMETA(DisplayName = "TwelveGauge"), - Comet5000 UMETA(DisplayName = "Comet5000"), - TwentyMegaton UMETA(DisplayName = "TwentyMegaton"), - Whistle UMETA(DisplayName = "Whistle"), - RedHornet UMETA(DisplayName = "RedHornet"), - BigDaddy UMETA(DisplayName = "BigDaddy"), - Kamikaze UMETA(DisplayName = "Kamikaze"), - Commando3000 UMETA(DisplayName = "Commando3000"), - AtomBomb UMETA(DisplayName = "AtomBomb"), - QuadrupleBazooka UMETA(DisplayName = "QuadrupleBazooka"), - RocketLauncher UMETA(DisplayName = "RocketLauncher"), - Panzerfaust UMETA(DisplayName = "Panzerfaust"), + Impact UMETA(DisplayName = "Impact"), + Timed UMETA(DisplayName = "Timed"), + Sticky UMETA(DisplayName = "Sticky"), + Cluster UMETA(DisplayName = "Cluster"), + ImpactRocket UMETA(DisplayName = "ImpactRocket"), + TimedRocket UMETA(DisplayName = "TimedRocket"), + ClusterRocket UMETA(DisplayName = "ClusterRocket"), + StickyRocket UMETA(DisplayName = "StickyRocket"), + GuidedRocket UMETA(DisplayName = "GuidedRocket"), + Lighter UMETA(DisplayName = "Lighter"), }; @@ -71,26 +60,6 @@ struct FIREWORKDUELS_API FFireworkData : public FTableRowBase UTexture2D* Icon = nullptr; }; -// Inventory Firework Entry -USTRUCT(BlueprintType) -struct FIREWORKDUELS_API FFireworkEntry -{ - GENERATED_BODY() - - FFireworkEntry(){} - - FFireworkEntry(FFireworkData Data, int32 ThisQuantity) - { - FireworkData = Data; - Quantity = ThisQuantity; - } - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - FFireworkData FireworkData; - - UPROPERTY(EditAnywhere, BlueprintReadWrite) - int32 Quantity; -}; // Inventory USTRUCT(BlueprintType) @@ -99,7 +68,7 @@ struct FIREWORKDUELS_API FInventory GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray Items; + TArray Items; }; diff --git a/Source/FireworkDuels/FireworkBase.h b/Source/FireworkDuels/FireworkBase.h index ed288e6..1297db8 100644 --- a/Source/FireworkDuels/FireworkBase.h +++ b/Source/FireworkDuels/FireworkBase.h @@ -8,6 +8,7 @@ #include "Components/CapsuleComponent.h" #include "WickComponent.h" #include "NiagaraComponent.h" +#include "Kismet/KismetSystemLibrary.h" #include "FireworkBase.generated.h" UCLASS() @@ -37,6 +38,9 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite) bool IsBurning; + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float DamageRadius = 25.f; + UPROPERTY(EditDefaultsOnly) bool IsDummyObject; @@ -60,5 +64,4 @@ public: UFUNCTION(BlueprintImplementableEvent, BlueprintCallable) void ExplodeEffects(); - }; diff --git a/Source/FireworkDuels/FireworkDuels.Build.cs b/Source/FireworkDuels/FireworkDuels.Build.cs index d9df9e9..741b3b9 100644 --- a/Source/FireworkDuels/FireworkDuels.Build.cs +++ b/Source/FireworkDuels/FireworkDuels.Build.cs @@ -8,7 +8,7 @@ public class FireworkDuels : ModuleRules { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; - PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "Niagara", "UMG" }); + PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "Niagara", "UMG", "Paper2D" }); PrivateDependencyModuleNames.AddRange(new string[] { }); diff --git a/Source/FireworkDuels/FireworksPawn.cpp b/Source/FireworkDuels/FireworksPawn.cpp index 3d9c15f..bf4afb3 100644 --- a/Source/FireworkDuels/FireworksPawn.cpp +++ b/Source/FireworkDuels/FireworksPawn.cpp @@ -238,18 +238,6 @@ bool AFireworksPawn::Drop(EControllerHand Hand) return true; } -// Add firecracker to inventory -void AFireworksPawn::AddToInventory(const FFireworkEntry& Entry) -{ - -} - -// Remove firecracker from inventory -void AFireworksPawn::RemoveFromInventory(const FFireworkData& Item) -{ - -} - // Enable laser on specific hand void AFireworksPawn::EnableLaserOnHand(EControllerHand Hand) { diff --git a/Source/FireworkDuels/FireworksPawn.h b/Source/FireworkDuels/FireworksPawn.h index 3656f6e..2c9fb0a 100644 --- a/Source/FireworkDuels/FireworksPawn.h +++ b/Source/FireworkDuels/FireworksPawn.h @@ -81,8 +81,8 @@ public: // Variables - UPROPERTY(BlueprintReadWrite) - FInventory Inventory; + UPROPERTY(BlueprintReadWrite, EditAnywhere) + TArray Inventory; UPROPERTY(BlueprintReadWrite) APickableObject* HeldObject_R; @@ -123,9 +123,6 @@ public: UPROPERTY(VisibleAnywhere, BlueprintReadOnly) FHitResult CurrentLaserHitR; - UPROPERTY(EditAnywhere, BlueprintReadWrite) - AActor* TeleportVisual; - // How much velocity samples should be recorded for throwing direction approximation UPROPERTY(EditDefaultsOnly, Category = "Throwing") int32 VelocitySamples = 5; @@ -159,14 +156,6 @@ public: // Approximate throw velocity FVector ApproximateThrowVelocity(EControllerHand Hand); - // Add firecracker to inventory - UFUNCTION(BlueprintCallable) - void AddToInventory(const FFireworkEntry& Entry); - - // Remove firecracker from inventory - UFUNCTION(BlueprintCallable) - void RemoveFromInventory(const FFireworkData& Item); - // ABA ABA UFUNCTION(BlueprintCallable) void EnableLaserOnHand(EControllerHand Hand); diff --git a/Source/FireworkDuels/InventoryItem.h b/Source/FireworkDuels/InventoryItem.h index 2c4a4e2..91dc378 100644 --- a/Source/FireworkDuels/InventoryItem.h +++ b/Source/FireworkDuels/InventoryItem.h @@ -36,7 +36,7 @@ public: UStaticMesh* StaticMesh; UPROPERTY(BlueprintReadOnly) - FFireworkEntry FireworkEntryData; + FFireworkData FireworkData; UPROPERTY(BlueprintReadOnly, VisibleAnywhere) float TargetDistanceAlongSpline; diff --git a/Source/FireworkDuels/InventoryManager.cpp b/Source/FireworkDuels/InventoryManager.cpp index d016fcd..318506f 100644 --- a/Source/FireworkDuels/InventoryManager.cpp +++ b/Source/FireworkDuels/InventoryManager.cpp @@ -1,71 +1 @@ #include "InventoryManager.h" - -// Add item to inventory -void AInventoryManager::AddToInventory(const FFireworkData& Item, const int32& Quantity, const APawn* Pawn) -{ - FInventory* InventoryToUpdate = Inventory.Find(Pawn); - - // If there's no inventory associated with supplied pawn, create one - if (!InventoryToUpdate) - { - InventoryToUpdate = new FInventory(); - } - - FFireworkEntry* ItemToUpdate = InventoryToUpdate->Items.FindByPredicate([&](const FFireworkEntry& ThisItem) - { - return ThisItem.FireworkData.Firework == Item.Firework; - }); - - if (ItemToUpdate == nullptr) { - UE_LOG(LogTemp, Warning, TEXT("ItemToUpdate not found - creating one")); - ItemToUpdate = new FFireworkEntry(Item, Quantity); - InventoryToUpdate->Items.Add(*ItemToUpdate); - } - else { - UE_LOG(LogTemp, Warning, TEXT("ItemToUpdate was found, updating...")); - ItemToUpdate->Quantity += 1; - } -} - -// Remove item from inventory -void AInventoryManager::RemoveFromInventory(const FFireworkData& Item, const APawn* Pawn) -{ - // code -} - -// Remove all items of a specified player from inventory (for example if he quits match mid game) -void AInventoryManager::RemovePlayerItems(const APawn* Pawn) -{ - // code -} - -// Get joint inventory of all players -FInventory AInventoryManager::GetInventory() -{ - FInventory Joint; - TArray Pawns; - Inventory.GetKeys(Pawns); - - for (int32 i = 0; i < Pawns.Num(); i++) - { - FInventory* ThisInventory = Inventory.Find(Pawns[i]); - for (int32 f = 0; f < ThisInventory->Items.Num(); f++) - { - // Check if items of this category already exist in joint inventory - FFireworkEntry* ItemToUpdate = Joint.Items.FindByPredicate([&](const FFireworkEntry& ThisItem) { - return ThisItem.FireworkData.Firework == ThisInventory->Items[i].FireworkData.Firework; - }); - - if (ItemToUpdate == nullptr) { - ItemToUpdate = &ThisInventory->Items[i]; - } - else { - ItemToUpdate->Quantity += ThisInventory->Items[i].Quantity; - } - - Joint.Items.Add(*ItemToUpdate); - } - } - - return Joint; -} \ No newline at end of file diff --git a/Source/FireworkDuels/InventoryManager.h b/Source/FireworkDuels/InventoryManager.h index f47b230..09a80c5 100644 --- a/Source/FireworkDuels/InventoryManager.h +++ b/Source/FireworkDuels/InventoryManager.h @@ -16,17 +16,4 @@ class FIREWORKDUELS_API AInventoryManager : public AActor public: UPROPERTY(BlueprintReadOnly) TMap Inventory; - - UFUNCTION(BlueprintCallable) - void AddToInventory(const FFireworkData& Item, const int32& Quantity, const APawn* Pawn); - - UFUNCTION(BlueprintCallable) - void RemoveFromInventory(const FFireworkData& Item, const APawn* Pawn); - - UFUNCTION(BlueprintCallable) - void RemovePlayerItems(const APawn* Pawn); - - UFUNCTION(BlueprintCallable) - FInventory GetInventory(); - }; \ No newline at end of file diff --git a/Source/FireworkDuels/Private/LevelTemplate.cpp b/Source/FireworkDuels/Private/LevelTemplate.cpp new file mode 100644 index 0000000..718a59e --- /dev/null +++ b/Source/FireworkDuels/Private/LevelTemplate.cpp @@ -0,0 +1,27 @@ +// All rights reserved. + + +#include "LevelTemplate.h" + +// Sets default values +ALevelTemplate::ALevelTemplate() +{ + // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; + +} + +// Called when the game starts or when spawned +void ALevelTemplate::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void ALevelTemplate::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/Source/FireworkDuels/Private/Powerup.cpp b/Source/FireworkDuels/Private/Powerup.cpp new file mode 100644 index 0000000..0eeee8d --- /dev/null +++ b/Source/FireworkDuels/Private/Powerup.cpp @@ -0,0 +1,27 @@ +// All rights reserved. + + +#include "Powerup.h" + +// Sets default values +APowerup::APowerup() +{ + // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; + +} + +// Called when the game starts or when spawned +void APowerup::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void APowerup::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/Source/FireworkDuels/Public/LevelTemplate.h b/Source/FireworkDuels/Public/LevelTemplate.h new file mode 100644 index 0000000..4656eef --- /dev/null +++ b/Source/FireworkDuels/Public/LevelTemplate.h @@ -0,0 +1,39 @@ +// All rights reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "PaperTileMapComponent.h" +#include "LevelTemplate.generated.h" + +UCLASS() +class FIREWORKDUELS_API ALevelTemplate : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + ALevelTemplate(); + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + UPaperTileMapComponent* Template; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + int32 OneStarTarget = 180; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + int32 TwoStarTarget = 120; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + int32 ThreeStarTarget = 60; + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +}; diff --git a/Source/FireworkDuels/Public/Powerup.h b/Source/FireworkDuels/Public/Powerup.h new file mode 100644 index 0000000..6a798a3 --- /dev/null +++ b/Source/FireworkDuels/Public/Powerup.h @@ -0,0 +1,26 @@ +// All rights reserved. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "Powerup.generated.h" + +UCLASS() +class FIREWORKDUELS_API APowerup : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + APowerup(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +}; diff --git a/Source/FireworkDuels/SpawnManager.cpp b/Source/FireworkDuels/SpawnManager.cpp index c52e639..f87bda0 100644 --- a/Source/FireworkDuels/SpawnManager.cpp +++ b/Source/FireworkDuels/SpawnManager.cpp @@ -11,16 +11,24 @@ ASpawnManager::ASpawnManager() } -void ASpawnManager::GenerateBoard() { - int32 ClassesCount = SpawnableClasses.Num(); +void ASpawnManager::GenerateBoard(TSubclassOf &Template) { FVector ActorLocation = this->GetActorLocation(); + CurrentLevel = GetWorld()->SpawnActor(Template, this->GetActorTransform()); + UPaperTileMapComponent* Tilemap = CurrentLevel->Template; + + TArray> Classes; for (int32 i = 0; i < BlocksY; i++) { for (int32 o = 0; o < BlocksX; o++) { - int32 RandomIndex = FMath::RandRange(0, ClassesCount - 1); + // Make transform FTransform SpawnTransform; SpawnTransform.SetLocation(FVector((ActorLocation.X - (Distance * BlocksX / 2) + (o * Distance)), (ActorLocation.Y - (Distance * (BlocksY / 2)) + (i * Distance)), ActorLocation.Z)); - GetWorld()->SpawnActor(SpawnableClasses[RandomIndex], SpawnTransform); + + // Spawn block + int32 TileId = Tilemap->GetTile(i, o, 0).GetTileIndex(); + TSubclassOf TileClass = *BlockTemplates.Find(TileId); + ABuildingBlock* ThisBlock = GetWorld()->SpawnActor(TileClass, SpawnTransform); + ThisBlock->Index = (10 * i) + o; } } } \ No newline at end of file diff --git a/Source/FireworkDuels/SpawnManager.h b/Source/FireworkDuels/SpawnManager.h index bc99377..474ad02 100644 --- a/Source/FireworkDuels/SpawnManager.h +++ b/Source/FireworkDuels/SpawnManager.h @@ -6,6 +6,7 @@ #include "GameFramework/Actor.h" #include "BuildingBlock.h" #include "Math/UnrealMathUtility.h" +#include "LevelTemplate.h" #include "SpawnManager.generated.h" UCLASS() @@ -19,20 +20,23 @@ public: protected: - UPROPERTY(EditDefaultsOnly) + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) float Distance = 45.0f; UPROPERTY(BlueprintReadWrite, EditAnywhere) - int32 BlocksX = 5; + int32 BlocksX = 10; UPROPERTY(BlueprintReadWrite, EditAnywhere) - int32 BlocksY = 5; + int32 BlocksY = 10; UPROPERTY(EditAnywhere, BlueprintReadWrite) - TArray> SpawnableClasses; + ALevelTemplate* CurrentLevel; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + TMap> BlockTemplates; UFUNCTION(BlueprintCallable, CallInEditor) - void GenerateBoard(); + void GenerateBoard(TSubclassOf &Template); public: