Actually, let's make that take a prefix argument, and only return properties
that begin with that prefix. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@309 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -266,13 +266,15 @@ public class EZGameControl extends BaseControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the names of all currently-set properties.
|
* Get the names of all currently-set properties that begin with the specified prefix.
|
||||||
*/
|
*/
|
||||||
public function getProperyNames () :Array
|
public function getProperyNames (prefix :String = "") :Array
|
||||||
{
|
{
|
||||||
var props :Array = [];
|
var props :Array = [];
|
||||||
for (var s :String in _gameData) {
|
for (var s :String in _gameData) {
|
||||||
props.push(s);
|
if (s.lastIndexOf(prefix, 0) == 0) {
|
||||||
|
props.push(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user