world_generator/world_generator.h

40 lines
803 B
C
Raw Normal View History

2019-09-22 22:12:20 +02:00
#ifndef WORLD_GENERATOR_H
#define WORLD_GENERATOR_H
#include "core/resource.h"
#include "core/vector.h"
2019-09-24 02:42:42 +02:00
#include "data/planet_data.h"
#include "main/planet.h"
2019-09-22 22:12:20 +02:00
class WorldGenerator : public Resource {
GDCLASS(WorldGenerator, Resource);
public:
Ref<PlanetData> get_planet_data(const int index) const;
void set_planet_data(const int index, const Ref<PlanetData> planet_data);
void add_planet_data(const Ref<PlanetData> planet_data);
void remove_planet_data(const int index);
int get_planet_data_count() const;
Vector<Variant> get_planet_datas();
void set_planet_datas(const Vector<Variant> &planet_datas);
2019-09-24 02:42:42 +02:00
Ref<Planet> setup_planet(int seed);
2019-09-22 22:12:20 +02:00
WorldGenerator();
~WorldGenerator();
protected:
static void _bind_methods();
private:
2019-09-24 02:42:42 +02:00
Vector<Ref<PlanetData> > _planet_datas;
2019-09-22 22:12:20 +02:00
};
#endif