Game Development Community

Exposing a List<T2DAnimatedSprite> as a property

by Mark Maynard · in Torque Game Builder · 03/21/2010 (12:54 pm) · 2 replies

I am trying to make a my own spawner component that will spawn a random animated sprite from a list. Whenever I try to create a property for this, so that the list can be modified inside the game builder the game builder crashes.

public List<T2DAnimatedSprite> TargetSprites
{
    set { _targetSprites = value; }
    get { return _targetSprites; }
}

Can this be done, I have no problem if the list is of generic objects, but then I don't get any of my sprites as selection in the drop down box in the GUI.

Any advice?

#1
03/21/2010 (2:36 pm)
hmmm that code smells like C# to me, are you sure you're not looking for the TorqueX 2D forum?
#2
03/21/2010 (2:39 pm)
You're right, I'll mozie along now.