| 赞 | 3 |
| VIP | |
| 好人卡 | |
| 积分 | 10 |
| 经验 | |
| 最后登录 | 2026-7-17 |
| 在线时间 | 1391 小时 |
寒
- 梦石
- 0
- 星屑
- 1049
- 在线时间
- 1391 小时
- 注册时间
- 2010-8-9
- 回帖
- 3301
|
发表于 2016-1-22 21:58:38
|
显示全部楼层
[pre lang="ruby"]class Game_Temp
attr_accessor :boss_data
end
Data_BattleData = Struct.new(:hp, :mp, :states, :state_turns)
class Game_Battler < Game_BattlerBase
def save_battle_data(index)
$game_temp.boss_data ||= Hash.new
$game_temp.boss_data[index] = Data_BattleData.new(@hp,@mp,@states.clone,@state_turns.clone)
end
def load_battle_data(index)
data = $game_temp.boss_data
return if (data.nil? || data[index].nil?)
@hp, @mp, @states, @state_turns = *data[index]
end
end[/pre] |
评分
-
查看全部评分
|