Advertisement
alestane

Simplfied auto-rotate

Dec 20th, 2012
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function angledGun:rotateAngledGunUp()
  2.     self.TurnSpeed = self.TurnSpeed or 0.5
  3.     if self.display.rotation < 0 or self.display.rotation > 45 then
  4.         self.TurnSpeed = -self.TurnSpeed
  5.     end
  6.    
  7.     self.display:rotate(self.TurnSpeed)
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement