Skip to content

Commit 116c5c4

Browse files
committed
up
1 parent 7957635 commit 116c5c4

16 files changed

+4385
-4297
lines changed

Assets/Plugins/kbengine/kbengine_unity3d_plugins/AvatarBase.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public AvatarBase()
7373
component1 = (TestBase)Activator.CreateInstance(entityComponentScript);
7474
component1.owner = this;
7575
component1.entityComponentPropertyID = 16;
76+
component1.name_ = "Test";
7677
}
7778
}
7879

@@ -87,6 +88,7 @@ public AvatarBase()
8788
component2 = (TestBase)Activator.CreateInstance(entityComponentScript);
8889
component2.owner = this;
8990
component2.entityComponentPropertyID = 21;
91+
component2.name_ = "Test";
9092
}
9193
}
9294

@@ -101,6 +103,7 @@ public AvatarBase()
101103
component3 = (TestNoBaseBase)Activator.CreateInstance(entityComponentScript);
102104
component3.owner = this;
103105
component3.entityComponentPropertyID = 22;
106+
component3.name_ = "TestNoBase";
104107
}
105108
}
106109

@@ -123,19 +126,56 @@ public override void onComponentsLeaveworld()
123126
component3.onLeaveworld();
124127
}
125128

129+
public override List<EntityComponent> getComponents(string componentName, bool all)
130+
{
131+
List<EntityComponent> founds = new List<EntityComponent>();
132+
133+
if (component1.name_ == componentName)
134+
{
135+
founds.Add(component1);
136+
if (!all)
137+
return founds;
138+
}
139+
140+
if (component2.name_ == componentName)
141+
{
142+
founds.Add(component2);
143+
if (!all)
144+
return founds;
145+
}
146+
147+
if (component3.name_ == componentName)
148+
{
149+
founds.Add(component3);
150+
if (!all)
151+
return founds;
152+
}
153+
154+
return founds;
155+
}
156+
126157
public override void onGetBase()
127158
{
128159
baseEntityCall = new EntityBaseEntityCall_AvatarBase(id, className);
160+
component1.onGetBase();
161+
component2.onGetBase();
162+
component3.onGetBase();
129163
}
130164

131165
public override void onGetCell()
132166
{
133167
cellEntityCall = new EntityCellEntityCall_AvatarBase(id, className);
168+
component1.onGetCell();
169+
component2.onGetCell();
170+
component3.onGetCell();
134171
}
135172

136173
public override void onLoseCell()
137174
{
138175
cellEntityCall = null;
176+
component1.onLoseCell();
177+
component2.onLoseCell();
178+
component3.onLoseCell();
139179
}
140180

141181
public override EntityCall getBaseEntityCall()

0 commit comments

Comments
 (0)