public void RemoveBehaivour(BaseEntityBehaviour behaviour) { MDebug.Assert(behaviour.GetOwner() == this , "Entity" , "component.GetOwner() == this"); behaviour.SetOwner(null); behaviour.DestorySelf(); }
public void AddBehaviour(BaseEntityBehaviour behaviour) { MDebug.Assert(behaviour.GetOwner() == null , "Entity" , "component.GetOwner() == null"); behaviour.SetOwner(this); behaviour.SetEnable(true); }