It may sounds silly question… but I really need your experience and advice about it.
As I said in previous posts, that I am developing single player 2D Chrono Trigger-ish (or old Final Fantasy) RPG.
I face beginner problems about Inheritance.
Why?
When I was in Unity (Yeah…) C# Programming, my colleague commented once that
“Inheritance is good too, but implementing Player/Enemy by components might be better in future.”
Normally I would inherit the base character class to implement various units - Player and enemies.
When I encounter Actor Component… it makes me to tempt to try different approach.
I planned Actor class (base character class) with Actor Components (such as AI, Stat, PlayerController?).
But it was once failed by TickComponent which didn’t work out well (didn’t work out).
However, I face another problem, which is critical… even if I solve TickComponent problem.
How do I access Actor Component’s variables (such as HP, Action, e.t.c.)?
In Unity, normally I used “GetComponent<TheComponentType>” to approach the component in objects.
In Unreal Engine, is there? I assume there would be, but I don’t know how.
Back to the question, should I use Inheritance or Actor Component about types of Units?
C++ UMG Inventory Widget class by WCode (I think it is him)…
How can I expand it with C++? Can anyone gives me good example?
I thought about it as usage for showing available items to use…
The problem is… all items are from TArray or TMap, is it possible to show all items as Widgets(actually Fonts with Images) from TArray or TMap?
I am going to research on UMG soon, but it would be better if anyone has experience on UMG or HUD to advise me.
I apologize for speaking from Unity’s aspect, and sounds complicated, but I really am desperate with programming and time is ticking again.
Please Help me T.T