WSL::Framework::Standard::Base::BaseEntity* WSL::DataTranslation::EntityTranslator::Instantiate( std::string standardScripts[], std::vector< std::string > otherScripts, unsigned int size, bool initialize, bool refresh, bool destroy, bool destroyed, int objectID, WSL::Engine *engine ) { WSL::Framework::Standard::Base::Entity* temp = new WSL::Framework::Standard::Base::Entity( objectID, refresh, destroyed, initialize, destroy, standardScripts[ 1 ], standardScripts[ 0 ], standardScripts[ 2 ], standardScripts[ 3 ], engine ); temp->SendSelf = SendObject; unsigned int i = 0; if( size != 0 ) { while( i < size ) { temp->SetRefrence( engine ); BaseSend(); { WSL::Framework::Standard::Base::BaseEntity* base = &*temp; SendToLua( base, engine ); } temp->RunScript( otherScripts[ i ] ); temp->DeleteRefrence(); i++; } } WSL::Framework::Standard::Base::BaseEntity* base = &*temp; return base; }
void WSL::Framework::Standard::Positional::RunPhysScript( std::string script ) { SendToLua(); SendSelf(); refrence->lua->SetObjID( objID ); refrence->lua->SetID( iD ); SetScanAreaProperties(); luaL_dofile( refrence->luaContainer->State, script.c_str() ); }
void WSL::Framework::Standard::Base::Entity::RunScript( std::string script ) { RunSubClassMethodBegin(); SendToLua(); SendSelf(); refrence[0]->lua->SetObjID( objID ); refrence[0]->lua->SetID( iD ); luaL_dofile( refrence[0]->luaContainer->State, script.c_str() ); RunSubClassMethodEnd(); }
//解析 void SMessageCommand::SMessageCommandParse(SMessage * _message) { int modular = _message->GetModular(); switch (modular) { break; } SendToLua(_message); //POST_MESSAGE(_message); }