| 赞 | 39  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 35 | 
 
| 经验 | 0 | 
 
| 最后登录 | 2025-10-29 | 
 
| 在线时间 | 294 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 3486 
 
        - 在线时间
 - 294 小时
 
        - 注册时间
 - 2020-1-27
 
        - 帖子
 - 190
 
 
 
 | 
	
 本帖最后由 zths 于 2020-4-4 19:44 编辑  
 
 
$gameMap._interpreter.setupChild($dataCommonEvents[3].list, 0); 
或者 
$gameTroop._interpreter.setupChild($dataCommonEvents[3].list, 0); 
但这也不是并行执行,是阻塞的。 
在当前队列里插入一个子事件,子事件结束后才会。。。。。 
setupChild 是 Interpreter对象的方法,所以要正确的插入应该是 
递归到最后一个子事件 再调用setupChild 
也就是说  
funcrtion initNewChildInterpreter(currInterpreter,newInterpreter){ 
    if(!currInterpreter){return;} 
    if(currInterpreter._childInterpreter){ 
        return initNewChildInterpreter(currInterpreter._childInterpreter,newInterpreter); 
    } 
    currInterpreter.setupChild(newInterpreter, currInterpreter._depth + 1); 
} 
var nev = $dataCommonEvents[3]; 
initNewChildInterpreter($gameMap._interpreter,nev.list); 
 
 
大概是这样 代码没测过。 |   
 
 
 
 |