设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2476|回复: 2
打印 上一主题 下一主题

[已经解决] 脚本中添加图片,显示出来后消失不了?

[复制链接]

Lv2.观梦者

梦石
0
星屑
344
在线时间
185 小时
注册时间
2007-9-2
帖子
168
跳转到指定楼层
1
发表于 2010-9-20 00:15:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
自己美化了一下加点脚本,添加了一张图片,不知道怎么取消它?
第160句的
  1. @sprite12.bitmap = RPG::Cache.picture("【仓库】状态背景")
复制代码
是我添加的~
和他对称的
  1. @sprite12.dispose
复制代码
不知道该填到哪?
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # 脚本使用设定:

  5. LEVEL_UP_POINT = 1  # 每升一级所增加的点数
  6. LEVEL_UP_VARIABLE = 100  # 储存角色点数的变量编号与角色id编号的差值
  7.                          # 默认情况 = 100,
  8.                          # 则是数据库里1号角色的加点数存于101号变量
  9.                          # 3号角色的加点数存于103号变量。
  10.                          # 你可以直接操作变量赠与角色可分配点数

  11. # 每增加一次点数,各项能力值的变化:357-410行
  12.                         
  13. # 使用方法介绍:

  14. # 本脚本不会取代原猩豆δ埽皇且桓龈郊庸δ堋?BR># 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  15. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  16. # 1-99级全部等于一个相同数值就行了。

  17. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  18. # 默认都是0号

  19. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  20. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new

  21. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG

  22. #==============================================================================
  23. # ■ Window_Command
  24. #------------------------------------------------------------------------------
  25. #  一般的命令选择行窗口。(追加定义)
  26. #==============================================================================
  27. class Window_Command < Window_Selectable
  28.   #--------------------------------------------------------------------------
  29.   # ● 项目有效化
  30.   #     index : 项目编号
  31.   #--------------------------------------------------------------------------
  32.   def able_item(index)
  33.     draw_item(index, normal_color)
  34.   end
  35. end
  36. #==============================================================================
  37. # ■ Game_Actor
  38. #------------------------------------------------------------------------------
  39. #  处理角色的类。(再定义)
  40. #==============================================================================
  41. class Game_Actor < Game_Battler
  42.   #--------------------------------------------------------------------------
  43.   # ● 更改 EXP
  44.   #     exp : 新的 EXP
  45.   #--------------------------------------------------------------------------
  46.   def exp=(exp)
  47.     @exp = [[exp, 9999999].min, 0].max
  48.     # 升级
  49.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  50.       @level += 1
  51.       # 增加4点可自由分配的点数
  52.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  53.       # 学会特技
  54.       for j in $data_classes[@class_id].learnings
  55.         if j.level == @level
  56.           learn_skill(j.skill_id)
  57.         end
  58.       end
  59.     end
  60.     # 降级
  61.     while @exp < @exp_list[@level]
  62.       @level -= 1
  63.     end
  64.     # 修正当前的 HP 与 SP 超过最大值
  65.     @hp = [@hp, self.maxhp].min
  66.     @sp = [@sp, self.maxsp].min
  67.   end
  68. end
  69. #==============================================================================
  70. # ■ Window_Base
  71. #------------------------------------------------------------------------------
  72. #  游戏中全部窗口的超级类(追加定义)
  73. #==============================================================================
  74. class Window_Base < Window
  75.   #--------------------------------------------------------------------------
  76.   # ● 描绘 HP
  77.   #     actor : 角色
  78.   #     x     : 描画目标 X 坐标
  79.   #     y     : 描画目标 Y 坐标
  80.   #     width : 描画目标的宽
  81.   #--------------------------------------------------------------------------
  82.   def draw_actor_lvup(actor, x, y, type)   
  83.     # 定义数字颜色
  84.     lvup = normal_color
  85.     upcolor = Color.new(255, 128, 128, 255)
  86.     self.contents.font.color = normal_color   
  87.     case type
  88.    
  89.     when 0
  90.       parameter_name = $data_system.words.str
  91.       parameter_value = actor.str
  92.       parameter_value_temp = parameter_value + $temp_str
  93.     when 1
  94.       parameter_name = $data_system.words.dex
  95.       parameter_value = actor.dex
  96.       parameter_value_temp = parameter_value + $temp_dex
  97.       
  98.     when 2
  99.       parameter_name = $data_system.words.agi
  100.       parameter_value = actor.agi
  101.       parameter_value_temp = parameter_value + $temp_agi
  102.       
  103.     when 3
  104.       parameter_name = $data_system.words.int
  105.       parameter_value = actor.int
  106.       parameter_value_temp = parameter_value + $temp_int
  107.       
  108.     when 4
  109.       parameter_name = "剩余点数"
  110.       parameter_value = $point
  111.       if $point != 0
  112.         lvup = upcolor        
  113.       end
  114.      when 5
  115.       parameter_name = $data_system.words.hp
  116.       parameter_value = actor.maxhp
  117.       parameter_value_temp = parameter_value + $temp_hp
  118.       
  119.       when 6
  120.       parameter_name = $data_system.words.sp
  121.       parameter_value = actor.maxsp
  122.       parameter_value_temp = parameter_value + $temp_sp
  123.    
  124.     end
  125.    
  126.     self.contents.font.color = normal_color
  127.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  128.     if type != 4
  129.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  130.     end  
  131.     self.contents.font.color = lvup
  132.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  133.     self.contents.font.color = normal_color        
  134.   end
  135. end
  136. #==============================================================================
  137. # ■ Window_lvup
  138. #------------------------------------------------------------------------------
  139. #  显示升级状态窗口。
  140. #==============================================================================
  141. class Window_Lvup < Window_Base
  142.   #--------------------------------------------------------------------------
  143.   # ● 初始化对像
  144.   #     actor : 角色
  145.   #--------------------------------------------------------------------------
  146.   def initialize(actor)
  147.     super(350, 90,680, 415)
  148.     self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
  149.    @sprite12 = Sprite.new
  150.    @sprite12.bitmap = RPG::Cache.picture("【仓库】状态背景")
  151.     self.contents = Bitmap.new(width - 32, height - 32)
  152.     self.opacity = 0
  153.     @actor = actor
  154.     refresh
  155.   end  
  156.   #--------------------------------------------------------------------------
  157.   # ● 刷新
  158.   #--------------------------------------------------------------------------
  159.   def refresh
  160.     self.contents.clear
  161.     testname = @actor.battler_name+"_h.png"
  162.     self.contents.font.size = 20
  163.         draw_walk_actor_graphic(@actor, 40, 135)
  164.         draw_actor_parameter(@actor, 170, 26, 0)
  165.         draw_actor_parameter(@actor, 170, 58, 1)
  166.         draw_actor_parameter(@actor, 170, 90, 2)
  167.         draw_actor_lvup(@actor, 160, 96+90, 0)
  168.         draw_actor_lvup(@actor, 160, 128+90, 1)
  169.         draw_actor_lvup(@actor, 160, 160+90, 2)
  170.         draw_actor_lvup(@actor, 160, 192+90, 3)
  171.         draw_actor_lvup(@actor, 160, 224+90, 4)
  172.         draw_actor_lvup(@actor, 160, 64+90, 6)
  173.         draw_actor_lvup(@actor, 160, 32+90, 5)
  174.         draw_actor_level(@actor, 102,24)
  175.         self.contents.draw_text(42 + 40, 54, 84, 32, @actor.exp_s, 2)
  176.        self.contents.draw_text(42 + 40, 78, 84, 32, @actor.next_rest_exp_s, 2)
  177.      end
  178.   end
  179. #==============================================================================
  180. # ■ Window_Help
  181. #------------------------------------------------------------------------------
  182. #  特技及物品的说明、角色的状态显示的窗口。
  183. #==============================================================================
  184. class Window_Lvup_Help < Window_Base
  185.   #--------------------------------------------------------------------------
  186.   # ● 初始化对像
  187.   #--------------------------------------------------------------------------
  188.   def initialize
  189.     super(120, 148, 640, 460)
  190.     self.contents = Bitmap.new(width - 32, height - 32)
  191.     self.opacity = 0
  192.     @test = "" #——这个东西用来检测,节约内存专用
  193.   end  
  194.   #--------------------------------------------------------------------------
  195.   # ● 设置文本
  196.   #--------------------------------------------------------------------------
  197.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil, text5 = nil, text6 = nil, text7 = nil)
  198.     if @test != text1
  199.       @test = text1
  200.     else
  201.       return
  202.     end   
  203.     self.contents.clear
  204.     self.contents.font.color = normal_color
  205.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  206.     if text2 != nil
  207.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  208.     end
  209.     self.contents.font.size -= 5
  210.     if text3 != nil
  211.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  212.     end
  213.     if text4 != nil
  214.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  215.     end
  216.     if text5 != nil
  217.       self.contents.draw_text(4 , 128, self.width - 40, 32, text5)
  218.     end
  219.     if text6 != nil
  220.       self.contents.draw_text(4 , 160, self.width - 40, 32, text6)
  221.     end
  222.     if text7 != nil
  223.       self.contents.draw_text(4 , 192, self.width - 40, 32, text7)
  224.     end
  225.     self.contents.font.size += 5
  226.   end
  227. end
  228. #==============================================================================
  229. # ■ Scene_lvup
  230. #------------------------------------------------------------------------------
  231. #  处理升级画面的类。
  232. #==============================================================================
  233. class Scene_Lvup
  234.   #--------------------------------------------------------------------------
  235.   # ● 初始化对像
  236.   #     actor_index : 角色索引
  237.   #     menu_index : 选项起始位置
  238.   #--------------------------------------------------------------------------
  239.   def initialize(actor_index = 0 , menu_index = 0)
  240.     @actor_index = actor_index
  241.     @menu_index = menu_index
  242.   end
  243.   #--------------------------------------------------------------------------
  244.   # ● 主处理
  245.   #--------------------------------------------------------------------------
  246.   def main
  247.    
  248.     s1 = ""
  249.     s2 = ""
  250.     s3 = ""
  251.     s4 = ""
  252.     s5 = ""
  253.     s6 = ""
  254.     s7 = ""
  255.     s8 = ""
  256.     s9 = ""
  257.     @command_window = Window_Command.new(54, [s1, s2, s3, s4, s5, s6, s7,s8,s9])
  258.     @command_window.x =506
  259.     @command_window.y =141
  260.     @command_window.contents_opacity = 0
  261.     @command_window.opacity = 0
  262.     @command_window.index = @menu_index
  263.     # 获取角色
  264.     @actor = $game_party.actors[@actor_index]
  265.     # 将角色的剩余点数带入
  266.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  267.     # 初始化临时量
  268.     $temp_str = 0
  269.     $temp_dex = 0
  270.     $temp_agi = 0
  271.     $temp_int = 0
  272.     $temp_hp = 0
  273.     $temp_sp = 0
  274.     #=========================================================================
  275.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  276.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  277.     #=========================================================================
  278.     # 每提升一次力量,提升多少附加能力
  279.     #=========================================================================
  280.     @str_hp = 5     # 每提升一次力量附加提升多少HP
  281.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  282.     @str_dex = -1    # 每提升一次力量附加提升多少灵巧
  283.     @str_agi = -1    # 每提升一次力量附加提升多少速度
  284.     @str_int = -1    # 每提升一次力量附加提升多少魔力
  285.     @str_str = 3    # 每提升一次力量附加提升多少力量
  286.     #=========================================================================
  287.     # 每提升一次灵巧,提升多少附加能力
  288.     #=========================================================================
  289.     @dex_hp = 0     # 每提升一次灵巧附加提升多少HP
  290.     @dex_sp = 0     # 每提升一次灵巧附加提升多少SP
  291.     @dex_str = -1    # 每提升一次灵巧附加提升多少力量
  292.     @dex_agi = -1    # 每提升一次灵巧附加提升多少速度
  293.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  294.     @dex_dex = 3    # 每提升一次灵巧附加提升多少灵巧
  295.     #=========================================================================
  296.     # 每提升一次速度,提升多少附加能力
  297.     #=========================================================================
  298.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  299.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  300.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  301.     @agi_dex = -1    # 每提升一次速度附加提升多少灵巧
  302.     @agi_int = -1    # 每提升一次速度附加提升多少魔力
  303.     @agi_agi = 3    # 每提升一次速度附加提升多少速度
  304.     #=========================================================================
  305.     # 每提升一次魔力,提升多少附加能力
  306.     #=========================================================================
  307.     @int_hp = 0     # 每提升一次魔力附加提升多少HP
  308.     @int_sp = 3    # 每提升一次魔力附加提升多少SP
  309.     @int_str = -1   # 每提升一次魔力附加提升多少力量
  310.     @int_dex = -1   # 每提升一次魔力附加提升多少灵巧
  311.     @int_agi = -1   # 每提升一次魔力附加提升多少速度
  312.     @int_int = 3   # 每提升一次魔力附加提升多少魔力
  313.     #=========================================================================
  314.     # 每提升一次体力,提升多少附加能力
  315.     #=========================================================================
  316.     @hp_hp = 30     # 每提升一次魔力附加提升多少HP
  317.     @hp_sp = -6    # 每提升一次魔力附加提升多少SP
  318.     @hp_str = 0   # 每提升一次魔力附加提升多少力量
  319.     @hp_dex = 0   # 每提升一次魔力附加提升多少灵巧
  320.     @hp_agi = 0   # 每提升一次魔力附加提升多少速度
  321.     @hp_int = 0   # 每提升一次魔力附加提升多少魔力
  322.     #=========================================================================
  323.     # 每提升一次真气,提升多少附加能力
  324.     #=========================================================================
  325.     @sp_hp = -3     # 每提升一次魔力附加提升多少HP
  326.     @sp_sp =  15    # 每提升一次魔力附加提升多少SP
  327.     @sp_str = 0   # 每提升一次魔力附加提升多少力量
  328.     @sp_dex = 0   # 每提升一次魔力附加提升多少灵巧
  329.     @sp_agi = 0   # 每提升一次魔力附加提升多少速度
  330.     @sp_int = 0   # 每提升一次魔力附加提升多少魔力
  331.     # 定义说明文字
  332.      @text_hp_sc =  "增加体力值。"
  333.      @text_sp_sc =  "增加真气值。"
  334.     @text_str_sc =  "增加物理威力。"
  335.     @text_dex_sc =  "提高命中率。"
  336.     @text_agi_sc =  "提高回避率。"
  337.     @text_int_sc =  "增加技能威力。"
  338.     @text_save = "保存分配情况"
  339.     @text_reset= "重新分配点数"
  340.     @text_2 = "能力值变化:"
  341. #      
  342.     # 生成状态窗口
  343.     @lvup_window = Window_Lvup.new(@actor)
  344.     @lvup_window.x = 120
  345.     @lvup_window.y = 20  
  346.     @gold_window = Window_Gold_Menu.new
  347.       @gold_window.x = 180
  348.       @gold_window.y = 385
  349.       @gold_window.opacity = 0
  350.     # 生成帮助窗口并初始化帮助文本
  351.     @help_window = Window_Lvup_Help.new   
  352.     # 执行过渡
  353.     Graphics.transition(20, "Graphics/Transitions/" + $data_system.battle_transition)
  354.     # 主循环
  355.     loop do
  356.       # 刷新游戏画面
  357.       Graphics.update
  358.       # 刷新输入信息
  359.       Input.update
  360.       # 刷新画面
  361.       update
  362.       # 如果切换画面就中断循环
  363.       if $scene != self
  364.         break
  365.       end
  366.     end
  367.     # 准备过渡
  368.     Graphics.freeze
  369.     # 释放窗口
  370.     @command_window.dispose
  371.     @lvup_window.dispose
  372.     @help_window.dispose
  373.     @gold_window.dispose
  374.   end
  375.   #--------------------------------------------------------------------------
  376.   # ● 刷新画面
  377.   #--------------------------------------------------------------------------
  378.   def update
  379.     # 刷新窗口
  380.     @command_window.update
  381.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)

  382.     @lvup_window.update
  383.     #=============================================================
  384.     # 按下 B 键的情况下
  385.     #=============================================================
  386.     if Input.trigger?(Input::B)
  387.       # 演奏取消 SE
  388.       $game_system.se_play($data_system.cancel_se)
  389.       # 切换到地图画面
  390.       
  391.       $scene = Scene_Menu.new(5)
  392.      
  393.       return
  394.     end
  395.     #=============================================================
  396.     # 按下 C 键的情况下
  397.     #=============================================================
  398.     if Input.trigger?(Input::C)      
  399.       if @command_window.index == 6
  400.           # 演奏确定 SE
  401.         $game_system.se_play($data_system.decision_se)
  402.         # 将角色的剩余点数带回
  403.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  404.         # 将角色点数实际加上
  405.         @actor.str += $temp_str
  406.         @actor.dex += $temp_dex
  407.         @actor.agi += $temp_agi
  408.         @actor.int += $temp_int
  409.         @actor.maxhp += $temp_hp
  410.         @actor.maxsp += $temp_sp
  411.         
  412.         # 切换到地图画面
  413.         $temp_str = 0
  414.         $temp_dex = 0
  415.         $temp_agi = 0
  416.         $temp_int = 0
  417.         $temp_hp = 0
  418.         $temp_sp = 0
  419.       return
  420.       end
  421.       if @command_window.index == 7
  422.           # 演奏确定 SE
  423.         $game_system.se_play($data_system.cancel_se)
  424.           # 将角色的剩余点数带入
  425.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  426.           # 初始化临时量
  427.         $temp_str = 0
  428.         $temp_dex = 0
  429.         $temp_agi = 0
  430.         $temp_int = 0
  431.         $temp_hp = 0
  432.         $temp_sp = 0
  433.         @lvup_window.refresh
  434.         return
  435.       end
  436.       if @command_window.index == 8
  437.           # 演奏确定 SE
  438.          $game_system.se_play($data_system.decision_se)
  439.         # 移至下一位角色
  440.         @actor_index += 1
  441.         @actor_index %= $game_party.actors.size
  442.         # 切换到别的状态画面
  443.         $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  444.         return
  445.       end
  446.       if $point == 0
  447.         # 演奏冻结 SE
  448.         $game_system.se_play($data_system.buzzer_se)
  449.         return
  450.       end
  451.       case @command_window.index
  452.       when 0
  453.         # 演奏确定 SE
  454.         $game_system.se_play($data_system.decision_se)
  455.         $temp_hp += @hp_hp
  456.         $temp_sp += @hp_sp
  457.         $temp_str += @hp_str
  458.         $temp_dex += @hp_dex
  459.         $temp_agi += @hp_agi
  460.         $temp_int += @hp_int
  461.         $point -= 1
  462.         @lvup_window.refresh
  463.          
  464.         return
  465.       when 1
  466.         # 演奏确定 SE
  467.         $game_system.se_play($data_system.decision_se)
  468.         $temp_hp += @sp_hp
  469.         $temp_sp += @sp_sp
  470.         $temp_str += @sp_str
  471.         $temp_dex += @sp_dex
  472.         $temp_agi += @sp_agi
  473.         $temp_int += @sp_int
  474.         $point -= 1
  475.         @lvup_window.refresh
  476.         
  477.         return
  478.       when 2
  479.         # 演奏确定 SE
  480.         $game_system.se_play($data_system.decision_se)
  481.         $temp_str += @str_str
  482.         $temp_hp += @str_hp
  483.         $temp_sp += @str_sp
  484.         $temp_dex += @str_dex
  485.         $temp_agi += @str_agi
  486.         $temp_int += @str_int
  487.         $point -= 1
  488.         @lvup_window.refresh
  489.          
  490.         return
  491.       when 3
  492.         # 演奏确定 SE
  493.         $game_system.se_play($data_system.decision_se)
  494.         $temp_dex += @dex_dex
  495.         $temp_hp += @dex_hp
  496.         $temp_sp += @dex_sp
  497.         $temp_str += @dex_str
  498.         $temp_agi += @dex_agi
  499.         $temp_int += @dex_int
  500.         $point -= 1
  501.         @lvup_window.refresh
  502.          
  503.         return
  504.       when 4
  505.         # 演奏确定 SE
  506.         $game_system.se_play($data_system.decision_se)
  507.         $temp_agi += @agi_agi
  508.         $temp_hp += @agi_hp
  509.         $temp_sp += @agi_sp
  510.         $temp_str += @agi_str
  511.         $temp_dex += @agi_dex
  512.         $temp_int += @agi_int
  513.         $point -= 1
  514.         @lvup_window.refresh
  515.          
  516.         return
  517.       when 5
  518.         # 演奏确定 SE
  519.         $game_system.se_play($data_system.decision_se)
  520.         $temp_int += @int_int
  521.         $temp_hp += @int_hp
  522.         $temp_sp += @int_sp
  523.         $temp_str += @int_str
  524.         $temp_dex += @int_dex
  525.         $temp_agi += @int_agi
  526.         $point -= 1
  527.         @lvup_window.refresh
  528.         
  529.       
  530.          
  531.         return
  532.       end
  533.     end
  534.     #=============================================================
  535.     # 什么都没有按下的情况
  536.     #=============================================================
  537.     case @command_window.index   
  538.    
  539.     when 0  # 增加体力
  540.       temptext1 = "体力 +30 点"
  541.       temptext2 = "气力 -6  点"
  542.       @help_window.lvup_text(@text_hp_sc, @text_2 , temptext1 , temptext2)
  543.     when 1  # 增加真气
  544.       temptext1 = "体力 -3 点"
  545.       temptext2 = "气力 +15 点"
  546.       @help_window.lvup_text(@text_sp_sc, @text_2 , temptext1 , temptext2)
  547.     when 2  # 增加力量
  548.       temptext1 = "力量 +3 点"
  549.       temptext2 = "体力 +5 点"
  550.       temptext3 = "速度 -1 点"
  551.       temptext4 = "灵巧 -1 点"
  552.       temptext5 = "魔力 -1 点"
  553.       @help_window.lvup_text(@text_str_sc , @text_2 ,temptext1 , temptext2, temptext3, temptext4, temptext5)
  554.       
  555.       when 3  # 增加灵巧
  556.       temptext1 = "灵巧 +3 点"
  557.       temptext3 = "速度 -1 点"
  558.       temptext4 = "力量 -1 点"
  559.       
  560.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 ,  temptext3, temptext4)
  561.     when 4  # 增加速度
  562.       temptext1 = "速度 +3 点"
  563.       temptext3 = "灵巧 -1 点"
  564.       temptext4 = "魔力 -1 点"
  565.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 ,  temptext3, temptext4)
  566.     when 5  # 增加魔力
  567.       temptext1 = "魔力 +3 点"
  568.       temptext2 = "气力 +3 点"
  569.       temptext3 = "灵巧 -1 点"
  570.       temptext4 = "速度 -1 点"
  571.       temptext5 = "力量 -1 点"
  572.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2, temptext3, temptext4, temptext5)
  573.     when 6 # 保存设定
  574.       @help_window.lvup_text(@text_save)
  575.     when 7 # 点数重置
  576.       @help_window.lvup_text(@text_reset)  
  577.     when 8 # 换人
  578.       temptext1="转换角色"
  579.       @help_window.lvup_text(temptext1)   
  580.     end
  581.     #=============================================================
  582.     # 按下R与L换人的情况
  583.     #=============================================================      
  584.     if Input.trigger?(Input::R)
  585.       # 演奏光标 SE
  586.       $game_system.se_play($data_system.cursor_se)
  587.       # 移至下一位角色
  588.       @actor_index += 1
  589.       @actor_index %= $game_party.actors.size
  590.       # 切换到别的状态画面
  591.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  592.       return
  593.     end
  594.     # 按下 L 键的情况下
  595.     if Input.trigger?(Input::L)
  596.       # 演奏光标 SE
  597.       $game_system.se_play($data_system.cursor_se)
  598.       # 移至上一位角色
  599.       @actor_index += $game_party.actors.size - 1
  600.       @actor_index %= $game_party.actors.size
  601.       # 切换到别的状态画面
  602.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  603.       return
  604.     end
  605.   end  
  606.   #--------------------------------------------------------------------------
  607.   # ● 选项明暗判断
  608.   #--------------------------------------------------------------------------
  609.   
  610. end

  611. #==============================================================================
  612. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  613. #==============================================================================

复制代码
新手作品:《幻想》———缓慢制作中———
   
合击技能!哇哈哈~~~                                                                     金山寺求宝~~~

Lv5.捕梦者 (管理员)

老黄鸡

梦石
0
星屑
39674
在线时间
7485 小时
注册时间
2009-7-6
帖子
13483

开拓者贵宾

2
发表于 2010-9-20 07:25:06 | 只看该作者
回复 zhli667 的帖子


    dispose我个人思考的结果是只能用在窗口上,图片的话不在刷新里显示在下次刷新就会被消失掉了把?
回复 支持 反对

使用道具 举报

Lv3.寻梦者

宛若

梦石
0
星屑
1558
在线时间
526 小时
注册时间
2007-8-19
帖子
1493

极短24参与开拓者

3
发表于 2010-9-20 10:06:43 | 只看该作者
class Window_Lvup < Window_Base
def dispose
super
@sprite12.dispose
end
end

点评

认可答案~~~高手就是高手,佩服啊佩服~~  发表于 2010-9-20 11:49

评分

参与人数 1星屑 +200 收起 理由
六祈 + 200 认可答案

查看全部评分

[url=http://rpg.blue/thread-219730-1-1.html]http://unhero.sinaapp.com/wi.php[/url]
[color=Red]如你所见这是个死坑,没错这就是打我的脸用的[/color]
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-28 05:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表