赞 | 0 |
VIP | 1 |
好人卡 | 12 |
积分 | 1 |
经验 | 5413 |
最后登录 | 2022-9-19 |
在线时间 | 187 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 70
- 在线时间
- 187 小时
- 注册时间
- 2006-9-3
- 帖子
- 175
|
- # HP/SP/ゲージアニメーション表示スクリプト Ver 1.04
- # 配布元・サポートURL
- # http://members.jcom.home.ne.jp/cogwheel/
- #==============================================================================
- # ■ Game_Actor
- #------------------------------------------------------------------------------
- # アクターを扱うクラスです。このクラスは Game_Actors クラス ($game_actors)
- # の内部で使用され、Game_Party クラス ($game_party) からも参照されます。
- #==============================================================================
- class Game_Actor < Game_Battler
- def now_exp
- return @exp - @exp_list[@level]
- end
- def next_exp
- return (@exp_list[@level+1] > 0 ?
- @exp_list[@level+1] - @exp_list[@level] : 0)
- end
- end
- #==============================================================================
- # ■ Window_Base
- #------------------------------------------------------------------------------
- # ゲーム中のすべてのウィンドウのスーパークラスです。
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # x : ウィンドウの X 座標
- # y : ウィンドウの Y 座標
- # width : ウィンドウの幅
- # height : ウィンドウの高さ
- #--------------------------------------------------------------------------
- alias :initialize_gauge :initialize
- def initialize(x, y, width, height)
- initialize_gauge(x, y, width, height)
- # HP, SP ゲージの初期化
- @hp_gauge = {}
- @sp_gauge = {}
- end
- #--------------------------------------------------------------------------
- # ● 解放
- #--------------------------------------------------------------------------
- alias :dispose_gauge :dispose
- def dispose
- # ゲージの削除
- gauge_delete
- # オリジナルの解放処理
- dispose_gauge
- end
- #--------------------------------------------------------------------------
- # ● ゲージの初期化
- #--------------------------------------------------------------------------
- def gauge_delete
- # HP ゲージの消去
- for gauge in @hp_gauge.values
- gauge[0].bitmap.dispose
- gauge[0].dispose
- end
- # SP ゲージの更新
- for gauge in @sp_gauge.values
- gauge[0].bitmap.dispose
- gauge[0].dispose
- end
- @hp_gauge = {}
- @sp_gauge = {}
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- alias :update_gauge :update
- def update
- update_gauge
- # HP ゲージの更新
- for gauge in @hp_gauge.values
- gauge_refresh(gauge, 0)
- end
- # SP ゲージの更新
- for gauge in @sp_gauge.values
- gauge_refresh(gauge, 1)
- end
- end
- #--------------------------------------------------------------------------
- # ● HP ゲージの描画
- #--------------------------------------------------------------------------
- # オリジナルのHP描画を draw_actor_hp_hpsp と名前変更
- alias :draw_actor_hp_hpsp :draw_actor_hp
- def draw_actor_hp(actor, x, y, width = 144)
- #==========================================================
- # 描绘字符串 "HP"
- self.contents.font.color = system_color
- self.contents.draw_text(x, y + 35, 32, 32, $data_system.words.hp)
- # 计算描绘 MaxHP 所需的空间
- if width - 32 >= 108
- hp_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- hp_x = x + width - 48
- flag = false
- end
- # 描绘 HP
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- self.contents.draw_text(hp_x, y + 35, 48, 32, actor.hp.to_s, 2)
- # 描绘 MaxHP
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(hp_x + 48, y + 35, 12, 32, "/", 1)
- self.contents.draw_text(hp_x + 60, y + 35, 48, 32, actor.maxhp.to_s)
- end
- #===========================================================================
- # 初描画の場合
- if @hp_gauge[actor] == nil
- # ゲージ高
- height = 10
- # 色設定。color1:外枠,color2:中枠
- # color3:空ゲージダークカラー,color4:空ゲージライトカラー
- color1 = Color.new(0, 0, 0, 192)
- color2 = Color.new(255, 255, 192, 192)
- color3 = Color.new(64, 0, 0, 192)
- color4 = Color.new(0, 0, 0, 192)
- # 空ゲージの描画
- @hp_frame = gauge_rect(width, height, color1, color2, color3, color4)
- sprite = Sprite.new(self.viewport)
- sprite.bitmap = Bitmap.new(width, height)
- sprite.x = self.x + x + 16
- sprite.y = self.y + y + 42 - height
- sprite.z = self.z + 1
- count = rand(400)
- # 変数rateに 現在のHP/MHPを代入
- if actor.maxhp != 0
- rate = ((width - 4) * actor.hp.to_f / actor.maxhp).ceil
- else
- rate = width - 4
- end
- # 位置等情報の記憶
- @hp_gauge[actor] = [sprite, actor, rate, count, x, y - height + 35]
- # ゲージ描画
- gauge_refresh(@hp_gauge[actor], 0)
- # ターゲットウィンドウの場合、初期状態は非表示
- @hp_gauge[actor][0].visible = false if self.is_a?(Window_Target)
- end
- # 変数rateに 現在のHP/MHPを代入
- if actor.maxhp != 0
- rate = ((width - 4) * actor.hp.to_f / actor.maxhp).ceil
- else
- rate = width - 4
- end
- @hp_gauge[actor][2] = rate
- # オリジナルのHP描画処理を呼び出し
- draw_actor_hp_hpsp(actor, x, y, width)
- end
- #--------------------------------------------------------------------------
- # ● SP ゲージの描画
- #--------------------------------------------------------------------------
- # オリジナルのSP描画を draw_actor_sp_hpsp と名前変更
- alias :draw_actor_sp_hpsp :draw_actor_sp
- def draw_actor_sp(actor, x, y, width = 144)
- #----------------------------------------------------------------------
- # 描绘字符串 "SP"
- self.contents.font.color = system_color
- self.contents.draw_text(x, y + 35, 32, 32, $data_system.words.sp)
- # 计算描绘 MaxSP 所需的空间
- if width - 32 >= 108
- sp_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- sp_x = x + width - 48
- flag = false
- end
- # 描绘 SP
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- self.contents.draw_text(sp_x, y + 35, 48, 32, actor.sp.to_s, 2)
- # 描绘 MaxSP
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(sp_x + 48, y + 35, 12, 32, "/", 1)
- self.contents.draw_text(sp_x + 60, y + 35, 48, 32, actor.maxsp.to_s)
- end
- #-----------------------------------------------------------------------
- # 初描画の場合
- if @sp_gauge[actor] == nil
- # ゲージ高
- height = 10
- # 色設定。color1:外枠,color2:中枠
- # color3:空ゲージダークカラー,color4:空ゲージライトカラー
- color1 = Color.new(0, 0, 0, 192)
- color2 = Color.new(255, 255, 192, 192)
- color3 = Color.new(0, 64, 64, 192)
- color4 = Color.new(0, 0, 0, 192)
- # 空ゲージの描画
- @sp_frame = gauge_rect(width, height, color1, color2, color3, color4)
- sprite = Sprite.new(self.viewport)
- sprite.bitmap = Bitmap.new(width, height)
- sprite.x = self.x + x + 16
- sprite.y = self.y + y + 42 - height
- sprite.z = self.z + 1
- count = rand(400)
- # 変数rateに 現在のHP/MHPを代入
- if actor.maxsp != 0
- rate = ((width - 4) * actor.sp.to_f / actor.maxsp).ceil
- else
- rate = width - 4
- end
- # 位置等情報の記憶
- @sp_gauge[actor] = [sprite, actor, rate, count, x, y - height + 35]
- # ゲージ描画
- gauge_refresh(@sp_gauge[actor], 1)
- # ターゲットウィンドウの場合、初期状態は非表示
- @sp_gauge[actor][0].visible = false if self.is_a?(Window_Target)
- end
- # 変数rateに 現在のHP/MHPを代入
- if actor.maxsp != 0
- rate = ((width - 4) * actor.sp.to_f / actor.maxsp).ceil
- else
- rate = width - 4
- end
- @sp_gauge[actor][2] = rate
- # オリジナルのHP描画処理を呼び出し
- draw_actor_sp_hpsp(actor, x, y, width)
- end
- #--------------------------------------------------------------------------
- # ● 空ゲージの描画
- #--------------------------------------------------------------------------
- def gauge_rect(width, height, color1, color2, color3, color4)
- bitmap = Bitmap.new(width, height)
- # 枠描画
- bitmap.fill_rect(0, 0, width, height, color1)
- bitmap.fill_rect(1, 1, width - 2, height - 2, color2)
- # 空ゲージの描画
- bitmap.gradation_rect(2, 2, width-4, height-4, color3, color4, 1)
- return bitmap
- end
- #--------------------------------------------------------------------------
- # ● 実ゲージの更新
- #--------------------------------------------------------------------------
- def gauge_refresh(gauge, type)
- # タイプにより分岐
- case type
- when 0 # HPゲージの場合
- graphic = RPG::Cache.system("Gauge_HP")
- rate = gauge[2] * 100 / (gauge[0].bitmap.width - 4)
- point = (rate < 50 ? 8 : 0) + (rate < 25 ? 8 : 0)
- frame = @hp_frame
- when 1 # SPゲージの場合
- graphic = RPG::Cache.system("Gauge_SP")
- rate = gauge[2] * 100 / (gauge[0].bitmap.width - 4)
- point = (rate < 50 ? 8 : 0) + (rate < 25 ? 8 : 0)
- frame = @sp_frame
- end
- # カウントの更新
- gauge[3] = (gauge[3] - 2) % 400
- # 空ゲージのの描画
- gauge[0].bitmap.fill_rect(0, 0, gauge[0].bitmap.width,
- gauge[0].bitmap.height, Color.new(0, 0, 0, 0))
- gauge[0].bitmap.blt(0, 0, frame, frame.rect)
- # ゲージの中身を描画可能な場合
- if gauge[2] > 0
- # 実ゲージの描画
- gauge[0].bitmap.blt(2, 2, graphic,
- Rect.new(gauge[3], point, gauge[2], gauge[0].bitmap.height - 4), 192)
- gauge[0].bitmap.fill_rect(3, 3, gauge[2] - 2,
- gauge[0].bitmap.height - 6,Color.new(0, 0, 0, 0))
- gauge[0].bitmap.blt(3, 3, graphic,
- Rect.new(gauge[3]+1,point+1,gauge[2]-2,gauge[0].bitmap.height- 6), 128)
- end
- # ゲージ座標の更新
- gauge[0].x = [self.x - self.ox + gauge[4] + 16, self.x + 16].max
- gauge[0].y = [self.y - self.oy + gauge[5] + 42, self.y + 16].max
- gauge[0].src_rect = Rect.new([self.ox - gauge[4], 0].max,
- [self.oy - gauge[5] - 26, 0].max,
- [self.ox + self.width - gauge[4] - 32, gauge[0].bitmap.width].min,
- [self.oy + self.height - gauge[5] - 32, gauge[0].bitmap.height].min)
- gauge[0].visible = self.visible
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ X 座標の更新
- #--------------------------------------------------------------------------
- def x=(new_x)
- super(new_x)
- if @hp_gauge != nil
- # HP ゲージの更新
- for gauge in @hp_gauge.values + @sp_gauge.values
- gauge[0].x = self.x + gauge[4] + 16
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ Y 座標の更新
- #--------------------------------------------------------------------------
- def y=(new_y)
- super(new_y)
- if @hp_gauge != nil
- # HP ゲージの更新
- for gauge in @hp_gauge.values + @sp_gauge.values
- gauge[0].y = self.y + gauge[5] + 42
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● ウィンドウ Z 座標の更新
- #--------------------------------------------------------------------------
- def z=(new_z)
- super(new_z)
- if @hp_gauge != nil
- # HP ゲージの更新
- for gauge in @hp_gauge.values + @sp_gauge.values
- gauge[0].z = self.z + 1
- end
- end
- end
- end
- #==============================================================================
- # ■ Window_Help
- #------------------------------------------------------------------------------
- # スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
- #==============================================================================
- class Window_Help < Window_Base
- #--------------------------------------------------------------------------
- # ● テキスト設定
- # text : ウィンドウに表示する文字列
- # align : アラインメント (0..左揃え、1..中央揃え、2..右揃え)
- #--------------------------------------------------------------------------
- alias :gauge_set_text :set_text
- def set_text(text, align = 0)
- # テキストとアラインメントの少なくとも一方が前回と違っている場合
- if text != @text or align != @align
- # ゲージの削除
- gauge_delete
- # オリジナルの処理
- gauge_set_text(text, align)
- end
- self.visible = true
- end
- #--------------------------------------------------------------------------
- # ● アクター設定
- # actor : ステータスを表示するアクター
- #--------------------------------------------------------------------------
- alias :gauge_set_actor :set_actor
- def set_actor(actor)
- if actor != @actor
- # ゲージの削除
- gauge_delete
- # オリジナルの処理
- gauge_set_actor(actor)
- end
- end
- #--------------------------------------------------------------------------
- # ● エネミー設定
- # enemy : 名前とステートを表示するエネミー
- #--------------------------------------------------------------------------
- alias :gauge_set_enemy :set_enemy
- def set_enemy(enemy)
- # ゲージの削除
- gauge_delete
- # オリジナルの処理
- gauge_set_enemy(enemy)
- end
- end
- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # バトル画面でパーティメンバーのステータスを表示するウィンドウです。
- #==============================================================================
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- alias :initialize_btgauge :initialize
- def initialize
- initialize_btgauge
- self.z += 10
- end
- end
- #==============================================================================
- # ■ Spriteset_Battle
- #------------------------------------------------------------------------------
- # バトル画面のスプライトをまとめたクラスです。このクラスは Scene_Battle クラ
- # スの内部で使用されます。
- #==============================================================================
- class Spriteset_Battle
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- # ビューポートを作成
- @viewport1 = Viewport.new(0, 0, 640, 320)
- @viewport2 = Viewport.new(0, 0, 640, 480)
- @viewport3 = Viewport.new(0, 0, 640, 480)
- @viewport4 = Viewport.new(0, 0, 640, 480)
- @viewport5 = Viewport.new(0, 0, 640, 480)
- @viewport2.z = 120
- @viewport3.z = 200
- @viewport4.z = 5000
- @viewport5.z = 110
- # バトルバックスプライトを作成
- @battleback_sprite = Sprite.new(@viewport1)
- # エネミースプライトを作成
- @enemy_sprites = []
- for enemy in $game_troop.enemies.reverse
- @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
- end
- # アクタースプライトを作成
- @actor_sprites = []
- @actor_sprites.push(Sprite_Battler.new(@viewport5))
- @actor_sprites.push(Sprite_Battler.new(@viewport5))
- @actor_sprites.push(Sprite_Battler.new(@viewport5))
- @actor_sprites.push(Sprite_Battler.new(@viewport5))
- # 天候を作成
- @weather = RPG::Weather.new(@viewport1)
- # ピクチャスプライトを作成
- @picture_sprites = []
- for i in 51..100
- @picture_sprites.push(Sprite_Picture.new(@viewport3,
- $game_screen.pictures[i]))
- end
- # タイマースプライトを作成
- @timer_sprite = Sprite_Timer.new
- # フレーム更新
- update
- end
- end
- #==============================================================================
- # ■ Bitmap
- #------------------------------------------------------------------------------
- # Bitmapクラスに新たな機能を追加します。
- #==============================================================================
- class Bitmap
- #--------------------------------------------------------------------------
- # ● 矩形をグラデーション表示
- # color1 : スタートカラー
- # color2 : エンドカラー
- # align : 0:横にグラデーション
- # 1:縦にグラデーション
- # 2:斜めにグラデーション(激重につき注意)
- #--------------------------------------------------------------------------
- def gradation_rect(x, y, width, height, color1, color2, align = 0)
- if align == 0
- for i in x...x + width
- red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
- green = color1.green +
- (color2.green - color1.green) * (i - x) / (width - 1)
- blue = color1.blue +
- (color2.blue - color1.blue) * (i - x) / (width - 1)
- alpha = color1.alpha +
- (color2.alpha - color1.alpha) * (i - x) / (width - 1)
- color = Color.new(red, green, blue, alpha)
- fill_rect(i, y, 1, height, color)
- end
- elsif align == 1
- for i in y...y + height
- red = color1.red +
- (color2.red - color1.red) * (i - y) / (height - 1)
- green = color1.green +
- (color2.green - color1.green) * (i - y) / (height - 1)
- blue = color1.blue +
- (color2.blue - color1.blue) * (i - y) / (height - 1)
- alpha = color1.alpha +
- (color2.alpha - color1.alpha) * (i - y) / (height - 1)
- color = Color.new(red, green, blue, alpha)
- fill_rect(x, i, width, 1, color)
- end
- elsif align == 2
- for i in x...x + width
- for j in y...y + height
- red = color1.red + (color2.red - color1.red) *
- ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- green = color1.green + (color2.green - color1.green) *
- ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- blue = color1.blue + (color2.blue - color1.blue) *
- ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- alpha = color1.alpha + (color2.alpha - color1.alpha) *
- ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- color = Color.new(red, green, blue, alpha)
- set_pixel(i, j, color)
- end
- end
- elsif align == 3
- for i in x...x + width
- for j in y...y + height
- red = color1.red + (color2.red - color1.red) *
- ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- green = color1.green + (color2.green - color1.green) *
- ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- blue = color1.blue + (color2.blue - color1.blue) *
- ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- alpha = color1.alpha + (color2.alpha - color1.alpha) *
- ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
- color = Color.new(red, green, blue, alpha)
- set_pixel(i, j, color)
- end
- end
- end
- end
- end
- #==============================================================================
- # ■ Spriteモジュール
- #------------------------------------------------------------------------------
- # アニメーションの管理を行うモジュールです。
- #==============================================================================
- module RPG
- class Sprite < ::Sprite
- def damage(value, critical)
- dispose_damage
- if value.is_a?(Numeric)
- damage_string = value.abs.to_s
- else
- damage_string = value.to_s
- end
- bitmap = Bitmap.new(160, 48)
- bitmap.font.name = "Arial Black"
- bitmap.font.size = 32
- bitmap.font.color.set(0, 0, 0)
- bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
- bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
- bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
- bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
- if value.is_a?(Numeric) and value < 0
- bitmap.font.color.set(176, 255, 144)
- else
- bitmap.font.color.set(255, 255, 255)
- end
- bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
- if critical
- bitmap.font.size = 20
- bitmap.font.color.set(0, 0, 0)
- bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1)
- bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1)
- bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1)
- bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1)
- bitmap.font.color.set(255, 255, 255)
- bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1)
- end
- @_damage_sprite = ::Sprite.new
- @_damage_sprite.bitmap = bitmap
- @_damage_sprite.ox = 80 + self.viewport.ox
- @_damage_sprite.oy = 20 + self.viewport.oy
- @_damage_sprite.x = self.x + self.viewport.rect.x
- @_damage_sprite.y = self.y - self.oy / 2 + self.viewport.rect.y
- @_damage_sprite.z = 3000
- @_damage_duration = 40
- end
- def animation(animation, hit)
- dispose_animation
- @_animation = animation
- return if @_animation == nil
- @_animation_hit = hit
- @_animation_duration = @_animation.frame_max
- animation_name = @_animation.animation_name
- animation_hue = @_animation.animation_hue
- bitmap = RPG::Cache.animation(animation_name, animation_hue)
- if @@_reference_count.include?(bitmap)
- @@_reference_count[bitmap] += 1
- else
- @@_reference_count[bitmap] = 1
- end
- @_animation_sprites = []
- if @_animation.position != 3 or not @@_animations.include?(animation)
- for i in 0..15
- sprite = ::Sprite.new
- sprite.bitmap = bitmap
- sprite.visible = false
- @_animation_sprites.push(sprite)
- end
- unless @@_animations.include?(animation)
- @@_animations.push(animation)
- end
- end
- update_animation
- end
- def loop_animation(animation)
- return if animation == @_loop_animation
- dispose_loop_animation
- @_loop_animation = animation
- return if @_loop_animation == nil
- @_loop_animation_index = 0
- animation_name = @_loop_animation.animation_name
- animation_hue = @_loop_animation.animation_hue
- bitmap = RPG::Cache.animation(animation_name, animation_hue)
- if @@_reference_count.include?(bitmap)
- @@_reference_count[bitmap] += 1
- else
- @@_reference_count[bitmap] = 1
- end
- @_loop_animation_sprites = []
- for i in 0..15
- sprite = ::Sprite.new
- sprite.bitmap = bitmap
- sprite.visible = false
- @_loop_animation_sprites.push(sprite)
- end
- update_loop_animation
- end
- def animation_set_sprites(sprites, cell_data, position)
- for i in 0..15
- sprite = sprites[i]
- pattern = cell_data[i, 0]
- if sprite == nil or pattern == nil or pattern == -1
- sprite.visible = false if sprite != nil
- next
- end
- sprite.visible = true
- sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
- if position == 3
- if self.viewport != nil
- sprite.x = self.viewport.rect.width / 2
- sprite.y = self.viewport.rect.height - 160
- else
- sprite.x = 320
- sprite.y = 240
- end
- else
- sprite.x = self.x + self.viewport.rect.x -
- self.ox + self.src_rect.width / 2
- sprite.y = self.y + self.viewport.rect.y -
- self.oy + self.src_rect.height / 2
- sprite.y -= self.src_rect.height / 4 if position == 0
- sprite.y += self.src_rect.height / 4 if position == 2
- end
- sprite.x += cell_data[i, 1]
- sprite.y += cell_data[i, 2]
- sprite.z = 2000
- sprite.ox = 96
- sprite.oy = 96
- sprite.zoom_x = cell_data[i, 3] / 100.0
- sprite.zoom_y = cell_data[i, 3] / 100.0
- sprite.angle = cell_data[i, 4]
- sprite.mirror = (cell_data[i, 5] == 1)
- sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
- sprite.blend_type = cell_data[i, 7]
- end
- end
- end
- end
- #==============================================================================
- # ■ RPG
- #------------------------------------------------------------------------------
- # 基本モジュールです
- #==============================================================================
- module RPG
- #============================================================================
- # ■ Cache
- #----------------------------------------------------------------------------
- # 画像処理を行うモジュールです。
- #============================================================================
- module Cache
- def self.system(filename)
- self.load_bitmap("Graphics/Pictures/", filename)
- end
- end
- end
复制代码 看看是不是,我也新手。 |
|