2019-04-20 14:02:55 +02:00
|
|
|
#ifndef LEVEL_XP_H
|
|
|
|
#define LEVEL_XP_H
|
|
|
|
|
|
|
|
#include "core/resource.h"
|
|
|
|
#include "core/variant.h"
|
|
|
|
#include "core/vector.h"
|
|
|
|
|
|
|
|
class XPData : public Resource {
|
|
|
|
GDCLASS(XPData, Resource);
|
|
|
|
|
|
|
|
public:
|
|
|
|
int get_max_level();
|
|
|
|
int xp_required_for_level(int level);
|
|
|
|
bool can_level_up(int level);
|
2019-09-12 14:40:57 +02:00
|
|
|
|
|
|
|
PoolIntArray get_xps();
|
|
|
|
void set_xps(const PoolIntArray &xps);
|
|
|
|
|
2019-04-20 14:02:55 +02:00
|
|
|
XPData();
|
|
|
|
~XPData();
|
2019-09-12 14:40:57 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
PoolIntArray _xp_required;
|
2019-04-20 14:02:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|