- 注册时间
- 2006-5-13
- 最后登录
- 2006-5-28
③业余
- 积分
- 220
|
原地址:http://www.k3.dion.ne.jp/~claimh/

效果: 战斗画面时,若只有一人,则人的位置在中间,而不是在左边.
#==============================================================================
# ■ 戦闘位置調整 by Claimh
#------------------------------------------------------------------------------
# ・戦闘時のバトラーの表示位置を自動的に修正します。
# ・1~4人まで対応。
#==============================================================================
# HPなどのテキスト修正
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● リフレッシュ(再定義)
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors
#------
case $game_party.actors.size
when 1
actor_x = 240
when 2
actor_x = i * 240 + 120 + 4
when 3
actor_x = i * 200 + 40 + 4
when 4
actor_x = i * 160 + 4
end
#------
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
end
# バトルコマンド
class Scene_Battle
#--------------------------------------------------------------------------
# ● アクターコマンドウィンドウのセットアップ
#--------------------------------------------------------------------------
alias phase3_setup_command_window_cc phase3_setup_command_window
def phase3_setup_command_window
phase3_setup_command_window_cc
case $game_party.actors.size
when 1
actor_x = 240
when 2
actor_x = @actor_index * 240 + 120
when 3
actor_x = @actor_index * 200 + 40
when 4
actor_x = @actor_index * 160
end
# アクターコマンドウィンドウの位置を設定
@actor_command_window.x = actor_x
end
end
# バトラー
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● バトル画面 X 座標の取得
#--------------------------------------------------------------------------
alias screen_x_cc screen_x
def screen_x
# パーティ内の並び順から X 座標を計算して返す
if self.index != nil
case $game_party.actors.size
when 1
actor_x = 320
when 2
actor_x = self.index * 240 + 200
when 3
actor_x = self.index * 200 + 120
when 4
actor_x = screen_x_cc # 原物
end
return actor_x
else
return 0
end
end
end |
|