mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
test environment (sky)
This commit is contained in:
parent
c4d5812b4f
commit
a7ad219261
14 changed files with 421 additions and 196 deletions
30
src/world/Environment.hpp
Normal file
30
src/world/Environment.hpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include "interfaces/Serializable.hpp"
|
||||
#include "util/EnumMetadata.hpp"
|
||||
|
||||
enum class SkyMode {
|
||||
NONE, SOLID, BOX
|
||||
};
|
||||
|
||||
VC_ENUM_METADATA(SkyMode)
|
||||
{"none", SkyMode::NONE},
|
||||
{"solid", SkyMode::SOLID},
|
||||
{"box", SkyMode::BOX},
|
||||
VC_ENUM_END
|
||||
|
||||
class Environment : public Serializable {
|
||||
public:
|
||||
struct {
|
||||
SkyMode mode = SkyMode::BOX;
|
||||
bool stars = true;
|
||||
bool clouds = true;
|
||||
bool sprites = true;
|
||||
} sky;
|
||||
|
||||
Environment() = default;
|
||||
|
||||
dv::value serialize() const override;
|
||||
void deserialize(const dv::value& src) override;
|
||||
private:
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue