Files
Text-Adventure/Engine/src/player.cpp
T

32 lines
590 B
C++
Raw Normal View History

2026-08-07 13:10:07 -05:00
#include "player.h"
2026-08-20 08:10:07 -05:00
void Player::Init() {
// initialize stats, room location, inventory and item data
stats = Stats{100.0f, 50.00f, 150.00f, 50.00f};
2026-08-07 13:10:07 -05:00
2026-08-20 08:10:07 -05:00
name = "Player";
2026-08-07 13:10:07 -05:00
}
2026-08-20 08:10:07 -05:00
void Player::LevelUp() {}
2026-08-07 13:10:07 -05:00
2026-08-20 08:10:07 -05:00
void Player::Die() {
// Now. You must, die!
2026-08-07 13:10:07 -05:00
}
2026-08-20 08:10:07 -05:00
void Player::TakeDamage(int damageType, float damage) {
// Ouch
2026-08-07 13:10:07 -05:00
}
2026-08-20 08:10:07 -05:00
float Player::GetHealth() { return 0.0f; }
2026-08-07 13:10:07 -05:00
2026-08-20 08:10:07 -05:00
void Player::ChangeRoom(int roomID) {
if (prevRoomID == roomID) {
curRoomID = prevRoomID;
}
2026-08-07 13:10:07 -05:00
2026-08-20 08:10:07 -05:00
else if (curRoomID != roomID) {
prevRoomID = curRoomID;
curRoomID = roomID;
}
2026-08-07 13:10:07 -05:00
}