577.08 KB, 下载次数: 80
for iii in $game_party.members + $game_troop.members @cppic[iii] = Sprite.new @cppic[iii].bitmap = @baseicons @cppic[iii].x = 4 @cppic[iii].y = 264 @cppic[iii].z = 510 @cppic[iii].zoom_x = 1.0 @cppic[iii].zoom_y = 1.0 @cppic[iii].opacity = 255 @cppic[iii].visible = $CP可见 end
def make_cp @blank_window = Window_Blank.new @cppic = {} @baseicons = Cache.system("Iconset") @cpshu = 0 for iii in $game_party.members + $game_troop.members @cppic[iii] = Sprite.new @cppic[iii].bitmap = @baseicons @cppic[iii].x = 4 @cppic[iii].y = 264 @cppic[iii].z = 510 @cppic[iii].zoom_x = 1.0 @cppic[iii].zoom_y = 1.0 @cppic[iii].opacity = 255 @cppic[iii].visible = $CP可见 @cpshu += 1 end @kaiguan = 0 @basepic = Sprite.new @basepic.bitmap = Bitmap.new(384, 8) @basepic.x = 16 @basepic.y = 272 @basepic.z = 500 @basepic.zoom_x = 1.0 @basepic.zoom_y = 1.0 @basepic.opacity = 255 @basepic.bitmap.fill_rect(0, 0, 384, 8, Color.new(0, 128, 192, 255)) @basepic.visible = $CP可见 refresh_cp end #-------------------------------------------------------------------------- # ● CP条更新 #-------------------------------------------------------------------------- def refresh_cp if @blank_window.disposed? return end @blank_window.x = 128 - @info_viewport.ox @basepic.x = 144 - @info_viewport.ox @baseicons = Cache.system("Iconset") for iii in $game_party.members + $game_troop.members if iii == @cpshu && @kaiguan == 0 @cppic[iii] = Sprite.new @cppic[iii].bitmap = @baseicons @cppic[iii].x = 4 @cppic[iii].y = 264 @cppic[iii].z = 510 @cppic[iii].zoom_x = 1.0 @cppic[iii].zoom_y = 1.0 @cppic[iii].opacity = 255 @cppic[iii].visible = $CP可见 @kaiguan = 1 end end for iii in $game_party.members + $game_troop.members if iii.is_a?(Game_Actor) if iii.weapon_id == 0 @cppic[iii].src_rect.set(96, 192, 24, 24) else icon_index = $data_weapons[iii.weapon_id].icon_index @cppic[iii].src_rect.set(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) end else @cppic[iii].src_rect.set(312, 216, 24, 24) end if iii.hp > 0 @cppic[iii].visible = $CP可见 else @cppic[iii].visible = false end @cppic[iii].x = 132 + (iii.cp * 384 / 5000).to_i - @info_viewport.ox end end
577.18 KB, 下载次数: 84
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |