Example #1
0
void SMJS_Entity::OnWrapperAttached(SMJS_Plugin *plugin, v8::Persistent<v8::Value> wrapper){
	auto obj = wrapper->ToObject();
	obj->SetAccessor(v8::String::New("index"), GetEntityIndex);

	obj->Set(v8::String::New("netprops"), netprops.GetWrapper(plugin));
	obj->Set(v8::String::New("keyvalues"), keyvalues.GetWrapper(plugin));
	obj->Set(v8::String::New("datamaps"), datamaps.GetWrapper(plugin));

}
Example #2
0
void MConsole::OnWrapperAttached(SMJS_Plugin *plugin, v8::Persistent<v8::Value> wrapper){
	auto obj = wrapper->ToObject();

}
Example #3
0
void MEntities::OnWrapperAttached(SMJS_Plugin *plugin, v8::Persistent<v8::Value> wrapper){
	auto obj = wrapper->ToObject();
	
	plugin->GetContext()->Global()->Set(v8::String::NewSymbol("Entity"), SMJS_Entity::GetTemplateForPlugin(plugin)->GetFunction());
}