forked from StrafesNET/strafe-project
lol idk #1
@ -219,6 +219,12 @@ impl Instance{
|
||||
Ok(crate::context::class_is_a(instance.class.as_str(),classname.to_str()?))
|
||||
})
|
||||
);
|
||||
methods.add_method("Destroy",|lua,this,()|
|
||||
dom(lua,|dom|{
|
||||
dom.destroy(this.referent());
|
||||
Ok(())
|
||||
})
|
||||
);
|
||||
methods.add_meta_function(mlua::MetaMethod::Index,|lua,(this,index):(mlua::AnyUserData,mlua::String)|{
|
||||
let index_str=index.to_str()?;
|
||||
let dereferent:Dereferent=mlua::AnyUserDataExt::get(&this,"Referent")?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user