예제 #1
0
        internal SynapseItemObject(SynapseSchematic.ItemConfiguration configuration)
        {
            Item             = CreateItem(configuration.ItemType, configuration.Position, Quaternion.Euler(configuration.Rotation), configuration.Scale, configuration.CanBePickedUp);
            OriginalScale    = configuration.Scale;
            CustomAttributes = configuration.CustomAttributes;
            ItemType         = configuration.ItemType;

            var script = GameObject.AddComponent <SynapseObjectScript>();

            script.Object = this;
        }
예제 #2
0
        internal SynapseItemObject(SynapseSchematic.ItemConfiguration configuration)
        {
            Item                   = CreateItem(configuration.ItemType, configuration.Position, Quaternion.Euler(configuration.Rotation), configuration.Scale, configuration.CanBePickedUp);
            Item.Durabillity       = configuration.Durabillity;
            Item.WeaponAttachments = configuration.Attachments;
            OriginalScale          = configuration.Scale;
            CustomAttributes       = configuration.CustomAttributes;
            ItemType               = configuration.ItemType;
            if (configuration.Physics)
            {
                ApplyPhysics();
            }

            var script = GameObject.AddComponent <SynapseObjectScript>();

            script.Object = this;
        }