private void InitItem(Vector2 pos1, Vector2?pos2)
        {
            Item1       = new DebugCollisionItem(new Vector2(pos1.X, pos1.Y));
            Moving1     = Item1.GetProperty <WalkingProperty>();
            Collidable1 = Item1.GetProperty <CollidableProperty>();

            if (pos2.HasValue)
            {
                Item2       = new DebugCollisionItem(new Vector2(pos2.Value.X, pos2.Value.Y));
                Moving2     = Item2.GetProperty <WalkingProperty>();
                Collidable2 = Item2.GetProperty <CollidableProperty>();
            }
        }
        public void MovingVsNonCollision()
        {
            InitItem(new Vector2(50, 100), null);
            Item2   = new DebugWalkingItem(new Vector2(150, 100));
            Moving2 = Item2.GetProperty <WalkingProperty>();
            InitFlat(true);

            Collidable1.OnCollision += (i, v) =>
            {
                collision1++;
            };

            float distance = new Vector2(2, 2).Length();

            // Kollision X-Achse
            Move(new Vector2(97, 100), new Vector2(97 + distance, 100), Angle.Right,
                 new Vector2(103, 100), new Vector2(103 - distance, 100), Angle.Left);
            CheckCollisionEvents(0, 0, 0);

            // Kollision Y-Achse
            Move(new Vector2(100, 97), new Vector2(100, 97 + distance), Angle.Down,
                 new Vector2(100, 103), new Vector2(100, 103 - distance), Angle.Up);
            CheckCollisionEvents(0, 0, 0);
        }
 private void InitItem(Vector2 pos)
 {
     Item = new DebugWalkingItem(new Vector2(pos.X, pos.Y));
     Walking = Item.GetProperty<WalkingProperty>();
 }
 private void InitItem(Vector2 pos)
 {
     Item    = new DebugWalkingItem(new Vector2(pos.X, pos.Y));
     Walking = Item.GetProperty <WalkingProperty>();
 }
        private void InitItem(Vector2 pos1, Vector2? pos2)
        {
            Item1 = new DebugCollisionItem(new Vector2(pos1.X, pos1.Y));
            Moving1 = Item1.GetProperty<WalkingProperty>();
            Collidable1 = Item1.GetProperty<CollidableProperty>();

            if (pos2.HasValue)
            {
                Item2 = new DebugCollisionItem(new Vector2(pos2.Value.X, pos2.Value.Y));
                Moving2 = Item2.GetProperty<WalkingProperty>();
                Collidable2 = Item2.GetProperty<CollidableProperty>();
            }
        }
        public void MovingVsNonCollision()
        {
            InitItem(new Vector2(50, 100), null);
            Item2 = new DebugWalkingItem(new Vector2(150, 100));
            Moving2 = Item2.GetProperty<WalkingProperty>();
            InitFlat(true);

            Collidable1.OnCollision += (i, v) =>
            {
                collision1++;
            };

            float distance = new Vector2(2, 2).Length();

            // Kollision X-Achse
            Move(new Vector2(97, 100), new Vector2(97 + distance, 100), Angle.Right,
                new Vector2(103, 100), new Vector2(103 - distance, 100), Angle.Left);
            CheckCollisionEvents(0, 0, 0);

            // Kollision Y-Achse
            Move(new Vector2(100, 97), new Vector2(100, 97 + distance), Angle.Down,
                new Vector2(100, 103), new Vector2(100, 103 - distance), Angle.Up);
            CheckCollisionEvents(0, 0, 0);
        }