This video demonstrates how subtype polymorphism can be used in Godot Engine in order to create modular powerups. That is, we can create different abilities for the player by putting them into separate scripts and dynamically attach these scripts to the player.
A few ideas that show up in this video are:
Sharing a script between multiple scenes
Using class_name in order to benefit from type hints
Instantiating non-scene scripts at runtime
Using setget with a custom accessor
How tau can be more convenient than pi
Watch video Modular Powerups: Polymorphism in GDScript online without registration, duration hours minute second in high quality. This video was added by user Paul Gestwicki 15 October 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,12 once and liked it 5 people.