mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-21 09:35:27 -04:00
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
#include <GDCore/Project/PropertyDescriptor.h>
|
|
#include <GDCore/Project/Behavior.h>
|
|
#include <GDCore/Project/Project.h>
|
|
#include <GDCore/Serialization/Serializer.h>
|
|
#include <GDCore/Serialization/SerializerElement.h>
|
|
#include <emscripten.h>
|
|
|
|
using namespace gd;
|
|
|
|
/**
|
|
* \brief An adapter to implement a gd::Behavior in JavaScript.
|
|
*
|
|
* This is the class to be used to define a new behavior in JsExtension.js
|
|
*/
|
|
class BehaviorJsImplementation : public gd::Behavior {
|
|
public:
|
|
BehaviorJsImplementation(){};
|
|
virtual std::unique_ptr<gd::Behavior> Clone() const override;
|
|
|
|
virtual std::map<gd::String, gd::PropertyDescriptor> GetProperties(
|
|
const gd::SerializerElement& behaviorContent) const override;
|
|
virtual bool UpdateProperty(gd::SerializerElement& behaviorContent,
|
|
const gd::String& name,
|
|
const gd::String& value) override;
|
|
virtual void InitializeContent(
|
|
gd::SerializerElement& behaviorContent) override;
|
|
|
|
void __destroy__();
|
|
|
|
private:
|
|
};
|