#CREATE BETTER SCRIPTS WITH THIS METHOD

3 messages · Page 1 of 1 (latest)

sharp anchor
fathom harness
#

in which situations would someone do this vs extending a class ?

keen mortar
# fathom harness in which situations would someone do this vs extending a class ?

It’s inheritance essentially.

Say you had a script for “living thing”. Maybe living things could include NPCs (which are invincible). They don’t need health. Then you could have a monster inherit that “living things” script then have an HP/mana etc variables. Then you could have player inherit the “monsters” script and have controls etc.