~Site
Accueil
Forum
Admin

~Base de scripts
Scripts de base
Scripts Menu
Scripts Combat
Scripts Systθme
Scripts Modifiιs

Scripts de Base
Game_Temp
Game_System
Game_Switches
Game_Variables
Game_SelfSwitches
Game_Screen
Game_Picture
Game_Battler 1
Game_Battler 2
Game_Battler 3
Game_BattleAction
Game_Actor
Game_Enemy
Game_Actors
Game_Party
Game_Troop
Game_Map
Game_CommonEvent
Game_Character 1
Game_Character 2
Game_Character 3
Game_Event
Game_Player
Sprite_Character
Sprite_Battler
Sprite_Picture
Sprite_Timer
Spriteset_Map
Spriteset_Battle
Window_Base
Window_Selectable
Window_Command
Window_Help
Window_Gold
Window_PlayTime
Window_Steps
Window_MenuStatus
Window_Item
Window_Skill
Window_SkillStatus
Window_Target
Window_EquipLeft
Window_EquipRight
Window_EquipItem
Window_Status
Window_SaveFile
Window_ShopCommand
Window_ShopBuy
Window_ShopSell
Window_ShopNumber
Window_ShopStatus
Window_NameEdit
Window_NameInput
Window_InputNumber
Window_Message
Window_PartyCommand
Window_BattleStatus
Window_BattleResult
Window_DebugLeft
Window_DebugRight
Window_Dataset
Arrow_Base
Arrow_Enemy
Arrow_Actor
Interpreter 1
Interpreter 2
Interpreter 3
Interpreter 4
Interpreter 5
Interpreter 6
Interpreter 7
Scene_Title
Scene_Map
Scene_Menu
Scene_Item
Scene_Skill
Scene_Equip
Scene_Status
Scene_File
Scene_Save
Scene_Load
Scene_End
Scene_Battle 1
Scene_Battle 2
Scene_Battle 3
Scene_Battle 4
Scene_Shop
Scene_Name
Scene_Gameover
Scene_Debug
Main


Game_Screen ::: postι le 2006-02-15 @ 22:24:00
Auteur: Yukihiro matsumoto

#============================================
# ‘ Game_Screen
#--------------------------------------------
# @F’²•ύX‚βƒtƒ‰ƒbƒVƒ…‚ȂǁA‰ζ–Κ‘S‘Μ‚ΙŠΦŒW‚·‚ιˆ—‚Μƒf[ƒ^‚π•ΫŽ‚·‚ιƒNƒ‰ƒX‚Ε
# ‚·B‚±‚ΜƒNƒ‰ƒX‚ΜƒCƒ“ƒXƒ^ƒ“ƒX‚Ν $game_screen ‚ΕŽQΖ‚³‚κ‚ά‚·B
#============================================

class Game_Screen
#------------------------------------------
# œ ŒφŠJƒCƒ“ƒXƒ^ƒ“ƒX•ϐ”
#------------------------------------------
attr_reader :tone # F’²
attr_reader :flash_color # ƒtƒ‰ƒbƒVƒ…F
attr_reader :shake # ƒVƒFƒCƒNˆΚ’u
attr_reader :pictures # ƒsƒNƒ`ƒƒ
attr_reader :weather_type # “VŒσ ƒ^ƒCƒv
attr_reader :weather_max # “VŒσ ‰ζ‘œ‚̍ő吔
#------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šϊ‰»
#------------------------------------------
def initialize
@tone = Tone.new(0, 0, 0, 0)
@tone_target = Tone.new(0, 0, 0, 0)
@tone_duration = 0
@flash_color = Color.new(0, 0, 0, 0)
@flash_duration = 0
@shake_power = 0
@shake_speed = 0
@shake_duration = 0
@shake_direction = 1
@shake = 0
@pictures = [nil]
for i in 1..100
@pictures.push(Game_Picture.new(i))
end
@weather_type = 0
@weather_max = 0.0
@weather_type_target = 0
@weather_max_target = 0.0
@weather_duration = 0
end
#------------------------------------------
# œ F’²•ύX‚ΜŠJŽn
# tone : F’²
# duration : ŽžŠΤ
#------------------------------------------
def start_tone_change(tone, duration)
@tone_target = tone.clone
@tone_duration = duration
if @tone_duration == 0
@tone = @tone_target.clone
end
end
#------------------------------------------
# œ ƒtƒ‰ƒbƒVƒ…‚ΜŠJŽn
# color : F
# duration : ŽžŠΤ
#------------------------------------------
def start_flash(color, duration)
@flash_color = color.clone
@flash_duration = duration
end
#------------------------------------------
# œ ƒVƒFƒCƒN‚ΜŠJŽn
# power : ‹­‚³
# speed : ‘¬‚³
# duration : ŽžŠΤ
#------------------------------------------
def start_shake(power, speed, duration)
@shake_power = power
@shake_speed = speed
@shake_duration = duration
end
#------------------------------------------
# œ “VŒσ‚̐ݒθ
# type : ƒ^ƒCƒv
# power : ‹­‚³
# duration : ŽžŠΤ
#------------------------------------------
def weather(type, power, duration)
@weather_type_target = type
if @weather_type_target != 0
@weather_type = @weather_type_target
end
if @weather_type_target == 0
@weather_max_target = 0.0
else
@weather_max_target = (power + 1) * 4.0
end
@weather_duration = duration
if @weather_duration == 0
@weather_type = @weather_type_target
@weather_max = @weather_max_target
end
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#------------------------------------------
def update
if @tone_duration >= 1
d = @tone_duration
@tone.red = (@tone.red * (d - 1) + @tone_target.red) / d
@tone.green = (@tone.green * (d - 1) + @tone_target.green) / d
@tone.blue = (@tone.blue * (d - 1) + @tone_target.blue) / d
@tone.gray = (@tone.gray * (d - 1) + @tone_target.gray) / d
@tone_duration -= 1
end
if @flash_duration >= 1
d = @flash_duration
@flash_color.alpha = @flash_color.alpha * (d - 1) / d
@flash_duration -= 1
end
if @shake_duration >= 1 or @shake != 0
delta = (@shake_power * @shake_speed * @shake_direction) / 10.0
if @shake_duration <= 1 and @shake * (@shake + delta) < 0
@shake = 0
else
@shake += delta
end
if @shake > @shake_power * 2
@shake_direction = -1
end
if @shake < - @shake_power * 2
@shake_direction = 1
end
if @shake_duration >= 1
@shake_duration -= 1
end
end
if @weather_duration >= 1
d = @weather_duration
@weather_max = (@weather_max * (d - 1) + @weather_max_target) / d
@weather_duration -= 1
if @weather_duration == 0
@weather_type = @weather_type_target
end
end
if $game_temp.in_battle
for i in 51..100
@pictures[i].update
end
else
for i in 1..50
@pictures[i].update
end
end
end
end
Design By RaZ © Watery Build 2005