public static void BounceCollision(PhysicsTransform sprite)
        {
            Vector2 cV = sprite.CollisionV;

            if (cV.X != 0) sprite.Velocity *= new Vector2(-1, 1);
            if (cV.Y != 0) sprite.Velocity *= new Vector2(1, -1);
        }
Пример #2
0
        public static void SolidCollision(PhysicsTransform sprite)
        {
            Vector2 cV = sprite.CollisionV;

            if (cV.X != 0)
            {
                sprite.Velocity *= new Vector2(0, 1);
            }
        }
Пример #3
0
        public static void BounceCollision(PhysicsTransform sprite)
        {
            Vector2 cV = sprite.CollisionV;

            if (cV.X != 0)
            {
                sprite.Velocity *= new Vector2(-1, 1);
            }
            if (cV.Y != 0)
            {
                sprite.Velocity *= new Vector2(1, -1);
            }
        }
 public static void SolidCollision(PhysicsTransform sprite)
 {
     Vector2 cV = sprite.CollisionV;
     if (cV.X != 0) sprite.Velocity *= new Vector2(0, 1);
 }