Guest User

Untitled

a guest
Jun 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. update(dt) {
  2. const { angleSpeed } = this;
  3.  
  4. if (angleSpeed !== 0) {
  5. const angle = this.angle = MathUtilities.clamp(this.angle + angleSpeed * dt,
  6. this.leftMaxAngle * -1,
  7. this.rightMaxAngle);
  8. this.barrel.rotation = angle;
  9. }
  10. }
Add Comment
Please, Sign In to add comment