diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 16:34:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-05-02 22:35:39 +0200 |
commit | 6abcd7d52cda334c58ec999d212491fc24f13c9d (patch) | |
tree | 86998508afe8eb7447ad70a2d5beebdbc9995a8f /src/critter.cpp | |
parent | 03b67a512ec9ef1cf5c337aa5c47a5a76d4a8a61 (diff) |
script lifecycle mostly implemented
Diffstat (limited to 'src/critter.cpp')
-rw-r--r-- | src/critter.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/critter.cpp b/src/critter.cpp index ece278b2..f743f614 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -549,4 +549,19 @@ critter::~critter() noexcept //fm_assert(!script); } +void critter::init_script(const std::shared_ptr<object>& ptrʹ) +{ + script.do_initialize(std::static_pointer_cast<critter>(ptrʹ)); +} + +void critter::destroy_script_pre(const std::shared_ptr<object>& ptrʹ, script_destroy_reason r) +{ + script.do_destroy_pre(std::static_pointer_cast<critter>(ptrʹ), r); +} + +void critter::destroy_script_post() +{ + script.do_finish_destroy(); +} + } // namespace floormat |