ScopeVars.gd 794 B

1234567891011121314151617181920212223242526
  1. extends Node
  2. var member1 := TestClassA.new()
  3. var str_var := "ScopeVars::member::str_var"
  4. var str_var_member_only := "ScopeVars::member::str_var_member_only"
  5. class ClassFoo:
  6. var member_ClassFoo
  7. var str_var := "ScopeVars::ClassFoo::member::str_var"
  8. var str_var_member_only := "ScopeVars::ClassFoo::member::str_var_member_only"
  9. func test_function(delta: float) -> void:
  10. var str_var := "ScopeVars::ClassFoo::test_function::local::str_var"
  11. print("breakpoint::ScopeVars::ClassFoo::test_function")
  12. func _ready() -> void:
  13. var str_var := "ScopeVars::_ready::local::str_var"
  14. var self_var := self
  15. print("breakpoint::ScopeVars::_ready")
  16. test(0.123);
  17. func test(val: float):
  18. var str_var := "ScopeVars::test::local::str_var"
  19. var foo := ClassFoo.new()
  20. foo.test_function(val)