diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-27 21:30:00 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-27 21:30:00 +0100 |
commit | 722b07a415f82a7fe56f595497ddf2ec0816f27c (patch) | |
tree | 42df92ff7f6d0a670644991cfff34ee3627a8c40 /editor | |
parent | 5becc80e3c3eb04f2067cb000e32eef45441e5f3 (diff) |
actually speed should be the property of critter
Diffstat (limited to 'editor')
-rw-r--r-- | editor/inspect-types.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/inspect-types.cpp b/editor/inspect-types.cpp index 41a236b0..fe33a760 100644 --- a/editor/inspect-types.cpp +++ b/editor/inspect-types.cpp @@ -52,10 +52,6 @@ struct entity_accessors<object, inspect_intent_t> { [](const object& x) { return x.pass; }, [](object& x, pass_mode value) { x.set_bbox(x.offset, x.bbox_offset, x.bbox_size, value); }, }, - E::type<float>::field{"speed"_s, - [](const object& x) { return x.speed; }, - [](object& x, float value) { x.speed = Math::clamp(value, 0.f, 1e6f); } - }, E::type<Vector2b>::field{"bbox-offset"_s, [](const object& x) { return x.bbox_offset; }, [](object& x, Vector2b value) { x.set_bbox(x.offset, value, x.bbox_size, x.pass); }, @@ -211,6 +207,10 @@ struct entity_accessors<critter, inspect_intent_t> { E::type<String>::field{"name"_s, [](const critter& x) { return x.name; }, [](critter& x, const String& value) { x.name = value; } }, + E::type<float>::field{"speed"_s, + [](const critter& x) { return x.speed; }, + [](critter& x, float value) { x.speed = Math::clamp(value, 0.f, 1e6f); } + }, }; auto t1 = std::tuple{ E::type<bool>::field{"playable"_s, @@ -218,7 +218,7 @@ struct entity_accessors<critter, inspect_intent_t> { [](critter& x, bool value) { x.playable = value; }, constantly(constraints::max_length{ 128 }) }, }; - return std::tuple_cat(t0, prev, t1); + return std::tuple_cat(t0, t1, prev); } }; |