entries of the category „Scripting“
FilterPropertyElementList
C#
public bool FilterPropertyElementList(string propertyID, GSObject[] listObjects, string[] listNames)
{
if (propertyID == "object-list")
{
bool bDidChangeAnything = false;
// Remove any already added objects from the list
int i;
for (i = 0; i < listObjects.size(); )
{
if (IsAlreadyInList(cast<GameObject>(listObjects[i])))
{
listObjects[i,i+1] = null;
listNames[i,i+1] = null;
bDidChangeAnything = true;
}
else
{
++i;
}
}
return bDidChangeAnything;
}
return inherited(propertyID, listObjects, listNames);
}
Display More
GetPropertyElementList
C#
public string[] GetPropertyElementList(string propertyID)
{
if (propertyID == "mode")
{
StringTable strTable = GetAsset().GetStringTable();
string[] result = new string[10];
int i;
for (i = 1; i < 10; ++i)
result[i] = strTable.GetString("property_list_mode_" + i);
return result;
}
return inherited(propertyID);
}
Display More