diff --git a/Content/Blueprints/Abilities/BP_StrafingRun.uasset b/Content/Blueprints/Abilities/BP_StrafingRun.uasset index a0904b2..6e034df 100644 --- a/Content/Blueprints/Abilities/BP_StrafingRun.uasset +++ b/Content/Blueprints/Abilities/BP_StrafingRun.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1149683a2168139cac9a838c2d6dd6916ae199283eaa588e17b363c5ca5fc58 -size 30776 +oid sha256:bfa4bc1e012689a256b31b9b01ee3b874b4b30d62ef36849990b6fae1ad43733 +size 68398 diff --git a/Content/Blueprints/BP_GameState.uasset b/Content/Blueprints/BP_GameState.uasset index ad591aa..1619fcd 100644 --- a/Content/Blueprints/BP_GameState.uasset +++ b/Content/Blueprints/BP_GameState.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a83b60ef4fd89ba94612f7ec1aa5996798ce42ae41e134b81297b1b1b117eccf -size 294615 +oid sha256:fc90aa73daf1b91ec5b7d6dfc2099d6e5378d2eecc6194b1b344070bcd1498e0 +size 291194 diff --git a/Content/Blueprints/Niagra/BloodSpray/BloodSpray.uasset b/Content/Blueprints/Niagra/BloodSpray/BloodSpray.uasset index c9d80a4..ce5225d 100644 --- a/Content/Blueprints/Niagra/BloodSpray/BloodSpray.uasset +++ b/Content/Blueprints/Niagra/BloodSpray/BloodSpray.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e6ca8611d97c8889d7a64c72a8dd7276031f117d496d8dbdca55737008b66e8 -size 489300 +oid sha256:cc7de382e6ba6d646d1c03d1ce4abce25a2d3410941423324ad3eb89b58dd53a +size 473228 diff --git a/Content/Blueprints/Niagra/BulletImpact_Large/N_BulletImpactLarge.uasset b/Content/Blueprints/Niagra/BulletImpact_Large/N_BulletImpactLarge.uasset new file mode 100644 index 0000000..ba4fa7d --- /dev/null +++ b/Content/Blueprints/Niagra/BulletImpact_Large/N_BulletImpactLarge.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc209b0c485d8ee9f38ed05adbccf17f303f5d728eac36f36f883cc0e5ea63b7 +size 760041 diff --git a/Content/Blueprints/Niagra/BulletImpact_Large/OmniMuzzle.uasset b/Content/Blueprints/Niagra/BulletImpact_Large/OmniMuzzle.uasset new file mode 100644 index 0000000..306b539 --- /dev/null +++ b/Content/Blueprints/Niagra/BulletImpact_Large/OmniMuzzle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad7c3a69f577cbd3b31774f6bfd6376aa9f5951b96de42c9028a7f536a6b98fd +size 12113 diff --git a/Content/Blueprints/Niagra/Footsteps/DustSmoke.uasset b/Content/Blueprints/Niagra/Footsteps/DustSmoke.uasset index 3c3c093..d8117c1 100644 --- a/Content/Blueprints/Niagra/Footsteps/DustSmoke.uasset +++ b/Content/Blueprints/Niagra/Footsteps/DustSmoke.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db71a18e38ac988709d8f7f99398890836173a5e10e564c310f27beb16d827ff -size 14002 +oid sha256:a47b4b1be2c6efdfe1209d9c42db351cb5ca25302b91d8297821ac8ebd000af7 +size 14014 diff --git a/Content/Blueprints/Units/Common/BP_Unit.uasset b/Content/Blueprints/Units/Common/BP_Unit.uasset index 8538290..e79bbdc 100644 --- a/Content/Blueprints/Units/Common/BP_Unit.uasset +++ b/Content/Blueprints/Units/Common/BP_Unit.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8ae4c401b9ba1a2e5ae234d1e36de38c8d4557a5b9875664ceec4d21d06e525 -size 525023 +oid sha256:4dd81044ed309e72fc88ab0d631ad41b0bec4afca48a780fd60d213faf0155e9 +size 530346 diff --git a/Content/Blueprints/Units/EM_CQB/BP_EM_CQB.uasset b/Content/Blueprints/Units/EM_CQB/BP_EM_CQB.uasset index 002fd5c..8d7b36a 100644 --- a/Content/Blueprints/Units/EM_CQB/BP_EM_CQB.uasset +++ b/Content/Blueprints/Units/EM_CQB/BP_EM_CQB.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1abbab27f0ae35f12f7e18de26c6c7bde1dadea2c1e16414bcb05e0c93673183 -size 43037 +oid sha256:1c3d9648a9f1fec161ac7120555def0a49860c6b2cb4e457285a81909deb1cb2 +size 47068 diff --git a/Content/Blueprints/Units/EM_Interceptor/BP_Interceptor.uasset b/Content/Blueprints/Units/EM_Interceptor/BP_Interceptor.uasset new file mode 100644 index 0000000..0d39df7 --- /dev/null +++ b/Content/Blueprints/Units/EM_Interceptor/BP_Interceptor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c04e53b991581f8a29d07ea60095ea9918ef128a4860dc70cce10bc4b633546e +size 51608 diff --git a/Content/Blueprints/Units/EM_Rifleman/BP_EM_Rifleman.uasset b/Content/Blueprints/Units/EM_Rifleman/BP_EM_Rifleman.uasset index ea567b8..79ac48d 100644 --- a/Content/Blueprints/Units/EM_Rifleman/BP_EM_Rifleman.uasset +++ b/Content/Blueprints/Units/EM_Rifleman/BP_EM_Rifleman.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59e5fcec635ac525c1c0b52301fe6de5edd77a9bbf05d808e7d9d77793b09a8d -size 45750 +oid sha256:5371a014967e68d8fbc89b19ed29b2c18a370b5e54516bf4ebb5453f18104f30 +size 47143 diff --git a/Content/Blueprints/Units/M_Mite/BP_Mite.uasset b/Content/Blueprints/Units/M_Mite/BP_Mite.uasset index 7eef414..26b6c54 100644 --- a/Content/Blueprints/Units/M_Mite/BP_Mite.uasset +++ b/Content/Blueprints/Units/M_Mite/BP_Mite.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ddf22fc7d36e16979760f133a45a6933d28aab1ce717ccf9c6b06914b71fe75 -size 32430 +oid sha256:6775b98625a74c555e74fac8f3b65ae8bfe268d44770a0c9e81b587cced66447 +size 35081 diff --git a/Content/Blueprints/Units/M_Wyrm/BP_Wyrm.uasset b/Content/Blueprints/Units/M_Wyrm/BP_Wyrm.uasset index 70f458f..e14008b 100644 --- a/Content/Blueprints/Units/M_Wyrm/BP_Wyrm.uasset +++ b/Content/Blueprints/Units/M_Wyrm/BP_Wyrm.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc0ad22e943468a712b689b39e13eae81e840ae01e93e80b41ac7ffc69d2e5d4 -size 45618 +oid sha256:ba092e67c52fcd14267815d26479b126695ace1865d354b13a09ce0bf2bc63c8 +size 47618 diff --git a/Content/Blueprints/Upgrades/PDA_Ranged_Damage.uasset b/Content/Blueprints/Upgrades/PDA_Ranged_Damage.uasset new file mode 100644 index 0000000..ee7cb6d --- /dev/null +++ b/Content/Blueprints/Upgrades/PDA_Ranged_Damage.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:298dbbcf7cdb8d8f2b807537b8b76557f4b2cf841debd05890cb47e3f0298fb7 +size 52581 diff --git a/Content/Data/Upgrades/UnitUpgrades/DA_Ranged_Damage_Up.uasset b/Content/Data/Upgrades/UnitUpgrades/DA_Ranged_Damage_Up.uasset new file mode 100644 index 0000000..5cc92a0 --- /dev/null +++ b/Content/Data/Upgrades/UnitUpgrades/DA_Ranged_Damage_Up.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4b571220a43c10500b57a179c83923f1f55e7e151b1ec351432362d2c95c61d +size 1742 diff --git a/Content/Levels/BattleMap.umap b/Content/Levels/BattleMap.umap index c531196..8a55a57 100644 --- a/Content/Levels/BattleMap.umap +++ b/Content/Levels/BattleMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:433bf5b7e69ad9afac7445fc7fc1b0c79a99f336ce67f3420056028b4bbbefc8 +oid sha256:7a800e75892e5b046019d97876a3977e22694e30a5eb8f0250490b7552f6358c size 267553 diff --git a/Content/Models/Common/M_MuzzleFlash.uasset b/Content/Models/Common/M_MuzzleFlash.uasset index d45d73f..7eb2afb 100644 --- a/Content/Models/Common/M_MuzzleFlash.uasset +++ b/Content/Models/Common/M_MuzzleFlash.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:afc26cda8bfa0e69295d956e947ba9940c5d6759005499b38a0f6079552ac221 -size 11514 +oid sha256:6ceda2a9bd09ef45ed2de1a0324555744af8093295e84e4e545dc0d360935bf1 +size 11781 diff --git a/Content/Models/Common/N_MuzzleFlash.uasset b/Content/Models/Common/N_MuzzleFlash.uasset index b718050..aa5f2a4 100644 --- a/Content/Models/Common/N_MuzzleFlash.uasset +++ b/Content/Models/Common/N_MuzzleFlash.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d9d4c869de70dceea1bddab0d9192224a566ea792bae6f8bce868b0cdfb856d9 -size 566418 +oid sha256:3d15e5af0aab6b445a53afd637af6f1709b131aec32715929c306d6ba82b2620 +size 466663 diff --git a/Content/Models/EnemyUnits/Wyrm/Bone.uasset b/Content/Models/EnemyUnits/Wyrm/Bone.uasset index 5c34445..7d5a0f2 100644 --- a/Content/Models/EnemyUnits/Wyrm/Bone.uasset +++ b/Content/Models/EnemyUnits/Wyrm/Bone.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:506b80aa0873ea6c2bab81415578a60f55e29a5f91c19b70ddbe4357cc83c0e9 -size 9026 +oid sha256:caf5e732d1c0fc3a9d5b591a9f60fe01fb0f5257633d591472209e10be6bf522 +size 8263 diff --git a/Content/Models/PlayerUnits/Interceptor/Base.uasset b/Content/Models/PlayerUnits/Interceptor/Base.uasset new file mode 100644 index 0000000..878c179 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Base.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39ae151d5d82b039db3215a9e3b8d2b3c2aa4c6a4f65de74489993441e0f33f5 +size 14397 diff --git a/Content/Models/PlayerUnits/Interceptor/Cockpit.uasset b/Content/Models/PlayerUnits/Interceptor/Cockpit.uasset new file mode 100644 index 0000000..9efa468 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Cockpit.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9376d89499683d94b9c8852af35956fa81ab83c60c2c227a18de3d37d9e4c4cc +size 12899 diff --git a/Content/Models/PlayerUnits/Interceptor/MuzzleFlash.uasset b/Content/Models/PlayerUnits/Interceptor/MuzzleFlash.uasset new file mode 100644 index 0000000..96034ff --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/MuzzleFlash.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e534b14c1a22367c582a4611b4cba9c94c80963b851d35c89ca9ae250a5f7b31 +size 673750 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_BaseColor.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_BaseColor.uasset new file mode 100644 index 0000000..1c1d39e --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_BaseColor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8167f3834eba0c4b454e7c15c0725f54354f9282a1ca0a2e0652c287cd218b52 +size 286010 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_Normal.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_Normal.uasset new file mode 100644 index 0000000..d248f54 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_Normal.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f39c53002c7c2c10f73ac4ef1e0e307a4cd04e9bb607423c483f9aee5851470 +size 229571 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_OcclusionRoughnessMetallic.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..d9a98bd --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Base_OcclusionRoughnessMetallic.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75fe78d1e38898f3f33a091009aeb7eaddc074c45d46e739ae2ab391e84174cd +size 390156 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_BaseColor.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_BaseColor.uasset new file mode 100644 index 0000000..7ec1d30 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_BaseColor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d11a2f30c4fada1c9698e684724911fed779a8d872d93819ba4ea2628d83f871 +size 21136 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_Normal.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_Normal.uasset new file mode 100644 index 0000000..2a13dc5 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_Normal.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc1a5d4e8df37afc6a6b054b1016237506816f987f4ec0cc3c48e9f2e00775aa +size 11640 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_OcclusionRoughnessMetallic.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..c6dfbc3 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Cockpit_OcclusionRoughnessMetallic.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:678347c55927e2e0f75921ee7938dc6a75eb14a70d74d74195b3b6b43f32cb9c +size 28824 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_BaseColor.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_BaseColor.uasset new file mode 100644 index 0000000..4b9ad9e --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_BaseColor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d085567a9ddf75cd41b2284b3b92b373e7e99a3029f5e3e793558b1f866b47d +size 43187 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_Normal.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_Normal.uasset new file mode 100644 index 0000000..57a0b93 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_Normal.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6077f0501391bd21e79b1a3b42f18cd1bc5d1e1b64afa01d50ea1fb1f0de658 +size 56290 diff --git a/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_OcclusionRoughnessMetallic.uasset b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_OcclusionRoughnessMetallic.uasset new file mode 100644 index 0000000..c79904d --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Textures/interceptor_Trim_OcclusionRoughnessMetallic.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aebbe31dca4ecfb49493d324cef4415d217166871690b3e538a4c71a2a88df7b +size 128723 diff --git a/Content/Models/PlayerUnits/Interceptor/Trim.uasset b/Content/Models/PlayerUnits/Interceptor/Trim.uasset new file mode 100644 index 0000000..25eee76 --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/Trim.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa5966c4685d72c947d3fb79ff4b16ba1b1cf7a8c65a9e75027a15f810048aa9 +size 13579 diff --git a/Content/Models/PlayerUnits/Interceptor/a10gunrun.uasset b/Content/Models/PlayerUnits/Interceptor/a10gunrun.uasset new file mode 100644 index 0000000..80e37cc --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/a10gunrun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7a01f2277af64f0e516fa253cc180f4e1817e393154817dfd379681ea1e093c +size 135636 diff --git a/Content/Models/PlayerUnits/Interceptor/interceptor.uasset b/Content/Models/PlayerUnits/Interceptor/interceptor.uasset new file mode 100644 index 0000000..a18a05c --- /dev/null +++ b/Content/Models/PlayerUnits/Interceptor/interceptor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60634ad55d3f8a1c249abedd931187634e41f9f6eb853e3bd7c96ed92e875a87 +size 1138696 diff --git a/Content/Textures/omniflash.uasset b/Content/Textures/omniflash.uasset new file mode 100644 index 0000000..4b8e99c --- /dev/null +++ b/Content/Textures/omniflash.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90e0a0adee96a383cb05f38c41fca4be03b613b5b878b1a1ad68e177da90b78d +size 10406 diff --git a/Source/SpaceBattler/Private/AbilityUpgrade.cpp b/Source/SpaceBattler/Private/AbilityUpgrade.cpp new file mode 100644 index 0000000..5a862b7 --- /dev/null +++ b/Source/SpaceBattler/Private/AbilityUpgrade.cpp @@ -0,0 +1,5 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "AbilityUpgrade.h" + diff --git a/Source/SpaceBattler/Private/SelectedUpgrade.cpp b/Source/SpaceBattler/Private/SelectedUpgrade.cpp index 21560a1..78e3cf1 100644 --- a/Source/SpaceBattler/Private/SelectedUpgrade.cpp +++ b/Source/SpaceBattler/Private/SelectedUpgrade.cpp @@ -2,3 +2,23 @@ #include "SelectedUpgrade.h" + +UUpgrade* USelectedUpgrade::GetUpgradeData() const +{ + return UpgradeData; +} + +int32 USelectedUpgrade::IncreaseUpgradeLevel() +{ + return ++TimesSelected; +} + +int32 USelectedUpgrade::GetUpgradeLevel() const +{ + return TimesSelected; +} + +void USelectedUpgrade::SetUpgradeData(UUpgrade* UpgradeToAdd) +{ + UpgradeData = UpgradeToAdd; +} diff --git a/Source/SpaceBattler/Private/UnitUpgrade.cpp b/Source/SpaceBattler/Private/UnitUpgrade.cpp index 3194363..81e21c5 100644 --- a/Source/SpaceBattler/Private/UnitUpgrade.cpp +++ b/Source/SpaceBattler/Private/UnitUpgrade.cpp @@ -3,7 +3,4 @@ #include "UnitUpgrade.h" -void UUnitUpgrade::ApplyToUnit(AUnit* Unit) -{ - -} +void UUnitUpgrade::ApplyToUnit_Implementation(AUnit* Unit, int32 UpgradeLevel){} diff --git a/Source/SpaceBattler/Private/UpgradeSubsystem.cpp b/Source/SpaceBattler/Private/UpgradeSubsystem.cpp index f76650f..566faf5 100644 --- a/Source/SpaceBattler/Private/UpgradeSubsystem.cpp +++ b/Source/SpaceBattler/Private/UpgradeSubsystem.cpp @@ -9,20 +9,38 @@ void UUpgradeSubsystem::ApplyUnitUpgrades(AUnit* Unit) { for (const auto Upgrade : SelectedUpgrades) { - UUnitUpgrade* UnitUpgrade = Cast(Upgrade.UpgradeData); + UUnitUpgrade* UnitUpgrade = Cast(Upgrade->GetUpgradeData()); if(UnitUpgrade != nullptr) { - for (const FString Tag : Upgrade.UpgradeData->GetApplicableTags()) + for (const FString Tag : UnitUpgrade->GetApplicableTags()) { if(Unit->UnitTags.Contains(Tag)) { - UnitUpgrade->ApplyToUnit(Unit); + UnitUpgrade->ApplyToUnit(Unit, Upgrade->GetUpgradeLevel()); } } } } } +void UUpgradeSubsystem::AddUpgrade(UUpgrade* UpgradeToAdd) +{ + for(const auto Upgrade : SelectedUpgrades) + { + if(Upgrade->GetUpgradeData() == UpgradeToAdd) + { + Upgrade->IncreaseUpgradeLevel(); + return; + } + } + + USelectedUpgrade* NewUpgrade = NewObject(); + NewUpgrade->SetUpgradeData(UpgradeToAdd); + NewUpgrade->IncreaseUpgradeLevel(); + SelectedUpgrades.Add(NewUpgrade); +} + + void UUpgradeSubsystem::ApplyGlobalUpgrades() { diff --git a/Source/SpaceBattler/Public/AbilityUpgrade.h b/Source/SpaceBattler/Public/AbilityUpgrade.h new file mode 100644 index 0000000..5793d35 --- /dev/null +++ b/Source/SpaceBattler/Public/AbilityUpgrade.h @@ -0,0 +1,17 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Upgrade.h" +#include "AbilityUpgrade.generated.h" + +/** + * + */ +UCLASS() +class SPACEBATTLER_API UAbilityUpgrade : public UUpgrade +{ + GENERATED_BODY() + +}; diff --git a/Source/SpaceBattler/Public/SelectedUpgrade.h b/Source/SpaceBattler/Public/SelectedUpgrade.h index 36915f0..4756976 100644 --- a/Source/SpaceBattler/Public/SelectedUpgrade.h +++ b/Source/SpaceBattler/Public/SelectedUpgrade.h @@ -9,12 +9,26 @@ /** * */ -USTRUCT(BlueprintType) -struct FSelectedUpgrade +UCLASS(BlueprintType) +class SPACEBATTLER_API USelectedUpgrade : public UObject { GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable) + UUpgrade* GetUpgradeData() const; + + UFUNCTION(BlueprintCallable) + void SetUpgradeData(UUpgrade* UpgradeToAdd); - UPROPERTY(BlueprintReadWrite) + UFUNCTION(BlueprintCallable) + int32 IncreaseUpgradeLevel(); + + UFUNCTION(BlueprintCallable) + int32 GetUpgradeLevel() const; + +protected: + UPROPERTY(BlueprintReadWrite, meta=(ExposeOnSpawn=true)) UUpgrade* UpgradeData; UPROPERTY(BlueprintReadWrite) diff --git a/Source/SpaceBattler/Public/Unit.h b/Source/SpaceBattler/Public/Unit.h index 74f911e..bb47b7f 100644 --- a/Source/SpaceBattler/Public/Unit.h +++ b/Source/SpaceBattler/Public/Unit.h @@ -3,6 +3,7 @@ #pragma once #include "CoreMinimal.h" +#include "UnitInfo.h" #include "GameFramework/Character.h" #include "Unit.generated.h" @@ -26,6 +27,9 @@ public: // Called to bind functionality to input virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; + UPROPERTY(BlueprintReadWrite, EditAnywhere) + UUnitInfo* UnitInfo; + /** Please add a variable description */ UPROPERTY(BlueprintReadWrite, Category="Unit Info Copy") double MaxHP; diff --git a/Source/SpaceBattler/Public/UnitUpgrade.h b/Source/SpaceBattler/Public/UnitUpgrade.h index 963cd9a..6785ba1 100644 --- a/Source/SpaceBattler/Public/UnitUpgrade.h +++ b/Source/SpaceBattler/Public/UnitUpgrade.h @@ -10,11 +10,13 @@ /** * */ -UCLASS() +UCLASS(Blueprintable) class SPACEBATTLER_API UUnitUpgrade : public UUpgrade { GENERATED_BODY() public: - void ApplyToUnit(AUnit* Unit); + UFUNCTION(BlueprintCallable, BlueprintNativeEvent) + void ApplyToUnit(AUnit* Unit, int32 UpgradeLevel); + virtual void ApplyToUnit_Implementation(AUnit* Unit, int32 UpgradeLevel); }; diff --git a/Source/SpaceBattler/Public/Upgrade.h b/Source/SpaceBattler/Public/Upgrade.h index a65c169..785d844 100644 --- a/Source/SpaceBattler/Public/Upgrade.h +++ b/Source/SpaceBattler/Public/Upgrade.h @@ -29,4 +29,10 @@ protected: UPROPERTY(BlueprintReadWrite, EditAnywhere) TArray ApplicableTags; + + UPROPERTY(BlueprintReadWrite, EditAnywhere) + int32 Cost; + + UPROPERTY(BlueprintReadWrite, EditAnywhere) + float CostPerLevelMultiplier; }; diff --git a/Source/SpaceBattler/Public/UpgradeSubsystem.h b/Source/SpaceBattler/Public/UpgradeSubsystem.h index f484448..3cc7b4a 100644 --- a/Source/SpaceBattler/Public/UpgradeSubsystem.h +++ b/Source/SpaceBattler/Public/UpgradeSubsystem.h @@ -22,11 +22,14 @@ public: UFUNCTION(BlueprintCallable) void ApplyGlobalUpgrades(); + + UFUNCTION(BlueprintCallable) + void AddUpgrade(UUpgrade* UpgradeToAdd); protected: UPROPERTY(BlueprintReadWrite) int32 BattleTier; UPROPERTY(BlueprintReadWrite) - TArray SelectedUpgrades; + TArray SelectedUpgrades; };