function GetThisBehavior(inst)
{
var i, len;
for (i = 0, len = inst.behavior_insts.length; i < len; i++)
{
if (inst.behavior_insts[i] instanceof behaviorProto.Instance)
return inst.behavior_insts[i];
}
return null;
};
See the official DragnDrop behavior.
"behaviorProto" could be changed to specific behavior.
No comments:
Post a Comment