示例#1
0
        public override MyObjectBuilder_EntityBase GetObjectBuilder(bool copy = false)
        {
            var builder = (MyObjectBuilder_FloatingObject)base.GetObjectBuilder(copy);

            builder.Item = Item.GetObjectBuilder();
            return(builder);
        }
示例#2
0
        private static MyObjectBuilder_Meteor PrepareBuilder(ref MyInventoryItem item)
        {
            var meteorBuilder = Sandbox.Common.ObjectBuilders.Serializer.MyObjectBuilderSerializer.CreateNewObject <MyObjectBuilder_Meteor>();

            meteorBuilder.Item             = item.GetObjectBuilder();
            meteorBuilder.PersistentFlags |= MyPersistentEntityFlags2.Enabled | MyPersistentEntityFlags2.InScene;
            return(meteorBuilder);
        }
示例#3
0
        private static MyObjectBuilder_FloatingObject PrepareBuilder(ref MyInventoryItem item)
        {
            Debug.Assert(item.Amount > 0, "FloatObject item amount must be > 0");

            var floatingBuilder = Sandbox.Common.ObjectBuilders.Serializer.MyObjectBuilderSerializer.CreateNewObject <MyObjectBuilder_FloatingObject>();

            floatingBuilder.Item             = item.GetObjectBuilder();
            floatingBuilder.PersistentFlags |= MyPersistentEntityFlags2.Enabled | MyPersistentEntityFlags2.InScene;
            return(floatingBuilder);
        }
示例#4
0
            public override MyObjectBuilder_EntityBase GetObjectBuilder(bool copy = false)
            {
                var builder = (MyObjectBuilder_Meteor)base.GetObjectBuilder(copy);

                builder.LinearVelocity  = Entity.Physics.LinearVelocity;
                builder.AngularVelocity = Entity.Physics.AngularVelocity;
                if (GameLogic != null)
                {
                    builder.Item      = Item.GetObjectBuilder();
                    builder.Integrity = Integrity;
                }
                return(builder);
            }
示例#5
0
 private static MyObjectBuilder_Meteor PrepareBuilder(ref MyInventoryItem item)
 {
     var meteorBuilder = Sandbox.Common.ObjectBuilders.Serializer.MyObjectBuilderSerializer.CreateNewObject<MyObjectBuilder_Meteor>();
     meteorBuilder.Item = item.GetObjectBuilder();
     meteorBuilder.PersistentFlags |= MyPersistentEntityFlags2.Enabled | MyPersistentEntityFlags2.InScene;
     return meteorBuilder;
 }