I have a difficult time trying to implement inheritance and constructors in unity. Are there any examples that use this ideas?
I am asking this because I have a hard time scripting in unity while I don't feel this when I code for my cs classes. I don't know why but it seems really different. One example is that I end up creating bunch of little scripts for different actions and the amount of script and script referencing becomes absurd. This is why I thought inheritance, abstract classes, POLYMORPHISM might help.
For constructors, I don't understand how are you supposed to use this? Constructors basically creates a new object. However, usually in unity, you have all the gameobjects spawned in the scene or it is Instantiate().
So it will help if examples are provided!! :p
Also, on the same topic on organization of scripts, what is:
MODULARIZATION & DEPENDENCY INVERSION
mentioned in [this post][1]
thank you :D
[1]: http://unity3d.com/learn/tutorials/modules/intermediate/scripting/coding-practices
↧