Advertisement
Sorom

custom_camera_2d.gd

May 7th, 2021 (edited)
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tool
  2. class_name CustomCamera2D
  3. extends Camera2D
  4.  
  5. # Overriding the set_zoom() method from Camera2D
  6. func set_zoom(value):
  7.     .set_zoom(value) # I want the set_zoom() setter of my class to do the same thing as Camera2D set_zoom() setter
  8.     apply_changes()  # However I need to do something more, therefore calling another method after setting the zoom value
  9.  
  10. # Method that need to be applied when the zoom changed
  11. func apply_changes():
  12.     ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement