1#ifndef PIXELPART_NODE_H
2#define PIXELPART_NODE_H
4#include "PixelpartEffectResource.h"
5#include "../property/PixelpartAnimatedPropertyFloat3.h"
6#include <pixelpart-runtime/effect/Node.h>
7#include <pixelpart-runtime/engine/EffectEngine.h>
8#include <godot_cpp/classes/ref_counted.hpp>
16class PixelpartNode :
public RefCounted {
17 GDCLASS(PixelpartNode, RefCounted)
21 virtual ~PixelpartNode();
40 virtual void init(pixelpart::Node* internalNode, pixelpart::EffectEngine* effectEnginePtr);
124 Ref<PixelpartAnimatedPropertyFloat3>
get_position()
const;
133 Ref<PixelpartAnimatedPropertyFloat3>
get_rotation()
const;
140 Ref<PixelpartAnimatedPropertyFloat3>
get_scale()
const;
143 static void _bind_methods();
145 pixelpart::Node* node =
nullptr;
146 pixelpart::EffectEngine* effectEngine =
nullptr;
bool repeat
Wether the node repeats its behavior after its lifetime is over.
Definition PixelpartNode.h:37
bool get_repeat() const
Wether the node repeats its behavior after its lifetime is over.
Definition PixelpartNode.cpp:63
float get_lifetime_start() const
Time in seconds until the node becomes active.
Definition PixelpartNode.cpp:49
float lifetime_duration
How long the node stays active in seconds.
Definition PixelpartNode.h:32
Ref< PixelpartAnimatedPropertyFloat3 > get_rotation() const
Rotation of the node in degrees.
Definition PixelpartNode.cpp:96
bool is_active() const
Return whether the node is active at the current point in time.
Definition PixelpartNode.cpp:70
int get_id() const
ID of the node.
Definition PixelpartNode.cpp:18
void set_repeat(bool value)
Set whether the node repeats its behavior after its lifetime is over.
Definition PixelpartNode.cpp:42
float get_local_time() const
Return the time fraction the emitter has been active for, in range 0.0 (0%) to 1.0 (100%).
Definition PixelpartNode.cpp:77
Ref< PixelpartAnimatedPropertyFloat3 > get_position() const
Position of the node.
Definition PixelpartNode.cpp:85
int get_parent_id() const
ID of the node's parent.
Definition PixelpartNode.cpp:21
void set_lifetime_start(float time)
Set time until the node becomes active.
Definition PixelpartNode.cpp:28
float lifetime_start
Time in seconds until the node becomes active.
Definition PixelpartNode.h:27
void set_lifetime_duration(float time)
Set how long the node stays active in seconds.
Definition PixelpartNode.cpp:35
float get_lifetime_duration() const
How long the node is active in seconds.
Definition PixelpartNode.cpp:56
Ref< PixelpartAnimatedPropertyFloat3 > get_scale() const
Size of the node.
Definition PixelpartNode.cpp:107
String get_name() const
Name of the node.
Definition PixelpartNode.cpp:24