赞 | 0 |
VIP | 1 |
好人卡 | 0 |
积分 | 1 |
经验 | 2549 |
最后登录 | 2020-7-31 |
在线时间 | 17 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 70
- 在线时间
- 17 小时
- 注册时间
- 2009-7-3
- 帖子
- 64
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
下面为原代码,要怎么修改可视化的圆形大小呢?
- #==============================================================================
- # ■ 本脚本来自 [url]www.66rpg.com[/url] 使用或转载时请保留此信息.谢谢!
- #==============================================================================
- #==============================================================================
- # ■ 可视化战斗选择框
- # 原作者:柳柳 (VX平台)
- # 移植 :后知后觉(HZHJ)
- # 版本 :v1.1
- # 使用说明:整段脚本插入到 Main 前
- # Graphics/pictures 目录下有一张图片 一起拷贝到自己工程去
- # 切记这张图片不要改名 原来名字为 enemy_select_back.png
- # 这图为圆形.可以根据你的喜好改成五角星.方框.桃心等诡异形状
- # 本脚本还使用到 猫哥哥 的 RGSS2_bitmap_xp
- # 用到了里面的 clear_rect,blur,blur_r
- # 这个脚本的其他功能因为本脚本未使用.所以用 =begin~=end 进行了块注释
- #==============================================================================
- #==============================================================================
- # ■ Scene_Battle (分割定义 1)
- #==============================================================================
- class Scene_Battle
- #--------------------------------------------------------------------------
- # ● 刷新画面画面 (角色命令回合 : 选择敌人)
- #--------------------------------------------------------------------------
- alias hzhj_update_select_enemy update_phase3_enemy_select
- def update_phase3_enemy_select
- hzhj_update_select_enemy
- if @enemy_arrow != nil and @hzhj_select_enemy != @enemy_arrow.index
- @hzhj_select_enemy = @enemy_arrow.index
- update_target_select_sprite($game_troop.enemies[@enemy_arrow.index])
- end
- end
- #--------------------------------------------------------------------------
- # ● 画面更新 (角色指令回合 : 选择角色)
- #--------------------------------------------------------------------------
- alias hzhj_update_select_actor update_phase3_actor_select
- def update_phase3_actor_select
- hzhj_update_select_actor
- if @actor_arrow != nil and @hzhj_select_actor != @actor_arrow.index
- @hzhj_select_actor = @actor_arrow.index
- update_target_select_sprite($game_party.actors[@actor_arrow.index])
- end
- end
- #--------------------------------------------------------------------------
- # ● 开始选择敌人
- #--------------------------------------------------------------------------
- alias hzhj_start_enemy_select start_enemy_select
- def start_enemy_select
- hzhj_start_enemy_select
- @enemy_arrow.visible = false
- @target_select_sprite = Sprite.new
- @target_select_sprite.z = 9999
- @target_select_sprite.bitmap = Bitmap.new(640, 480)
- @target_select_sprite.opacity = 160
- @hzhj_select_enemy = 9999
- end
- #--------------------------------------------------------------------------
- # ● 结束选择敌人
- #--------------------------------------------------------------------------
- alias hzhj_end_enemy_select end_enemy_select
- def end_enemy_select
- hzhj_end_enemy_select
- @target_select_sprite.bitmap.dispose
- @target_select_sprite.dispose
- @target_select_sprite = nil
- @hzhj_select_enemy = 9999
- end
- #--------------------------------------------------------------------------
- # ● 开始选择角色
- #--------------------------------------------------------------------------
- alias hzhj_start_actor_select start_actor_select
- def start_actor_select
- hzhj_start_actor_select
- @actor_arrow.visible = false
- @target_select_sprite = Sprite.new
- @target_select_sprite.z = 9999
- @target_select_sprite.bitmap = Bitmap.new(640, 480)
- @target_select_sprite.opacity = 160
- @hzhj_select_actor = 9999
- end
- #--------------------------------------------------------------------------
- # ● 结束选择角色
- #--------------------------------------------------------------------------
- alias hzhj_end_actor_select end_actor_select
- def end_actor_select
- hzhj_end_actor_select
- @target_select_sprite.bitmap.dispose
- @target_select_sprite.dispose
- @target_select_sprite = nil
- @hzhj_select_actor = 9999
- end
- #★★★★★★★★★★★★★★★★★★★★★★★★★
- #--------------------------------------------------------------------------
- # ● 刷新画面 战斗可视化选择框
- #--------------------------------------------------------------------------
- def update_target_select_sprite(enemy)
- @target_select_sprite.bitmap.clear
- @target_select_sprite.bitmap.fill_rect(0, 0, 640, 480, Color.new(0, 0, 0, 255))
- enemy_bmp = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
- enemy_x = enemy.screen_x
- enemy_y = enemy.screen_y
- hzhj_x = enemy_x - enemy_bmp.width / 2
- hzhj_y = enemy_y - enemy_bmp.height
- if enemy_bmp.width < enemy_bmp.height
- hzhj_wh = enemy_bmp.height
- hzhj_x = hzhj_x - (enemy_bmp.height - enemy_bmp.width) / 2
- elsif enemy_bmp.width > enemy_bmp.height
- hzhj_wh = enemy_bmp.width
- hzhj_y = hzhj_y - (enemy_bmp.width - enemy_bmp.height) / 2
- else
- hzhj_wh = enemy_bmp.width
- end
- dest_rect = Rect.new(hzhj_x,hzhj_y,hzhj_wh,hzhj_wh)
- src_bitmap = RPG::Cache.picture("enemy_select_back")
- src_rect = src_bitmap.rect
- @target_select_sprite.bitmap.clear_rect(dest_rect)
- @target_select_sprite.bitmap.stretch_blt(dest_rect, src_bitmap, src_rect)
- @target_select_sprite.bitmap.blur
- @target_select_sprite.bitmap.blur
- end
- #▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
- end
- #==============================================================================
- # ■ 本脚本来自 [url]www.66rpg.com[/url] 使用或转载时请保留此信息.谢谢!
- #==============================================================================
复制代码 |
|