-
-
Save rosskarchner/86230a3eb0ef3764d2aee2e9701fd8e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node | |
class_name A | |
func name_func(): | |
return "foo" | |
func say_hello(): | |
name = name_func() | |
print("Hello " + name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends A | |
class_name B | |
func name_func(): | |
return "bar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends Node | |
# Called when the node enters the scene tree for the first time. | |
func _ready(): | |
var test = B.new() | |
test.say_hello() | |
# Called every frame. 'delta' is the elapsed time since the previous frame. | |
func _process(delta): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run this (root node is a Node with node.gd as the script), it prints
Hello bar