~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


Sprite_Picture ::: posté le 2006-02-16 @ 09:41:00
Auteur: Yukihiro matsumoto

#============================================
# ¡ Sprite_Picture
#----------------------------------------------
# @ƒsƒNƒ`ƒƒ•ަ—p‚̃Xƒvƒ‰ƒCƒg‚Å‚·BGame_Picture ƒNƒ‰ƒX‚̃Cƒ“ƒXƒ^ƒ“ƒX‚ðŠÄŽ‹‚µA
# ƒXƒvƒ‰ƒCƒg‚Ìó‘Ô‚ðŽ©“®“I‚ɕω»‚³‚¹‚Ü‚·B
#============================================

class Sprite_Picture < Sprite
#------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
# viewport : ƒrƒ…[ƒ|[ƒg
# picture : ƒsƒNƒ`ƒƒ (Game_Picture)
#------------------------------------------
def initialize(viewport, picture)
super(viewport)
@picture = picture
update
end
#------------------------------------------
# œ ‰ð•ú
#------------------------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#------------------------------------------
# œ ƒtƒŒ[ƒ€XV
#------------------------------------------
def update
super
# ƒsƒNƒ`ƒƒ‚̃tƒ@ƒCƒ‹–¼‚ªŒ»Ý‚Ì‚à‚̂ƈقȂéê‡
if @picture_name != @picture.name
# ƒtƒ@ƒCƒ‹–¼‚ðƒCƒ“ƒXƒ^ƒ“ƒX•Ï”‚É‹L‰¯
@picture_name = @picture.name
# ƒtƒ@ƒCƒ‹–¼‚ª‹ó‚łȂ¢ê‡
if @picture_name != ""
# ƒsƒNƒ`ƒƒƒOƒ‰ƒtƒBƒbƒN‚ðŽæ“¾
self.bitmap = RPG::Cache.picture(@picture_name)
end
end
# ƒtƒ@ƒCƒ‹–¼‚ª‹ó‚Ìê‡
if @picture_name == ""
# ƒXƒvƒ‰ƒCƒg‚ð•s‰ÂŽ‹‚ÉÝ’è
self.visible = false
return
end
# ƒXƒvƒ‰ƒCƒg‚ð‰ÂŽ‹‚ÉÝ’è
self.visible = true
# “]‘—Œ³Œ´“_‚ðÝ’è
if @picture.origin == 0
self.ox = 0
self.oy = 0
else
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
end
# ƒXƒvƒ‰ƒCƒg‚ÌÀ•W‚ðÝ’è
self.x = @picture.x
self.y = @picture.y
self.z = @picture.number
# Šg‘å—¦A•s“§–¾“xAƒuƒŒƒ“ƒh•û–@‚ðÝ’è
self.zoom_x = @picture.zoom_x / 100.0
self.zoom_y = @picture.zoom_y / 100.0
self.opacity = @picture.opacity
self.blend_type = @picture.blend_type
# ‰ñ“]Šp“xAF’²‚ðÝ’è
self.angle = @picture.angle
self.tone = @picture.tone
end
end
Design By RaZ © Watery Build 2005