Scene_Name

Publié le par chindan

#============================================
# ¡ Scene_Name
#----------------------------------------------
# @–¼‘O“ü—͉æ–ʂ̏ˆ—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B
#============================================

class Scene_Name
#------------------------------------------
# œ ƒƒCƒ“ˆ—
#------------------------------------------
def main
# ƒAƒNƒ^[‚ðŽæ“¾
@actor = $game_actors[$game_temp.name_actor_id]
# ƒEƒBƒ“ƒhƒE‚ðì¬
@edit_window = Window_NameEdit.new(@actor, $game_temp.name_max_char)
@input_window = Window_NameInput.new
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs
Graphics.transition
# ƒƒCƒ“ƒ‹[ƒv
loop do
# ƒQ[ƒ€‰æ–Ê‚ðXV
Graphics.update
# “ü—͏î•ñ‚ðXV
Input.update
# ƒtƒŒ[ƒ€XV
update
# ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f
if $scene != self
break
end
end
# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ
Graphics.freeze
# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú
@edit_window.dispose
@input_window.dispose
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#------------------------------------------
def update
# ƒEƒBƒ“ƒhƒE‚ðXV
@edit_window.update
@input_window.update
# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.repeat?(Input::B)
# ƒJ[ƒƒ‹ˆÊ’u‚ª 0 ‚̏ꍇ
if @edit_window.index == 0
return
end
# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t
$game_system.se_play($data_system.cancel_se)
# •¶Žš‚ðíœ
@edit_window.back
return
end
# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡
if Input.trigger?(Input::C)
# ƒJ[ƒƒ‹ˆÊ’u‚ª [Œˆ’è] ‚̏ꍇ
if @input_window.character == nil
# –¼‘O‚ª‹ó‚̏ꍇ
if @edit_window.name == ""
# ƒfƒtƒHƒ‹ƒg‚Ì–¼‘O‚É–ß‚·
@edit_window.restore_default
# –¼‘O‚ª‹ó‚̏ꍇ
if @edit_window.name == ""
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
return
end
# ƒAƒNƒ^[‚Ì–¼‘O‚ð•ύX
@actor.name = @edit_window.name
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# ƒ}ƒbƒv‰æ–ʂɐ؂è‘Ö‚¦
$scene = Scene_Map.new
return
end
# ƒJ[ƒƒ‹ˆÊ’u‚ªÅ‘å‚̏ꍇ
if @edit_window.index == $game_temp.name_max_char
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# •¶Žš‚ª‹ó‚̏ꍇ
if @input_window.character == ""
# ƒuƒU[ SE ‚ð‰‰‘t
$game_system.se_play($data_system.buzzer_se)
return
end
# Œˆ’è SE ‚ð‰‰‘t
$game_system.se_play($data_system.decision_se)
# •¶Žš‚ð’ljÁ
@edit_window.add(@input_window.character)
return
end
end
end
Publicité

Publié dans poubelle

Pour être informé des derniers articles, inscrivez vous :
Commenter cet article