Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
kebiao committed May 24, 2019
1 parent 7957635 commit 116c5c4
Show file tree
Hide file tree
Showing 16 changed files with 4,385 additions and 4,297 deletions.
40 changes: 40 additions & 0 deletions Assets/Plugins/kbengine/kbengine_unity3d_plugins/AvatarBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public AvatarBase()
component1 = (TestBase)Activator.CreateInstance(entityComponentScript);
component1.owner = this;
component1.entityComponentPropertyID = 16;
component1.name_ = "Test";
}
}

Expand All @@ -87,6 +88,7 @@ public AvatarBase()
component2 = (TestBase)Activator.CreateInstance(entityComponentScript);
component2.owner = this;
component2.entityComponentPropertyID = 21;
component2.name_ = "Test";
}
}

Expand All @@ -101,6 +103,7 @@ public AvatarBase()
component3 = (TestNoBaseBase)Activator.CreateInstance(entityComponentScript);
component3.owner = this;
component3.entityComponentPropertyID = 22;
component3.name_ = "TestNoBase";
}
}

Expand All @@ -123,19 +126,56 @@ public override void onComponentsLeaveworld()
component3.onLeaveworld();
}

public override List<EntityComponent> getComponents(string componentName, bool all)
{
List<EntityComponent> founds = new List<EntityComponent>();

if (component1.name_ == componentName)
{
founds.Add(component1);
if (!all)
return founds;
}

if (component2.name_ == componentName)
{
founds.Add(component2);
if (!all)
return founds;
}

if (component3.name_ == componentName)
{
founds.Add(component3);
if (!all)
return founds;
}

return founds;
}

public override void onGetBase()
{
baseEntityCall = new EntityBaseEntityCall_AvatarBase(id, className);
component1.onGetBase();
component2.onGetBase();
component3.onGetBase();
}

public override void onGetCell()
{
cellEntityCall = new EntityCellEntityCall_AvatarBase(id, className);
component1.onGetCell();
component2.onGetCell();
component3.onGetCell();
}

public override void onLoseCell()
{
cellEntityCall = null;
component1.onLoseCell();
component2.onLoseCell();
component3.onLoseCell();
}

public override EntityCall getBaseEntityCall()
Expand Down
Loading

0 comments on commit 116c5c4

Please sign in to comment.