赞 | 40 |
VIP | 559 |
好人卡 | 234 |
积分 | 47 |
经验 | 251834 |
最后登录 | 2024-12-30 |
在线时间 | 5241 小时 |
Lv3.寻梦者 (版主) 八宝粥的基叔
- 梦石
- 0
- 星屑
- 4714
- 在线时间
- 5241 小时
- 注册时间
- 2009-4-29
- 帖子
- 14318
|
Game_Troop类下面有一个def setup(troop_id):- #--------------------------------------------------------------------------
- # ● 设置
- # troop_id : 敌方队伍 ID
- #--------------------------------------------------------------------------
- def setup(troop_id)
- clear
- @troop_id = troop_id
- @enemies = []
- for member in troop.members
- next if $data_enemies[member.enemy_id] == nil
- enemy = Game_Enemy.new(@enemies.size, member.enemy_id)
- enemy.hidden = member.hidden
- enemy.immortal = member.immortal
- enemy.screen_x = member.x
- enemy.screen_y = member.y
- @enemies.push(enemy)
- end
- make_unique_names
- end
复制代码 改成:- #--------------------------------------------------------------------------
- # ● 设置
- # troop_id : 敌方队伍 ID
- # enemy_id : 敌人 ID
- #--------------------------------------------------------------------------
- def setup(troop_id, enemy_id = 0)
- clear
- @troop_id = troop_id
- # 生成敌方队伍
- @troop = setup_troop(enemy_id)
- # 新坐标重排
- setup_coordinate_x
- @enemies = []
- a = 1
- for member in troop.members
- next if $data_enemies[member.enemy_id] == nil
- enemy = Game_Enemy.new(@enemies.size, member.enemy_id)
- enemy.hidden = member.hidden
- enemy.immortal = member.immortal
- case a
- when 1
- enemy.screen_x = 300#member.x
- enemy.screen_y = 150#member.y
- when 2
- enemy.screen_x = 300
- enemy.screen_y = 250
- when 3
- enemy.screen_x = 300
- enemy.screen_y = 350
- when 4
- enemy.screen_x = 300
- enemy.screen_y = 450
- when 5
- enemy.screen_x = 300
- enemy.screen_y = 550
- when 6
- enemy.screen_x = 150
- enemy.screen_y = 150
- when 7
- enemy.screen_x = 150
- enemy.screen_y = 250
- when 8
- enemy.screen_x = 150
- enemy.screen_y = 350
- when 9
- enemy.screen_x = 150
- enemy.screen_y = 450
- when 10
- enemy.screen_x = 150
- enemy.screen_y = 550
- end
- a += 1
- @enemies.push(enemy)
- end
- #for i in 0...troop.members.size
- # @enemies[i].screen_x = @coordinate_x[i]
- #end
- make_unique_names
- end
- end
复制代码 具体x、y坐标自己改了,我只是举例子。when 1代表1号敌人……when 10代表10号敌人。如果你最多只有8个敌人,就去掉when 9和when 10。
|
|