2#include <engine/engine_export.h>
9#include <monort/monort.h>
39 scoped = std::make_shared<mono::mono_scoped_object>(obj);
40 state = std::make_shared<script_component::script_object_state>();
49 return state->marked_for_destroy;
58 return state->create_called;
67 return state->start_called;
77 if(
state->active == -1)
81 return state->active != 0;
91 if(
state->active == -1)
95 return state->active == 0;
99 std::shared_ptr<script_object_state>
state;
182 auto comps = components;
Class that contains core data for audio listeners. There can only be one instance of it per scene.
auto get_script_source_location(const script_object &obj) const -> std::string
void on_collision_enter(entt::handle other, const std::vector< manifold_point > &manifolds, bool use_b)
auto add_native_component(const mono::mono_type &type) -> script_object
void add_missing_script_components(const script_components_t &comps)
auto remove_script_component(const mono::mono_object &obj) -> bool
void on_collision_exit(entt::handle other, const std::vector< manifold_point > &manifolds, bool use_b)
auto get_script_component(const mono::mono_type &type) -> script_object
auto get_native_component(const mono::mono_type &type) -> script_object
void process_pending_actions_create(script_object script_obj)
void add_script_components(const script_components_t &comps)
void on_sensor_enter(entt::handle other)
static void on_destroy_component(entt::registry &r, entt::entity e)
Called when the component is destroyed.
auto get_script_components() const -> const script_components_t &
void process_pending_actions()
void on_sensor_exit(entt::handle other)
auto add_script_component(const mono::mono_type &type) -> script_object
void process_pending_starts()
auto remove_native_component(const mono::mono_object &obj) -> bool
std::vector< script_object > script_components_t
auto has_script_components() const -> bool
static void on_create_component(entt::registry &r, entt::entity e)
Called when the component is created.
void process_pending_deletions()
void process_pending_creates()
std::shared_ptr< mono::mono_scoped_object > scoped_object_ptr
CRTP (Curiously Recurring Template Pattern) base structure for components.
std::shared_ptr< script_object_state > state
auto is_create_called() const -> bool
auto is_start_called() const -> bool
auto is_enabled() const -> bool
auto is_disabled() const -> bool
auto is_marked_for_destroy() const -> bool
script_object(const mono::mono_object &obj)