コード例 #1
0
        public override EntityBO ToBlueprintObject()
        {
            EntityBO entity = base.ToBlueprintObject();

            entity.ControlBehavior = new ControlBehaviorBO
            {
                CircuitCondition = new CircuitConditionBO
                {
                    Comparator  = SignalComparators.Greater,
                    Constant    = 0,
                    FirstSignal = new SignalIdBO
                    {
                        Name = VirtualSignalNames.Any,
                        Type = SignalTypes.Virtual
                    }
                },
                UseColors = true
            };

            return(entity);
        }
コード例 #2
0
        public virtual EntityBO ToBlueprintObject()
        {
            var entity = new EntityBO
            {
                EntityNumber = Number,
                Name         = Name,
                Position     = new PositionBO {
                    X = X, Y = Y
                }
            };

            if (RedConnections.Any())
            {
                entity.Connections = new ConnectionBO
                {
                    _1 = new ConnectionPointBO
                    {
                        Red = RedConnections.Select(x => x.ToBlueprintObject()).ToArray()
                    }
                };
            }

            return(entity);
        }