Inheritance (2)

Pilvinen Pilvinen

Bullet parenting trick

In Godot if you have a bullet parented to your player, obviously the bullets will move when the player moves. So you need a node outside of your player hierarchy…

Pilvinen Pilvinen

Inheritance with Constructors

Here we call the constructor of the base class A and pass the id as a parameter to initialize _id in the constructor of A class. By doing this way…