| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-7-10 |
| 在线时间 | 95 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 95 小时
- 注册时间
- 2017-4-26
- 回帖
- 30
|
楼主 |
发表于 2017-5-14 17:49:58
|
显示全部楼层
捣鼓了半天,看起来初步能用了,代码贴上来,做点好事:)
- Scene_Battle.prototype.commandRide = function() {
- var index = BattleManager.actor().index();
- var id = BattleManager.actor().actorId();
- if (id > actorId[index]) {
- // 加入角色
- var id = actorId[index];
- $gameParty.addActor(id);
- // 替换位置
- $gameParty.swapOrder(index,$gameParty.size() - 1);
- // 战车离开
- $gameParty.removeActor(10 + actorTankId[index]);
-
- $gameParty.members()[index].makeActions();
- BattleManager.selectNextCommand(true, index);
- //$gameActors.actor(10 + actorTankId[index]).makeActions();
- //$gameParty.members(index).makeActions();
- // 激活窗口
- this.startActorCommandSelection();
- } else if (actorTankId[index] > 0) {
- // 加入战车
- var tankId = actorTankId[index];
- $gameParty.addActor(10 + tankId);
- // 替换位置
- $gameParty.swapOrder(index,$gameParty.size() - 1);
- // 角色离开
- $gameParty.removeActor(id);
- BattleManager.selectNextCommand(true, index);
- this.startActorCommandSelection();
- }
- };
- BattleManager.selectNextCommand = function(flag = false,index = 0) {
- do {
- if (!this.actor() || !this.actor().selectNextCommand()) {
- if (flag == true) {
- this._actorIndex--;
- }
- this.changeActor(this._actorIndex + 1, 'waiting');
-
- if (this._actorIndex >= $gameParty.size()) {
- this.startTurn();
- break;
- }
- }
- } while (!this.actor().canInput());
- };
复制代码 |
|