Topic was automatically imported from the old Question2Answer platform.
Asked By
Black Monkey
I have a parent-Node2D with an image; on witch I draw and use setpixel etc.
It has a childe-Node2D, witch is almost the same as it parent.
Now, how can the child use the functions of the parent, so they draw in the child instead?
First: Thank you.
Second: Nope I don’t get it.
I’m guessing ‘draw_on_child’ tells the ‘draw_circle-function in the child-node’ to work?
I thought all draw-functions had to be in _draw()?
Well… I fiddled a bit, and now the child can draw circles on the parent. (most parents wouldn’t like that! HA!) But I want the child to tell the parent to draw on the child.
I was perhaps not clear enough in my question?
Let’s say I have a bunch of functions in some node (parent or otherwise). As a kind of library of useful stuff.
I can use them from other nodes via get_node(someplace). But (in my case(so far)) I can only get them to change data. Not draw stuff in the node that calls them.
I’m still baffled, so probably avencherus’s answer is correct.
edit: why is my text oblique? Strange thing are going on…
edit too: I’m sure avencherus’s answer is accurate but my question was questionable?.