mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-10 12:41:35 -10:00
This will automatically call the destructor of a type of Lua calls the garbage collector for an object of that type. This is the last step towards fully supporting non-trivial objects in the Lua API and all previous workarounds have been removed.
28 lines
372 B
C++
28 lines
372 B
C++
#pragma once
|
|
|
|
#include "scripting/ade_api.h"
|
|
#include "particle/particle.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
class particle_h
|
|
{
|
|
protected:
|
|
particle::WeakParticlePtr part;
|
|
public:
|
|
particle_h();
|
|
|
|
explicit particle_h(const particle::WeakParticlePtr& part_p);
|
|
|
|
particle::WeakParticlePtr Get();
|
|
|
|
bool isValid();
|
|
};
|
|
|
|
DECLARE_ADE_OBJ(l_Particle, particle_h);
|
|
|
|
}
|
|
}
|
|
|