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); } }
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); }