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.
To get dt of instance, use var dt = this.runtime.getDt(inst);
But only plugin which has "type" to "world" would have my_timescale property. So my_timescale need to be added manually for other case.
For example: this.my_timescale = -1