Files

35 lines
696 B
C++
Raw Permalink Normal View History

2026-08-07 13:10:07 -05:00
#pragma once
#include <math.h>
#include <utility>
2026-08-07 13:10:07 -05:00
#include "creature.h"
2026-08-20 08:10:07 -05:00
class Player : Creature {
private:
2026-08-20 08:10:07 -05:00
// Inventory inventory;
2026-08-07 13:10:07 -05:00
2026-08-20 08:10:07 -05:00
public:
Player();
Player(Player &rhs);
Player &operator=(Player &rhs);
2026-08-20 08:10:07 -05:00
void Init() override;
void LevelUp() override;
void Die() override;
void TakeDamage(int damageType, float damage) override;
float GetHealth() override;
inline friend void swap(Player &lhs, Player &rhs) noexcept {
using std::swap;
swap(lhs.id, rhs.id);
swap(lhs.name, rhs.name);
swap(lhs.description, rhs.description);
swap(lhs.stats, rhs.stats);
swap(lhs.level, rhs.level);
}
~Player();
2026-08-07 13:10:07 -05:00
};