赞 | 7 |
VIP | 358 |
好人卡 | 31 |
积分 | 30 |
经验 | 110750 |
最后登录 | 2023-1-30 |
在线时间 | 3547 小时 |
Lv3.寻梦者 伴侣:北岛谜烟
- 梦石
- 0
- 星屑
- 3042
- 在线时间
- 3547 小时
- 注册时间
- 2012-8-7
- 帖子
- 12181
|
有的脚本也可以达成战斗信息的效果。就是那种文字吧~
我记得可以,不过这是RM的,不是那种奇怪游戏的= =||- #==============================================================================
- # ★RGSS2
- # *STR11b_XP Battle Style #Battle Message v1.2 08/01/26
- # Created by star: http://otsu.cool.ne.jp/strcatyou/
- # Translated by Mr. Bubble
- #
- # ・Battle message appears with transparent background at
- # the upper left of the screen.
- #
- #------------------------------------------------------------------------------
- #==============================================================================
- # ■ Window_BattleMessage
- #==============================================================================
- class Window_BattleMessage < Window_Message
- # Gradient Background [Left, Right]
- TEXT_B_COLOR = [Color.new(0,0,0,160), Color.new(0,0,0,0)]
- INFO = "信息" # String that shows at the upper left of message window
- BTWIDTH = 360 # Message Width
- MOVE = true # Smooth resize of lines
- SPEED = 1 # Resize Speed
- W_OPACITY = 96 # Transparency 1~255
- #
- N_WINDOW = false # Window is not converted transparent
- #--------------------------------------------------------------------------
- # ★ エイリアス
- #--------------------------------------------------------------------------
- alias initialize_str11b initialize
- def initialize
- initialize_str11b
- self.x = 0
- self.y = 0
- self.back_opacity = 0
- self.opacity = 0
- unless N_WINDOW
- @b_sprite = Sprite.new(self.viewport)
- bitmap = Bitmap.new(BTWIDTH, 96 + 16)
- bitmap.gradient_fill_rect(0, 16, BTWIDTH, 96, TEXT_B_COLOR[0], TEXT_B_COLOR[1])
- bitmap.font.shadow = false
- bitmap.font.size = 16
- bitmap.draw_text(2, 2, BTWIDTH, 16, INFO)
- @b_sprite.bitmap = bitmap
- @b_sprite.x = self.x
- @b_sprite.y = self.y
- @b_sprite.src_rect.height = 16
- @b_sprite.opacity = 0
- @str11f = false
- end
- end
- alias dispose_str11b dispose
- def dispose
- dispose_str11b
- unless N_WINDOW
- @b_sprite.bitmap.dispose
- @b_sprite.dispose
- end
- end
- alias update_str11b update
- def update
- update_str11b
-
- unless N_WINDOW
- if self.visible and (@lines.size > 0 and not @str11f) or
- (@text != nil or self.pause or @index > -1)
- @b_sprite.opacity += W_OPACITY
- h = @b_sprite.src_rect.height
- if @text != nil
- @l = 4
- else
- unless self.pause or @index > -1
- @l = @lines.size
- else
- @l = 4
- end
- end
- if MOVE
- if SPEED == 1
- @b_sprite.src_rect.height = 16 + (@l * 24)
- else
- s = (SPEED - 1)
- @b_sprite.src_rect.height = (h + ((16 + (@l * 24)) * s)) / SPEED
- end
- else
- @b_sprite.src_rect.height = 96 + 16
- end
- else
- @b_sprite.opacity -= W_OPACITY
- end
- else
- if self.visible
- self.back_opacity += W_OPACITY
- self.opacity += W_OPACITY
- self.back_opacity = 200 if self.back_opacity > 200
- else
- self.back_opacity -= W_OPACITY
- self.opacity -= W_OPACITY
- end
- end
- end
- end
复制代码 |
|