mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00

* This action allow to wait for a few seconds before continuing to run the next actions and sub-events. * It is perfect to create cut scenes, advanced logic or just run things progressively without relying on timers. In a lot of cases, it's simpler and faster to use this new action. * The action remember the picked objects: it works like an usual event, but run the actions (and sub-events) a bit later in time. While the action wait, other events continue to run as usual. * Thanks to @arthuro555 for the ground work and follow up on this new feature. Only show the rest in developer changelog: * Add support for asynchronous actions (including for objects). * Add exhaustive test cases for asynchronous actions. Co-authored-by: Arthur Pacaud <arthur.pacaud@hotmail.fr>
33 lines
1005 B
C++
33 lines
1005 B
C++
/*
|
|
* GDevelop Core
|
|
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
|
|
* reserved. This project is released under the MIT License.
|
|
*/
|
|
#include "AllBuiltinExtensions.h"
|
|
#include "GDCore/Events/Builtin/AsyncEvent.h"
|
|
#include "GDCore/Tools/Localization.h"
|
|
|
|
using namespace std;
|
|
namespace gd {
|
|
|
|
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAsyncExtension(
|
|
gd::PlatformExtension &extension) {
|
|
extension
|
|
.SetExtensionInformation(
|
|
"BuiltinAsync",
|
|
_("Async functions"),
|
|
_("Functions that defer the execution of the events after it."),
|
|
"Arthur Pacaud (arthuro555)",
|
|
"Open source (MIT License)")
|
|
.SetCategory("Advanced");
|
|
|
|
extension.AddEvent("Async",
|
|
_("Async event"),
|
|
_("Internal event for asynchronous actions"),
|
|
"",
|
|
"res/eventaddicon.png",
|
|
std::make_shared<gd::AsyncEvent>());
|
|
}
|
|
|
|
} // namespace gd
|