Advertisement
roll11226

shoot

Feb 28th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1.  
  2.  
  3. private void Shooting ()
  4. {
  5. m_shootingtime.reset();
  6. if(gamepad2.b && m_shootingtime.milliseconds() > 500)
  7. {
  8. m_shootingbool = !m_shootingbool;
  9. m_shootingtime.reset();
  10. }
  11.  
  12. if(m_shootingbool)
  13. {
  14. m_hardware.shootingMotor.setPower(1);
  15. }
  16. else
  17. {
  18. m_hardware.shootingMotor.setPower(0);
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement