Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def smoothChange(duration, from, to)
- timeLine = Qt::TimeLine.new(duration, self)
- timeLine.setFrameRange(from, to)
- timeLine.curveShape = Qt::TimeLine::EaseInCurve
- connect(timeLine, SIGNAL('frameChanged(int)')) { |i| yield i }
- timeLine.start
- end
- def mousePressEvent(event)
- case event.button
- when Qt::LeftButton then @bullets.push Bullet.new(@position)
- when Qt::MidButton
- smoothChange(500, 90, 45) { |i| self.fov = i }
- end
- end
Add Comment
Please, Sign In to add comment