Hi,
first of all congratulations for releasing your outstanding work to the public. I have been playing around for a few days and I am truly amazed with what you have created there. However since I have problems grapsing the whole basic concept, maybe someone would be kind enough to explain a principle approach to me?
Coming from XNA my first impulse was to derive from Entity to add some properties to my game objects, for a simple example let’s just stick with HitPoints, like so:
public class GameCharacter : Entity
{
public int HitPoints;
}
Now if I do that, I do not find my derived class in the Studio so I can not instanciate it there. I understand this is not the intended way to do things? Or would you suggest to just create instances programmatically instead?
As an alternative, I could put my hit points and whatnots in a script class and just attach that to an Entity instance in the Studio. Is that the intended approach? If so, I would have to do that over and over again, for every instance I add? (I guess I could copy/paste or somehow have templates though, in any case no biggy)
Also, if I build methods or classes to do some math that - in the derived class scenario - would “normally” take two GameCharacters as input, how would i do that with the attached scripts then? I.e. using two Entity instances as an input, how would I get my attached scripts holding the properties from them? E.g:
public Entity CalculateWinner(Entity character1, Entity character2)
{
// Compare HitPoints…how do i read them?
}
I.e. how do i get to the attached script class instances of the Entities? And would I then have to iterate those to find my required type instance? That seems like a huge performance no-no?
Sorry for sounding stupid, I just try to figure the right approach since all I am familiar with so far is just deriving from base classes (which doesnt seem to be the intended way here?)
Regards,
Sven