private bool TrySplitCommands(Command command, List <Command> commands)
        {
            if (!this.SplitShareCommand)
            {
                return(false);
            }
            EntityShareCommand item = command as EntityShareCommand;

            if (item == null)
            {
                return(false);
            }
            Component[] components = item.Components;
            item.Components = EmptyComponents;
            commands.Add(item);
            foreach (Component component in components)
            {
                ComponentAddCommand instance = ProtocolFlowInstances.GetInstance <ComponentAddCommand>();
                instance.Entity    = item.GetOrCreateEntity();
                instance.Component = component;
                commands.Add(instance);
            }
            return(true);
        }
Example #2
0
 protected bool Equals(ComponentAddCommand other) =>
 ReferenceEquals(this.Component, other.Component);