Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.18 KB

program_listing_file_rootex_framework_components_visual_effect_sky_component.h.rst

File metadata and controls

37 lines (24 loc) · 1.18 KB

Program Listing for File sky_component.h

Return to documentation for file <file_rootex_framework_components_visual_effect_sky_component.h> (rootex\framework\components\visual\effect\sky_component.h)

#pragma once

#include "component.h"
#include "core/resource_files/model_resource_file.h"
#include "core/resource_files/sky_material_resource_file.h"

class SkyComponent : public Component
{
    COMPONENT(SkyComponent, Category::Effect);

    Ref<ModelResourceFile> m_SkySphere;
    Ref<SkyMaterialResourceFile> m_SkyMaterial;

public:
    SkyComponent(Entity& owner, const JSON::json& data);
    ~SkyComponent() = default;

    ModelResourceFile* getSkySphere() const { return m_SkySphere.get(); }
    SkyMaterialResourceFile* getSkyMaterial() const { return m_SkyMaterial.get(); }

    JSON::json getJSON() const override;
    void draw() override;
};

DECLARE_COMPONENT(SkyComponent);