diff --git a/assets/characterSelection.png b/assets/characterSelection.png new file mode 100644 index 0000000..68e958a Binary files /dev/null and b/assets/characterSelection.png differ diff --git a/include/Constants.h b/include/Constants.h index e4acb6c..fababc7 100644 --- a/include/Constants.h +++ b/include/Constants.h @@ -8,7 +8,7 @@ using Team = std::size_t; constexpr std::size_t MAX_COMPONENTS = 32; constexpr std::size_t MAX_GROUPS = 32; constexpr std::size_t MAX_STATS = 32; -constexpr std::size_t MAX_TEAMS = 8; // +constexpr std::size_t MAX_TEAMS = 8; constexpr int SCREEN_SIZE_HEIGHT = 640; constexpr int SCREEN_SIZE_WIDTH = 800; @@ -22,7 +22,7 @@ constexpr int MAP_SIZE_Y = 20; constexpr int SPAWN_ATTEMPTS = 30; -constexpr int BUFF_DURATION = 5000; +constexpr int BUFF_DURATION = 6000; constexpr int BUFF_VALUE = 1; diff --git a/include/TextureDict.h b/include/TextureDict.h index e0dabf6..0a4b6ed 100644 --- a/include/TextureDict.h +++ b/include/TextureDict.h @@ -17,8 +17,8 @@ public: std::map powerupDictionary = { - {PowerupType::HEART, "assets/heart.png"}, - {PowerupType::WALKINGSPEED, "assets/heart.png"}, - {PowerupType::SHOOTINGSPEED, "assets/heart.png"} + {PowerupType::HEART, "assets/heart_powerup.png"}, + {PowerupType::WALKINGSPEED, "assets/movement_speed_powerup.png"}, + {PowerupType::SHOOTINGSPEED, "assets/atk_speed_powerup.png"} }; }; diff --git a/src/KeyboardController.cpp b/src/KeyboardController.cpp index 66462c2..f3466a6 100644 --- a/src/KeyboardController.cpp +++ b/src/KeyboardController.cpp @@ -75,6 +75,5 @@ void KeyboardController::update() void KeyboardController::modifyAtkSpeed(int8_t modifier) { - this->fireCooldown -= modifier * 500; - std::cout << "curr fire cooldown: " << this->fireCooldown << std::endl; + this->fireCooldown -= modifier * 400; } \ No newline at end of file diff --git a/src/PowerupComponent.cpp b/src/PowerupComponent.cpp index 6a36051..0479e60 100644 --- a/src/PowerupComponent.cpp +++ b/src/PowerupComponent.cpp @@ -34,7 +34,6 @@ void PowerupComponent::update() {}, true)) != nullptr) { - std::cout << "collided with powerup" << std::endl; (this->*pickupFunc)(player); this->entity->destroy(); } @@ -42,7 +41,8 @@ void PowerupComponent::update() void PowerupComponent::heartEffect(Entity* player) { - player->getComponent().modifyHealth(1); + if(player->getComponent().getHealth() < 5) + player->getComponent().modifyHealth(1); } void PowerupComponent::movementSpeedEffect(Entity* player) diff --git a/src/StatEffectsComponent.cpp b/src/StatEffectsComponent.cpp index b6ba763..3d48989 100644 --- a/src/StatEffectsComponent.cpp +++ b/src/StatEffectsComponent.cpp @@ -10,18 +10,6 @@ void StatEffectsComponent::init() void StatEffectsComponent::update() { - /*int i = 0; - std::transform(this->buffs.begin(), this->buffs.end(), this->buffs.begin(), - [this, &i](uint8_t statDuration) { - i++; - uint8_t newDur = statDuration - 1; - if (statDuration > 0 && newDur == 0) { - if (statDuration > 1) - std::cout << (int) statDuration << (int) newDur << std::endl; - this->modifyStatValue((Stats)i, BUFF_VALUE * -1); - } - return newDur; - });*/ for (int i = 0; i < MAX_STATS; i++) { if (this->buffs.at(i) == 0) continue; @@ -39,7 +27,7 @@ void StatEffectsComponent::modifyStatDur(Stats stat, uint8_t duration) this->buffs.at((uint8_t)stat) += duration; } -void StatEffectsComponent::modifyStatValue(Stats stat, int modifier) +void StatEffectsComponent::modifyStatValue(Stats stat, int modifier) //modifier is basically there so the modifyfuncs in the components know if stats should be increased or decreased { switch (stat) { diff --git a/src/TransformComponent.cpp b/src/TransformComponent.cpp index 6b2dba4..1b388ef 100644 --- a/src/TransformComponent.cpp +++ b/src/TransformComponent.cpp @@ -81,5 +81,5 @@ void TransformComponent::update() void TransformComponent::modifySpeed(int8_t modifier) { - this->speed += modifier * 2; + this->speed += modifier; } \ No newline at end of file