加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我在class Game_Party
下面有个DEF是用来刷新角色的。
在class Chaochao_Scene_Party
仓库脚本
里面想在执行完存取角色出来后刷新一个class Game_Party里面的那个DEF
class Game_Party
attr_accessor :waiting_actors
def refresh_fbs return if @actors.size == $game_variables[1] # 活动队伍数量增加时 if @actors.size < $game_variables[1] change_size = (@actors.size - $game_variables[1]).abs # 把等待队伍开头的角色塞进活动队伍 for i in 0...change_size if @waiting_actors != [] break if @waiting_actors.size < 1 waiting_leader = @waiting_actors[0] @waiting_actors.delete_at(0) @actors.push(waiting_leader) end end # BFS刷新 $game_temp.friends_need_refresh = true $game_party.friend_party_update # プレイヤーをリフレッシュ $game_player.refresh # ステータスウィンドウをリフレッシュ friend_party_update #当在大地图 if $game_variables[5] != 2 $scene.hud_update $scene.spriteset.dispose $scene.spriteset = Spriteset_Map.new end BFS_Friends.weapon_recheck $scene = Scene_Map.new # 活动中的角色数量减少时 else change_size = (@actors.size - $game_variables[1]).abs for i in 0...change_size break if @actors.size < 2 to_wait_actor = @actors.pop @waiting_actors.insert(0, to_wait_actor) end # FBS刷新 friend_party_update BFS_Friends.delete_all_friends BFS_Friends.prepare_for_transferring $game_player.refresh $scene.spriteset.dispose $scene.spriteset = Spriteset_Map.new $scene.hud_update end end
def refresh_fbs
return if @actors.size == $game_variables[1]
# 活动队伍数量增加时
if @actors.size < $game_variables[1]
change_size = (@actors.size - $game_variables[1]).abs
# 把等待队伍开头的角色塞进活动队伍
for i in 0...change_size
if @waiting_actors != []
break if @waiting_actors.size < 1
waiting_leader = @waiting_actors[0]
@waiting_actors.delete_at(0)
@actors.push(waiting_leader)
end
end
# BFS刷新
$game_temp.friends_need_refresh = true
$game_party.friend_party_update
# プレイヤーをリフレッシュ
$game_player.refresh
# ステータスウィンドウをリフレッシュ
friend_party_update
#当在大地图
if $game_variables[5] != 2
$scene.hud_update
$scene.spriteset.dispose
$scene.spriteset = Spriteset_Map.new
end
BFS_Friends.weapon_recheck
$scene = Scene_Map.new
# 活动中的角色数量减少时
else
change_size = (@actors.size - $game_variables[1]).abs
for i in 0...change_size
break if @actors.size < 2
to_wait_actor = @actors.pop
@waiting_actors.insert(0, to_wait_actor)
end
# FBS刷新
friend_party_update
BFS_Friends.delete_all_friends
BFS_Friends.prepare_for_transferring
$game_player.refresh
$scene.spriteset.dispose
$scene.spriteset = Spriteset_Map.new
$scene.hud_update
end
end
class Chaochao_Scene_Party def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) ########################################################################### BFS_Friends.delete_all_friends BFS_Friends.prepare_for_transferring ############################################################################ #画面切换 $scene = Scene_Map.new return end if @left_window.active update_left return end if @right_window.active update_right return end end
class Chaochao_Scene_Party
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
###########################################################################
BFS_Friends.delete_all_friends
BFS_Friends.prepare_for_transferring
############################################################################
#画面切换
$scene = Scene_Map.new
return
end
if @left_window.active
update_left
return
end
if @right_window.active
update_right
return
end
end
|