Asteroids & Refactoring
We have proper belts that hug the Grid, reactive properties for planet instance data, and more!
This commit is contained in:
parent
a981a46170
commit
1f90d3639a
42 changed files with 614 additions and 597 deletions
|
|
@ -379,6 +379,22 @@ public abstract class Entity : DatabaseEntry, IMessagePackSerializationCallbackR
|
|||
Children.Remove(entity.ID);
|
||||
ChildEvent.Change();
|
||||
}
|
||||
|
||||
public void SetParent(Entity parent)
|
||||
{
|
||||
Parent = parent.ID;
|
||||
parent.AddChild(this);
|
||||
}
|
||||
|
||||
public void RemoveParent()
|
||||
{
|
||||
if (Parent == Guid.Empty)
|
||||
return;
|
||||
|
||||
var parent = Zone.Entities[Parent];
|
||||
parent.RemoveChild(this);
|
||||
Parent = Guid.Empty;
|
||||
}
|
||||
|
||||
public Guid Build(BlueprintData blueprint, float quality, string name, bool direct = false)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue