public override void CopyInto(IBaseComponent newObject)
        {
            var healthComp = newObject as InvincibleHealthComponent;

            Debug.Assert(healthComp != null, "healthComp != null");

            healthComp.IsInvincible = IsInvincible;

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var damageComp = newObject as DamageComponent;

            Debug.Assert(damageComp != null, "damageComp != null");

            damageComp.Damage = Damage;

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var baseInputComponent = newObject as BaseInputComponent;

            Debug.Assert(baseInputComponent != null, "baseInputComponent != null");

            baseInputComponent.InputHandler = InputHandler;

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var healthComp = newObject as HealthComponent;

            Debug.Assert(healthComp != null, "healthComp != null");

            healthComp.MaxHealth = MaxHealth;
            healthComp.CurrHealth = CurrHealth;

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var healthComp = newObject as IntervalInvincibleHealthComponent;

            Debug.Assert(healthComp != null, "intervalHealthComponent != null");

            healthComp.InvincibleInterval = InvincibleInterval;
            healthComp.CurrInvincibleTime = CurrInvincibleTime;

            base.CopyInto(newObject);
        }
        public static void TestFlatFile(IBaseComponent component)
        {
            var components = new List<Tuple<IBaseComponent, PipelineStage>>
            {
                new Tuple<IBaseComponent, PipelineStage>(component, PipelineStage.Validate)
            };

            var result = ExecuteReceivePipeline(TestFiles.FlatFileFilePath, components);

            using (var reader = new StreamReader(result[0].BodyPart.Data))
            {
                var line = reader.ReadLine();
                Assert.IsTrue(line != null && line.Equals("test test"), "Text file is not unchanged");
            }
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var renderComponent = newObject as RenderComponent;

            Debug.Assert(renderComponent != null, "renderComponent != null");

            renderComponent.Visible = true;

            foreach (var renderableKeyValue in renderables)
            {
                var newRenderable = renderableKeyValue.Value.DeepClone();
                newRenderable.Visible = true;
                renderComponent.AddRenderable(newRenderable, renderableKeyValue.Key);
            }

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var physicsComponent = newObject as PhysicsComponent;

            Debug.Assert(physicsComponent != null, "physicsComponent != null");

            physicsComponent.MaxVelocity = MaxVelocity;
            physicsComponent.Solid = Solid;

            foreach (KeyValuePair<string, Body> bodyEntry in Bodies)
            {
                var body = bodyEntry.Value.DeepClone();
                ((FarseerUserData)body.UserData).Owner = physicsComponent;
                physicsComponent.AddBody(bodyEntry.Value.DeepClone(), bodyEntry.Key);
                physicsManager.RegisterBody(body);
            }

            foreach (KeyValuePair<string, Joint> joint in Joints)
            {
                physicsComponent.copyJoints.Add(joint.Key, joint.Value);
            }

            base.CopyInto(newObject);
        }
 public virtual void CopyInto(IBaseComponent newObject)
 {
     newObject.InterfaceType = InterfaceType;
     newObject.ConcreteType = ConcreteType;
 }
        public override void CopyInto(IBaseComponent newObject)
        {
            var movementComponent = newObject as MovementComponent;

            Debug.Assert(movementComponent != null, "movementComponent != null");

            movementComponent.MaxVelocity = MaxVelocity;
            movementComponent.MoveVelocity = MoveVelocity;
            movementComponent.VelocityDampingPercent = VelocityDampingPercent;

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var behaviorComp = newObject as BehaviorComponent;

            Debug.Assert(behaviorComp != null, "behaviorComp != null");

            foreach (var behavior in behaviors.Values)
            {
                var newBehavior = behaviorFactory.GetBehavior(behavior.GetType());
                behavior.CopyInto(newBehavior);
                newBehavior.Parent = behaviorComp;

                behaviorComp.behaviors.Add(newBehavior.Name, newBehavior);
            }

            base.CopyInto(newObject);
        }
        public override void CopyInto(IBaseComponent newObject)
        {
            var collisionComp = newObject as CollisionComponent;

            Debug.Assert(collisionComp != null, "collisionComp != null");

            collisionComp.BoundingBox2D = (BoundingBox2D) BoundingBox2D.DeepCopy();
            collisionComp.CollisionPriority = CollisionPriority;

            base.CopyInto(newObject);
        }