Пример #1
0
        protected override void OnCopyTo(Component target, Duality.Cloning.CloneProvider provider)
        {
            base.OnCopyTo(target, provider);
            SoundEmitter c = target as SoundEmitter;

            c.sources = this.sources == null ? null : this.sources.Select(s => provider.RequestObjectClone(s)).ToList();
        }
Пример #2
0
        protected override void OnCopyTo(Resource r, Duality.Cloning.CloneProvider provider)
        {
            base.OnCopyTo(r, provider);
            Scene s = r as Scene;

            // Apply general properties
            s.globalGravity = this.globalGravity;

            // Copy objects
            s.objectManager.Clear();
            s.objectManager.AddObject(this.RootObjects.Select(o => provider.RequestObjectClone(o)));
        }