Adding some tags to scene item components for the prefab tool

This commit is contained in:
2023-03-26 11:06:57 -07:00
parent f787d06713
commit 6ab9abdeba
16 changed files with 37 additions and 3 deletions

View File

@ -28,16 +28,24 @@ namespace Dawn {
return cam; return cam;
} }
// @optional
StateProperty<RenderTarget*> renderTarget; StateProperty<RenderTarget*> renderTarget;
// @optional
StateProperty<float_t> fov; StateProperty<float_t> fov;
// @optional
StateProperty<enum CameraType> type; StateProperty<enum CameraType> type;
// @optional
StateProperty<float_t> orthoLeft; StateProperty<float_t> orthoLeft;
// @optional
StateProperty<float_t> orthoRight; StateProperty<float_t> orthoRight;
// @optional
StateProperty<float_t> orthoBottom; StateProperty<float_t> orthoBottom;
// @optional
StateProperty<float_t> orthoTop; StateProperty<float_t> orthoTop;
// @optional
StateProperty<float_t> clipNear; StateProperty<float_t> clipNear;
// @optional
StateProperty<float_t> clipFar; StateProperty<float_t> clipFar;
StateEvent<float_t, float_t> eventRenderTargetResized; StateEvent<float_t, float_t> eventRenderTargetResized;

View File

@ -15,6 +15,7 @@ namespace Dawn {
MeshHost *meshHost = nullptr; MeshHost *meshHost = nullptr;
public: public:
// @optional
Mesh * mesh = nullptr; Mesh * mesh = nullptr;
/** /**

View File

@ -17,6 +17,7 @@ namespace Dawn {
void updateDimensions(); void updateDimensions();
public: public:
// @optional
StateProperty<float_t> scale; StateProperty<float_t> scale;
/** /**

View File

@ -15,6 +15,7 @@ namespace Dawn {
std::function<void()> evtResized; std::function<void()> evtResized;
public: public:
// @optional
StateProperty<RenderTarget*> renderTarget; StateProperty<RenderTarget*> renderTarget;
/** /**

View File

@ -10,7 +10,9 @@
namespace Dawn { namespace Dawn {
class BoxCollider : public Collider2D { class BoxCollider : public Collider2D {
public: public:
// @optional
glm::vec2 min = glm::vec2(-0.5f, -0.5f); glm::vec2 min = glm::vec2(-0.5f, -0.5f);
// @optional
glm::vec2 max = glm::vec2( 0.5f, 0.5f); glm::vec2 max = glm::vec2( 0.5f, 0.5f);
BoxCollider(SceneItem *item); BoxCollider(SceneItem *item);

View File

@ -12,7 +12,9 @@ namespace Dawn {
void move(glm::vec2 distance); void move(glm::vec2 distance);
public: public:
// @optional
glm::vec2 velocity; glm::vec2 velocity;
// @optional
float_t friction = 12.0f; float_t friction = 12.0f;
CharacterController2D(SceneItem *i); CharacterController2D(SceneItem *i);

View File

@ -16,7 +16,9 @@ namespace Dawn {
) override; ) override;
public: public:
// @optional
float_t height = 1; float_t height = 1;
// @optional
float_t radius = 0.5f; float_t radius = 0.5f;
CapsuleCollider(SceneItem *item); CapsuleCollider(SceneItem *item);

View File

@ -9,8 +9,11 @@
namespace Dawn { namespace Dawn {
class CharacterController3D : public SceneItemComponent { class CharacterController3D : public SceneItemComponent {
public: public:
// @optional
glm::vec3 velocity = glm::vec3(0, 0, 0); glm::vec3 velocity = glm::vec3(0, 0, 0);
// @optional
glm::vec3 gravity = glm::vec3(0, -1, 0); glm::vec3 gravity = glm::vec3(0, -1, 0);
// @optional
float_t friction = 12.0f; float_t friction = 12.0f;
CharacterController3D(SceneItem *item); CharacterController3D(SceneItem *item);

View File

@ -16,7 +16,9 @@ namespace Dawn {
) override; ) override;
public: public:
// @optional
glm::vec3 min = glm::vec3(-0.5f, -0.5f, -0.5f); glm::vec3 min = glm::vec3(-0.5f, -0.5f, -0.5f);
// @optional
glm::vec3 max = glm::vec3(0.5f, 0.5f, 0.5f); glm::vec3 max = glm::vec3(0.5f, 0.5f, 0.5f);
CubeCollider(SceneItem *item); CubeCollider(SceneItem *item);

View File

@ -15,6 +15,7 @@ namespace Dawn {
) override; ) override;
public: public:
// @optional
float_t radius = 1.0f; float_t radius = 1.0f;
SphereCollider(SceneItem *item); SphereCollider(SceneItem *item);

View File

@ -20,7 +20,9 @@ namespace Dawn {
void realign(); void realign();
public: public:
// @optional
StateProperty<Camera*> camera; StateProperty<Camera*> camera;
// @optional
StateProperty<TextureRenderTarget*> renderTarget; StateProperty<TextureRenderTarget*> renderTarget;
/** /**

View File

@ -9,7 +9,9 @@
namespace Dawn { namespace Dawn {
class SubSceneController : public SceneItemComponent { class SubSceneController : public SceneItemComponent {
public: public:
// @optional
Scene *subScene = nullptr; Scene *subScene = nullptr;
// @optional
bool_t onlyUpdateUnpaused = false; bool_t onlyUpdateUnpaused = false;
SubSceneController(SceneItem *item); SubSceneController(SceneItem *item);

View File

@ -36,7 +36,9 @@ namespace Dawn {
class UIComponent : public SceneItemComponent, public UIComponentDimensional { class UIComponent : public SceneItemComponent, public UIComponentDimensional {
protected: protected:
// @optional
float_t width = 1; float_t width = 1;
// @optional
float_t height = 1; float_t height = 1;
StateEvent<> eventAlignmentUpdated; StateEvent<> eventAlignmentUpdated;

View File

@ -13,9 +13,9 @@ namespace Dawn {
Mesh mesh; Mesh mesh;
public: public:
// @optional
struct Color color = COLOR_WHITE; struct Color color = COLOR_WHITE;
// StateProperty<float_t> width; // @optional
// StateProperty<float_t> height;
StateProperty<Texture*> texture; StateProperty<Texture*> texture;
UIImage(SceneItem *item); UIImage(SceneItem *item);

View File

@ -15,9 +15,13 @@ namespace Dawn {
glm::vec2 current = glm::vec2(0, 0); glm::vec2 current = glm::vec2(0, 0);
public: public:
// @optional
glm::vec2 lookOffsetScale = glm::vec2(6.0f, 3.0f); glm::vec2 lookOffsetScale = glm::vec2(6.0f, 3.0f);
// @optional
float_t movementScrollSpeed = 0.5f; float_t movementScrollSpeed = 0.5f;
// @optional
glm::vec3 zoomOffset = glm::vec3(0, 30.0f, 7.5f); glm::vec3 zoomOffset = glm::vec3(0, 30.0f, 7.5f);
// @optional
PlayerController *player = nullptr; PlayerController *player = nullptr;
GameCamera(SceneItem *item); GameCamera(SceneItem *item);

View File

@ -12,6 +12,7 @@ namespace Dawn {
CharacterController2D *characterController; CharacterController2D *characterController;
public: public:
// @optional
float_t moveSpeed = 80.0f; float_t moveSpeed = 80.0f;
PlayerController(SceneItem *item); PlayerController(SceneItem *item);