public void CheckHit(Bar playerBar, Bar cpuBar) { if (IsCollision(playerBar)) { Swing(playerBar); BounceHorizontal(); playerBar.PlaySound(); playerBar.IncreaseMovementSpeed(); } if (IsCollision(cpuBar)) { Swing(cpuBar); BounceHorizontal(); cpuBar.PlaySound(); cpuBar.IncreaseMovementSpeed(); } }
public void CheckHit(Bar playerBar, Bar cpuBar) { if(IsCollision(playerBar)) { Swing(playerBar); BounceHorizontal(); playerBar.PlaySound(); playerBar.IncreaseMovementSpeed(); } if(IsCollision(cpuBar)) { Swing(cpuBar); BounceHorizontal(); cpuBar.PlaySound(); cpuBar.IncreaseMovementSpeed(); } }