2#include <engine/engine_export.h>
10#include <dotnetpp/dotnetpp.h>
38 pinned = dotnet::make_object_pinned(obj);
39 state = std::make_shared<script_component::script_object_state>();
48 return state->marked_for_destroy;
57 return state->create_called;
66 return state->start_called;
76 if(
state->active == -1)
80 return state->active != 0;
90 if(
state->active == -1)
94 return state->active == 0;
98 std::shared_ptr<script_object_state>
state;
165 void set_entity(const dotnet::
object& obj,
entt::
handle e);
179 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 get_script_component(const dotnet::type &type) -> script_object
void add_missing_script_components(const script_components_t &comps)
void on_collision_exit(entt::handle other, const std::vector< manifold_point > &manifolds, bool use_b)
void on_sensor_enter(entt::handle other, const std::vector< manifold_point > &manifolds)
auto remove_native_component(const dotnet::object &obj) -> bool
auto remove_script_component(const dotnet::object &obj) -> bool
void process_pending_actions_create(script_object script_obj)
void add_script_components(const script_components_t &comps)
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 process_pending_starts()
void on_sensor_exit(entt::handle other, const std::vector< manifold_point > &manifolds)
std::vector< script_object > script_components_t
auto add_script_component(const dotnet::type &type) -> script_object
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()
auto add_native_component(const dotnet::type &type) -> script_object
auto get_native_component(const dotnet::type &type) -> script_object
void process_pending_creates()
Hash specialization for batch_key to enable use in std::unordered_map.
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
script_object(const dotnet::object &obj)
auto is_disabled() const -> bool
auto is_marked_for_destroy() const -> bool
dotnet::object_pinned_ptr pinned