Skip to content

Commit c8ab05b

Browse files
committed
up
1 parent ae8d5ff commit c8ab05b

File tree

7 files changed

+75
-1
lines changed

7 files changed

+75
-1
lines changed

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/AvatarBase.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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

4346
void 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

5157
void AvatarBase::onLoseCell()
5258
{
5359
delete pCellEntityCall;
5460
pCellEntityCall = NULL;
61+
component1->onLoseCell();
62+
component2->onLoseCell();
63+
component3->onLoseCell();
5564
}
5665

5766
EntityCall* AvatarBase::getBaseEntityCall()

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/EntityComponent.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff 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
// 动态生成

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/KBEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/TestBase.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,31 @@ namespace KBEngine
1717
void 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+
2445
ScriptModule* TestBase::getScriptModule()
2546
{
2647
return *EntityDef::moduledefs.Find("Test");

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/TestBase.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/TestNoBaseBase.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,31 @@ namespace KBEngine
1717
void 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+
2445
ScriptModule* TestNoBaseBase::getScriptModule()
2546
{
2647
return *EntityDef::moduledefs.Find("TestNoBase");

Plugins/kbengine_ue4_plugins/Source/KBEnginePlugins/Engine/TestNoBaseBase.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)