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);
        }
Esempio n. 2
0
        public static void SolidCollision(PhysicsTransform sprite)
        {
            Vector2 cV = sprite.CollisionV;

            if (cV.X != 0)
            {
                sprite.Velocity *= new Vector2(0, 1);
            }
        }
Esempio n. 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);
 }