Skip to content

Instantly share code, notes, and snippets.

@itoz
Created March 5, 2011 19:45
Show Gist options
  • Save itoz/856657 to your computer and use it in GitHub Desktop.
Save itoz/856657 to your computer and use it in GitHub Desktop.
// ボタンイベントで配信された状態値が引数に渡される。obj["type"] が各キャラの状態値。
private function search(bit : uint) : Array{
var result : Array = [];
for (var i : int = 0; i < _arr.length; i++) {
var obj : Object = _arr[i];
if ((bit & parseInt(obj["type"], 2)) == bit)
result.push(node);
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment