Inheritance Tutorial Required

Hello everyone, I’d like to learn how to properly implement inheritance into my scripts. I know that it is a very useful feature and will help with my workflow quite a lot (which is why I have come here to ask about it). I have read and seen some stuff but can’t quite get my head around it.

I’m in the process of making a TD game and would like my enemies and towers to be able to inherit some stats from a base class. If anyone has or knows of any good tutorials for doing this in Unity I would very much appreciate it!

Cheers =]

I’d be interested in writing such a tutorial (atleast for C#), however I do believe C# and JavaScript inheritance are such general concepts of the language that a Unity-specific tutorial might not be right.

I can point you to a tutorial which should be able to get you going with the basics of JavaScript inheritance and C# inheritance atleast.

Thanks for the links, I’ll have a look at them and see what I can come up with =].

If you did do a tutorial on it I’d be very interested in watching/reading it; anything to help me along!

In addition to Rycul’s links, this may be helpful as well: Webs.com has been shut down: Find out more

Chapters 12 - 14 cover inheritance

The tutorials are in the context of XNA but the same concepts apply.