public void MoveComponent(BaseComponent component, FissureEntity destination) { if (component == null) { throw new ComponentNotFoundException("Cannot move component to destination, the Component is null"); } if (!HasComponent(component.GetType())) { throw new ComponentNotFoundException($"Cannot move component {component.GetType().Name} to destination, the Component does not exist in the source"); } destination.AddComponent(component); RemoveComponent(component.GetType()); }
private void OnComponentRemoved(FissureEntity entity, BaseComponent component) { ComponentRemoved?.Invoke(entity, component); }