Diverse component dependancys
by Will O-Reagan · in Torque X 2D · 08/06/2007 (2:22 pm) · 0 replies
I have a component, an EnemyStatComponent which has an EnemyCombatComponent dependancy
example:
my plan was to create an AlienCombat component, which encapsulates the EnemyCombatComponent like so...
But in the TXB editor, I can't do this... in my opinion this problem sort of trounces the usefulness of the feature. Because the editor won't let me rescheme my components to the new configuration. I guess I can create my dependancys in the abstracted classes,
, I'll get the exact same effect!
I guess TXB has to somehow check if there are components which inherit the dependants.. Or I am miss-using this concept somehow...
example:
[TorqueXmlSchemaDependency(Type = typeof(EnemyCombat))]
public class EnemyStatComponent : TorqueComponent, ITickObjectmy plan was to create an AlienCombat component, which encapsulates the EnemyCombatComponent like so...
AlienCombat : EnemyCombat
But in the TXB editor, I can't do this... in my opinion this problem sort of trounces the usefulness of the feature. Because the editor won't let me rescheme my components to the new configuration. I guess I can create my dependancys in the abstracted classes,
[TorqueXmlSchemaDependency(Type = typeof(EnemyStatComponent))]
public class AlienCombat : EnemyCombat but this idea still seems bad because what happens when I create an AlienStatComponent : EnemyStatComponent
, I'll get the exact same effect!
I guess TXB has to somehow check if there are components which inherit the dependants.. Or I am miss-using this concept somehow...
About the author
I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.