Advertisement
otorp2

clamp value

Jan 8th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1.  
  2. extends Node2D
  3. var size = 1
  4.  
  5. func _ready():
  6.  
  7. set_process(true)
  8. pass
  9. func _process(delta):
  10.  
  11. OS.set_target_fps(5)
  12.  
  13. update()
  14.  
  15.  
  16. func _draw():
  17.  
  18. size+=1
  19. size = clamp(size,1,200)
  20. print(size)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement