File tree Expand file tree Collapse file tree 7 files changed +75
-1
lines changed
Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine Expand file tree Collapse file tree 7 files changed +75
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ void AvatarBase::onGetBase()
3838 delete pBaseEntityCall;
3939
4040 pBaseEntityCall = new EntityBaseEntityCall_AvatarBase (id (), className ());
41+ component1->onGetBase ();
42+ component2->onGetBase ();
43+ component3->onGetBase ();
4144}
4245
4346void AvatarBase::onGetCell ()
@@ -46,12 +49,18 @@ void AvatarBase::onGetCell()
4649 delete pCellEntityCall;
4750
4851 pCellEntityCall = new EntityCellEntityCall_AvatarBase (id (), className ());
52+ component1->onGetCell ();
53+ component2->onGetCell ();
54+ component3->onGetCell ();
4955}
5056
5157void AvatarBase::onLoseCell ()
5258{
5359 delete pCellEntityCall;
5460 pCellEntityCall = NULL ;
61+ component1->onLoseCell ();
62+ component2->onLoseCell ();
63+ component3->onLoseCell ();
5564}
5665
5766EntityCall* AvatarBase::getBaseEntityCall ()
Original file line number Diff line number Diff line change @@ -39,6 +39,21 @@ class KBENGINEPLUGINS_API EntityComponent
3939 return NULL ;
4040 }
4141
42+ virtual void onGetBase ()
43+ {
44+ // 动态生成
45+ }
46+
47+ virtual void onGetCell ()
48+ {
49+ // 动态生成
50+ }
51+
52+ virtual void onLoseCell ()
53+ {
54+ // 动态生成
55+ }
56+
4257 virtual void onRemoteMethodCall (uint16 methodUtype, MemoryStream& stream)
4358 {
4459 // 动态生成
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ void KBEngineApp::reset()
235235 serverdatas_.Empty ();
236236
237237 serverVersion_ = TEXT (" " );
238- clientVersion_ = TEXT (" 2.5.0 " );
238+ clientVersion_ = TEXT (" 2.5.1 " );
239239 serverScriptVersion_ = TEXT (" " );
240240 clientScriptVersion_ = TEXT (" 0.1.0" );
241241
Original file line number Diff line number Diff line change @@ -17,10 +17,31 @@ namespace KBEngine
1717void TestBase::createFromStream (MemoryStream& stream)
1818{
1919 EntityComponent::createFromStream (stream);
20+ }
21+
22+ void TestBase::onGetBase ()
23+ {
24+ if (pBaseEntityCall)
25+ delete pBaseEntityCall;
26+
2027 pBaseEntityCall = new EntityBaseEntityCall_TestBase (entityComponentPropertyID, ownerID);
28+ }
29+
30+ void TestBase::onGetCell ()
31+ {
32+ if (pCellEntityCall)
33+ delete pCellEntityCall;
34+
2135 pCellEntityCall = new EntityCellEntityCall_TestBase (entityComponentPropertyID, ownerID);
2236}
2337
38+ void TestBase::onLoseCell ()
39+ {
40+ delete pCellEntityCall;
41+ pCellEntityCall = NULL ;
42+ }
43+
44+
2445ScriptModule* TestBase::getScriptModule ()
2546{
2647 return *EntityDef::moduledefs.Find (" Test" );
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ class KBENGINEPLUGINS_API TestBase : public EntityComponent
3636
3737 void createFromStream (MemoryStream& stream) override ;
3838
39+ void onGetBase () override ;
40+ void onGetCell () override ;
41+ void onLoseCell () override ;
42+
3943 void onRemoteMethodCall (uint16 methodUtype, MemoryStream& stream) override ;
4044 void onUpdatePropertys (uint16 propUtype, MemoryStream& stream, int maxCount) override ;
4145 void callPropertysSetMethods () override ;
Original file line number Diff line number Diff line change @@ -17,10 +17,31 @@ namespace KBEngine
1717void TestNoBaseBase::createFromStream (MemoryStream& stream)
1818{
1919 EntityComponent::createFromStream (stream);
20+ }
21+
22+ void TestNoBaseBase::onGetBase ()
23+ {
24+ if (pBaseEntityCall)
25+ delete pBaseEntityCall;
26+
2027 pBaseEntityCall = new EntityBaseEntityCall_TestNoBaseBase (entityComponentPropertyID, ownerID);
28+ }
29+
30+ void TestNoBaseBase::onGetCell ()
31+ {
32+ if (pCellEntityCall)
33+ delete pCellEntityCall;
34+
2135 pCellEntityCall = new EntityCellEntityCall_TestNoBaseBase (entityComponentPropertyID, ownerID);
2236}
2337
38+ void TestNoBaseBase::onLoseCell ()
39+ {
40+ delete pCellEntityCall;
41+ pCellEntityCall = NULL ;
42+ }
43+
44+
2445ScriptModule* TestNoBaseBase::getScriptModule ()
2546{
2647 return *EntityDef::moduledefs.Find (" TestNoBase" );
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ class KBENGINEPLUGINS_API TestNoBaseBase : public EntityComponent
3636
3737 void createFromStream (MemoryStream& stream) override ;
3838
39+ void onGetBase () override ;
40+ void onGetCell () override ;
41+ void onLoseCell () override ;
42+
3943 void onRemoteMethodCall (uint16 methodUtype, MemoryStream& stream) override ;
4044 void onUpdatePropertys (uint16 propUtype, MemoryStream& stream, int maxCount) override ;
4145 void callPropertysSetMethods () override ;
You can’t perform that action at this time.
0 commit comments