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

Project1

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

大家务必进来看看这个问题

 关闭 [复制链接]

Lv1.梦旅人

魔星

梦石
0
星屑
50
在线时间
82 小时
注册时间
2007-7-29
帖子
707
跳转到指定楼层
1
发表于 2008-7-11 04:23:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
这是个菜单图标化角色小头像显示的问题


看到了吧  我队伍里面的人明明是  八神 草稚京 红丸 罗伯特 四个人

但是显示的时候3、4这三个角色头像都变成了和第二个角色一样了

是脚本的问题吧

我用的是这个RMXP  Window_Base修改过的脚本 大家研究一下啊  呵呵   o(∩_∩)o...

  1. #==============================================================================
  2. # ■ Window_Base
  3. #------------------------------------------------------------------------------
  4. #  游戏中全部窗口的超级类。
  5. #==============================================================================

  6. class Window_Base < Window
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化对像
  9.   #     x      : 窗口的 X 坐标
  10.   #     y      : 窗口的 Y 坐标
  11.   #     width  : 窗口的宽
  12.   #     height : 窗口的宽
  13.   #--------------------------------------------------------------------------
  14.   def initialize(x, y, width, height)
  15.     super()
  16.     @windowskin_name = $game_system.windowskin_name
  17.     self.windowskin = RPG::Cache.windowskin(@windowskin_name)
  18.     self.x = x
  19.     self.y = y
  20.     self.width = width
  21.     self.height = height
  22.     self.z = 100
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 释放
  26.   #--------------------------------------------------------------------------
  27.   def dispose
  28.     # 如果窗口的内容已经被设置就被释放
  29.     if self.contents != nil
  30.       self.contents.dispose
  31.     end
  32.     super
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● 获取文字色
  36.   #     n : 文字色编号 (0~7)
  37.   #--------------------------------------------------------------------------
  38.   def text_color(n)
  39.     case n
  40.     when 0
  41.       return Color.new(255, 255, 255, 255)
  42.     when 1
  43.       return Color.new(128, 128, 255, 255)
  44.     when 2
  45.       return Color.new(255, 128, 128, 255)
  46.     when 3
  47.       return Color.new(128, 255, 128, 255)
  48.     when 4
  49.       return Color.new(128, 255, 255, 255)
  50.     when 5
  51.       return Color.new(255, 128, 255, 255)
  52.     when 6
  53.       return Color.new(255, 255, 128, 255)
  54.     when 7
  55.       return Color.new(192, 192, 192, 255)
  56.     else
  57.       normal_color
  58.     end
  59.   end
  60.   #--------------------------------------------------------------------------
  61.   # ● 获取普通文字色
  62.   #--------------------------------------------------------------------------
  63.   def normal_color
  64.     return Color.new(255, 255, 255, 255)
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● 获取无效文字色
  68.   #--------------------------------------------------------------------------
  69.   def disabled_color
  70.     return Color.new(255, 255, 255, 128)
  71.   end
  72.   #--------------------------------------------------------------------------
  73.   # ● 获取系统文字色
  74.   #--------------------------------------------------------------------------
  75.   def system_color
  76.     return Color.new(192, 224, 255, 255)
  77.   end
  78.   #--------------------------------------------------------------------------
  79.   # ● 获取危机文字色
  80.   #--------------------------------------------------------------------------
  81.   def crisis_color
  82.     return Color.new(255, 255, 64, 255)
  83.   end
  84.   #--------------------------------------------------------------------------
  85.   # ● 获取战斗不能文字色
  86.   #--------------------------------------------------------------------------
  87.   def knockout_color
  88.     return Color.new(255, 64, 0)
  89.   end
  90.   #--------------------------------------------------------------------------
  91.   # ● 刷新画面
  92.   #--------------------------------------------------------------------------
  93.   def update
  94.     super
  95.     # 如果窗口的外关被变更了、再设置
  96.     if $game_system.windowskin_name != @windowskin_name
  97.       @windowskin_name = $game_system.windowskin_name
  98.       self.windowskin = RPG::Cache.windowskin(@windowskin_name)
  99.     end
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # ● 图形的描绘
  103.   #     actor : 角色
  104.   #     x     : 描画目标 X 坐标
  105.   #     y     : 描画目标 Y 坐标
  106.   #--------------------------------------------------------------------------
  107.   def draw_actor_graphic(actor, x, y)
  108.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  109.     cw = bitmap.width / 4
  110.     ch = bitmap.height / 4
  111.     src_rect = Rect.new(0, 0, cw, ch)
  112.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  113.   end
  114.     def draw_actor_pic(actor,x,y)
  115. bitmap = RPG::Cache.battler(actor.name + "_p" , actor.battler_hue)
  116. self.contents.blt(x,y,bitmap,Rect.new(0,0,bitmap.width,bitmap.height ))
  117. end
  118.   def draw_actor_face(actor,x,y)
  119. bitmap = RPG::Cache.battler(actor.name + "_q" , actor.battler_hue)
  120. self.contents.blt(x,y,bitmap,Rect.new(0,0,bitmap.width,bitmap.height ))
  121. end
  122.   #--------------------------------------------------------------------------
  123.   # ● 名称的描绘
  124.   #     actor : 角色
  125.   #     x     : 描画目标 X 坐标
  126.   #     y     : 描画目标 Y 坐标
  127.   #--------------------------------------------------------------------------
  128.   def draw_actor_name(actor, x, y)
  129.     self.contents.font.size = 16
  130.     self.contents.font.color = normal_color
  131.     self.contents.draw_text(x, y, 120, 32, actor.name)
  132.     self.contents.font.size = 18
  133.   end
  134.   #--------------------------------------------------------------------------
  135.   # ● 职业的描绘
  136.   #     actor : 角色
  137.   #     x     : 描画目标 X 坐标
  138.   #     y     : 描画目标 Y 坐标
  139.   #--------------------------------------------------------------------------
  140.   def draw_actor_class(actor, x, y)
  141.     self.contents.font.size = 16
  142.     self.contents.font.color = normal_color
  143.     self.contents.draw_text(x, y, 236, 32, actor.class_name)
  144.     self.contents.font.size = 18
  145.   end
  146.   #--------------------------------------------------------------------------
  147.   # ● 水平的描画
  148.   #     actor : 角色
  149.   #     x     : 描画目标 X 坐标
  150.   #     y     : 描画目标 Y 坐标
  151.   #--------------------------------------------------------------------------
  152.   def draw_actor_level(actor, x, y)
  153.     self.contents.font.color = system_color
  154.     self.contents.draw_text(x, y, 32, 32, "Lv")
  155.     self.contents.font.color = normal_color
  156.     self.contents.draw_text(x + 18, y, 24, 32, actor.level.to_s, 2)
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # ● 生辰成描绘用状态字符串
  160.   #     actor       : 角色
  161.   #     width       : 描画目标的宽度
  162.   #     need_normal : [正常] 是否为必须 (true / false)
  163.   #--------------------------------------------------------------------------
  164.   def make_battler_state_text(battler, width, need_normal)
  165.     # 获取括号的宽
  166.     brackets_width = self.contents.text_size("[]").width
  167.     # 生成状态名字符串
  168.     text = ""
  169.     for i in battler.states
  170.       if $data_states[i].rating >= 1
  171.         if text == ""
  172.           text = $data_states[i].name
  173.         else
  174.           new_text = text + "/" + $data_states[i].name
  175.           text_width = self.contents.text_size(new_text).width
  176.           if text_width > width - brackets_width
  177.             break
  178.           end
  179.           text = new_text
  180.         end
  181.       end
  182.     end
  183.     # 状态名空的字符串是 "[正常]" 的情况下
  184.     if text == ""
  185.       if need_normal
  186.         text = "[正常]"
  187.       end
  188.     else
  189.       # 加上括号
  190.       text = "[" + text + "]"
  191.     end
  192.     # 返回完成后的文字类
  193.     return text
  194.   end
  195.   #--------------------------------------------------------------------------
  196.   # ● 描绘状态
  197.   #     actor : 角色
  198.   #     x     : 描画目标 X 坐标
  199.   #     y     : 描画目标 Y 坐标
  200.   #     width : 描画目标的宽
  201.   #--------------------------------------------------------------------------
  202.   def draw_actor_state(actor, x, y, width = 120)
  203.     self.contents.font.size = 16
  204.     text = make_battler_state_text(actor, width, true)
  205.     self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
  206.     self.contents.draw_text(x, y, width, 32, text)
  207.     self.contents.font.size = 18
  208.   end
  209.   #--------------------------------------------------------------------------
  210.   # ● 描画 EXP
  211.   #     actor : 角色
  212.   #     x     : 描画目标 X 坐标
  213.   #     y     : 描画目标 Y 坐标
  214.   #--------------------------------------------------------------------------
  215.   def draw_actor_exp(actor, x, y)
  216.     self.contents.font.color = system_color
  217.     self.contents.draw_text(x, y, 24, 32, "E")
  218.     self.contents.font.color = normal_color
  219.     self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
  220.     self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
  221.     self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # ● 描绘 HP
  225.   #     actor : 角色
  226.   #     x     : 描画目标 X 坐标
  227.   #     y     : 描画目标 Y 坐标
  228.   #     width : 描画目标的宽
  229.   #--------------------------------------------------------------------------
  230.   def draw_actor_hp(actor, x, y, width = 144)
  231.     # 描绘字符串 "HP"
  232.     self.contents.font.bold = true
  233.     self.contents.font.color = system_color
  234.     self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  235.     # 计算描绘 MaxHP 所需的空间
  236.     if width - 32 >= 108
  237.       hp_x = x + width - 108
  238.       flag = true
  239.     elsif width - 32 >= 48
  240.       hp_x = x + width - 48
  241.       flag = false
  242.     end
  243.     # 描绘 HP
  244.     self.contents.font.color = actor.hp == 0 ? knockout_color :
  245.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  246.     self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  247.     # 描绘 MaxHP
  248.     if flag
  249.       self.contents.font.color = normal_color
  250.       self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  251.       self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
  252.       self.contents.font.bold = false
  253.     end
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # ● 描绘 SP
  257.   #     actor : 角色
  258.   #     x     : 描画目标 X 坐标
  259.   #     y     : 描画目标 Y 坐标
  260.   #     width : 描画目标的宽
  261.   #--------------------------------------------------------------------------
  262.   def draw_actor_sp(actor, x, y, width = 144)
  263.     # 描绘字符串 "SP"
  264.     self.contents.font.bold = true
  265.     self.contents.font.color = system_color
  266.     self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  267.     # 计算描绘 MaxSP 所需的空间
  268.     if width - 32 >= 108
  269.       sp_x = x + width - 108
  270.       flag = true
  271.     elsif width - 32 >= 48
  272.       sp_x = x + width - 48
  273.       flag = false
  274.     end
  275.     # 描绘 SP
  276.     self.contents.font.color = actor.sp == 0 ? knockout_color :
  277.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  278.     self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
  279.     # 描绘 MaxSP
  280.     if flag
  281.       self.contents.font.color = normal_color
  282.       self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  283.       self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
  284.       self.contents.font.bold = false
  285.     end
  286.   end
  287.   #--------------------------------------------------------------------------
  288.   # ● 描绘能力值
  289.   #     actor : 角色
  290.   #     x     : 描画目标 X 坐标
  291.   #     y     : 描画目标 Y 坐标
  292.   #     type  : 能力值种类 (0~6)
  293.   #--------------------------------------------------------------------------
  294.   def draw_actor_parameter(actor, x, y, type)
  295.     case type
  296.     when 0
  297.       parameter_name = $data_system.words.atk
  298.       parameter_value = actor.atk
  299.     when 1
  300.       parameter_name = $data_system.words.pdef
  301.       parameter_value = actor.pdef
  302.     when 2
  303.       parameter_name = $data_system.words.mdef
  304.       parameter_value = actor.mdef
  305.     when 3
  306.       parameter_name = $data_system.words.str
  307.       parameter_value = actor.str
  308.     when 4
  309.       parameter_name = $data_system.words.dex
  310.       parameter_value = actor.dex
  311.     when 5
  312.       parameter_name = $data_system.words.agi
  313.       parameter_value = actor.agi
  314.     when 6
  315.       parameter_name = $data_system.words.int
  316.       parameter_value = actor.int
  317.     end
  318.     self.contents.font.color = system_color
  319.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  320.     self.contents.font.color = normal_color
  321.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  322.   end
  323.    ###
  324.   def draw_actor_atk(actor, x, y,w=130)
  325.   atk_value = actor.atk
  326.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  327.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  328.   w1 = w * actor.atk/999
  329.   self.contents.fill_rect(x,y+18,w1,1,Color.new(140,0,0,255))
  330.   self.contents.fill_rect(x,y+19,w1,1,Color.new(160,0,0,255))
  331.   self.contents.fill_rect(x,y+20,w1,1,Color.new(180,0,0,255))
  332.   self.contents.fill_rect(x,y+21,w1,1,Color.new(200,0,0,255))
  333.   self.contents.fill_rect(x,y+22,w1,1,Color.new(220,0,0,255))
  334.   self.contents.fill_rect(x,y+23,w1,1,Color.new(240,0,0,255))
  335.   self.contents.fill_rect(x,y+24,w1,1,Color.new(255,0,0,255))
  336.   self.contents.fill_rect(x,y+25,w1,1,Color.new(240,0,0,255))
  337.   self.contents.fill_rect(x,y+26,w1,1,Color.new(220,0,0,255))
  338.   self.contents.fill_rect(x,y+27,w1,1,Color.new(200,0,0,255))
  339.   self.contents.fill_rect(x,y+28,w1,1,Color.new(180,0,0,255))
  340.   self.contents.fill_rect(x,y+29,w1,1,Color.new(160,0,0,255))
  341.   self.contents.fill_rect(x,y+30,w1,1,Color.new(140,0,0,255))
  342.   end
  343.     ###
  344.   def draw_actor_pdef(actor, x, y,w=130)
  345.   atk_value = actor.pdef
  346.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  347.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  348.   w1 = w * actor.pdef/999
  349.   self.contents.fill_rect(x,y+18,w1,1,Color.new(140,0,0,255))
  350.   self.contents.fill_rect(x,y+19,w1,1,Color.new(160,0,0,255))
  351.   self.contents.fill_rect(x,y+20,w1,1,Color.new(180,0,0,255))
  352.   self.contents.fill_rect(x,y+21,w1,1,Color.new(200,0,0,255))
  353.   self.contents.fill_rect(x,y+22,w1,1,Color.new(220,0,0,255))
  354.   self.contents.fill_rect(x,y+23,w1,1,Color.new(240,0,0,255))
  355.   self.contents.fill_rect(x,y+24,w1,1,Color.new(255,0,0,255))
  356.   self.contents.fill_rect(x,y+25,w1,1,Color.new(240,0,0,255))
  357.   self.contents.fill_rect(x,y+26,w1,1,Color.new(220,0,0,255))
  358.   self.contents.fill_rect(x,y+27,w1,1,Color.new(200,0,0,255))
  359.   self.contents.fill_rect(x,y+28,w1,1,Color.new(180,0,0,255))
  360.   self.contents.fill_rect(x,y+29,w1,1,Color.new(160,0,0,255))
  361.   self.contents.fill_rect(x,y+30,w1,1,Color.new(140,0,0,255))
  362. end
  363.     ###
  364.   def draw_actor_mdef(actor, x, y,w=130)
  365.   atk_value = actor.mdef
  366.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  367.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  368.   w1 = w * actor.mdef/999
  369.   self.contents.fill_rect(x,y+18,w1,1,Color.new(140,0,0,255))
  370.   self.contents.fill_rect(x,y+19,w1,1,Color.new(160,0,0,255))
  371.   self.contents.fill_rect(x,y+20,w1,1,Color.new(180,0,0,255))
  372.   self.contents.fill_rect(x,y+21,w1,1,Color.new(200,0,0,255))
  373.   self.contents.fill_rect(x,y+22,w1,1,Color.new(220,0,0,255))
  374.   self.contents.fill_rect(x,y+23,w1,1,Color.new(240,0,0,255))
  375.   self.contents.fill_rect(x,y+24,w1,1,Color.new(255,0,0,255))
  376.   self.contents.fill_rect(x,y+25,w1,1,Color.new(240,0,0,255))
  377.   self.contents.fill_rect(x,y+26,w1,1,Color.new(220,0,0,255))
  378.   self.contents.fill_rect(x,y+27,w1,1,Color.new(200,0,0,255))
  379.   self.contents.fill_rect(x,y+28,w1,1,Color.new(180,0,0,255))
  380.   self.contents.fill_rect(x,y+29,w1,1,Color.new(160,0,0,255))
  381.   self.contents.fill_rect(x,y+30,w1,1,Color.new(140,0,0,255))
  382. end
  383.     ###
  384.   def draw_actor_str(actor, x, y,w=130)
  385.   atk_value = actor.str
  386.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  387.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  388.   w1 = w * actor.str/999
  389.   self.contents.fill_rect(x,y+18,w1,1,Color.new(140,0,0,255))
  390.   self.contents.fill_rect(x,y+19,w1,1,Color.new(160,0,0,255))
  391.   self.contents.fill_rect(x,y+20,w1,1,Color.new(180,0,0,255))
  392.   self.contents.fill_rect(x,y+21,w1,1,Color.new(200,0,0,255))
  393.   self.contents.fill_rect(x,y+22,w1,1,Color.new(220,0,0,255))
  394.   self.contents.fill_rect(x,y+23,w1,1,Color.new(240,0,0,255))
  395.   self.contents.fill_rect(x,y+24,w1,1,Color.new(255,0,0,255))
  396.   self.contents.fill_rect(x,y+25,w1,1,Color.new(240,0,0,255))
  397.   self.contents.fill_rect(x,y+26,w1,1,Color.new(220,0,0,255))
  398.   self.contents.fill_rect(x,y+27,w1,1,Color.new(200,0,0,255))
  399.   self.contents.fill_rect(x,y+28,w1,1,Color.new(180,0,0,255))
  400.   self.contents.fill_rect(x,y+29,w1,1,Color.new(160,0,0,255))
  401.   self.contents.fill_rect(x,y+30,w1,1,Color.new(140,0,0,255))
  402. end
  403.     ###
  404.   def draw_actor_dex(actor, x, y,w=130)
  405.   atk_value = actor.dex
  406.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  407.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  408.   w1 = w * actor.dex/999
  409.   self.contents.fill_rect(x,y+18,w1,1,Color.new(140,140,0,255))
  410.   self.contents.fill_rect(x,y+19,w1,1,Color.new(160,160,0,255))
  411.   self.contents.fill_rect(x,y+20,w1,1,Color.new(180,180,0,255))
  412.   self.contents.fill_rect(x,y+21,w1,1,Color.new(200,200,0,255))
  413.   self.contents.fill_rect(x,y+22,w1,1,Color.new(220,220,0,255))
  414.   self.contents.fill_rect(x,y+23,w1,1,Color.new(240,240,0,255))
  415.   self.contents.fill_rect(x,y+24,w1,1,Color.new(255,255,0,255))
  416.   self.contents.fill_rect(x,y+25,w1,1,Color.new(240,240,0,255))
  417.   self.contents.fill_rect(x,y+26,w1,1,Color.new(220,220,0,255))
  418.   self.contents.fill_rect(x,y+27,w1,1,Color.new(200,200,0,255))
  419.   self.contents.fill_rect(x,y+28,w1,1,Color.new(180,180,0,255))
  420.   self.contents.fill_rect(x,y+29,w1,1,Color.new(160,160,0,255))
  421.   self.contents.fill_rect(x,y+30,w1,1,Color.new(140,140,0,255))
  422. end
  423.     ###
  424.   def draw_actor_agi(actor, x, y,w=130)
  425.   atk_value = actor.agi
  426.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  427.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  428.   w1 = w * actor.agi/999
  429.   self.contents.fill_rect(x,y+18,w1,1,Color.new(0,140,0,255))
  430.   self.contents.fill_rect(x,y+19,w1,1,Color.new(0,160,0,255))
  431.   self.contents.fill_rect(x,y+20,w1,1,Color.new(0,180,0,255))
  432.   self.contents.fill_rect(x,y+21,w1,1,Color.new(0,200,0,255))
  433.   self.contents.fill_rect(x,y+22,w1,1,Color.new(0,220,0,255))
  434.   self.contents.fill_rect(x,y+23,w1,1,Color.new(0,240,0,255))
  435.   self.contents.fill_rect(x,y+24,w1,1,Color.new(0,255,0,255))
  436.   self.contents.fill_rect(x,y+25,w1,1,Color.new(0,240,0,255))
  437.   self.contents.fill_rect(x,y+26,w1,1,Color.new(0,220,0,255))
  438.   self.contents.fill_rect(x,y+27,w1,1,Color.new(0,200,0,255))
  439.   self.contents.fill_rect(x,y+28,w1,1,Color.new(0,180,0,255))
  440.   self.contents.fill_rect(x,y+29,w1,1,Color.new(0,160,0,255))
  441.   self.contents.fill_rect(x,y+30,w1,1,Color.new(0,140,0,255))
  442. end
  443.     ###
  444.   def draw_actor_int(actor, x, y,w=130)
  445.   atk_value = actor.int
  446.   self.contents.fill_rect(x-2,y+16,w+4,16,Color.new(255,255,255,255))
  447.   self.contents.fill_rect(x-1,y+17,w+2,14,Color.new(0,0,0,255))
  448.   w1 = w * actor.int/999
  449.   self.contents.fill_rect(x,y+18,w1,1,Color.new(0,110,140,255))
  450.   self.contents.fill_rect(x,y+19,w1,1,Color.new(0,110,160,255))
  451.   self.contents.fill_rect(x,y+20,w1,1,Color.new(0,110,180,255))
  452.   self.contents.fill_rect(x,y+21,w1,1,Color.new(0,110,200,255))
  453.   self.contents.fill_rect(x,y+22,w1,1,Color.new(0,110,220,255))
  454.   self.contents.fill_rect(x,y+23,w1,1,Color.new(0,110,240,255))
  455.   self.contents.fill_rect(x,y+24,w1,1,Color.new(0,110,255,255))
  456.   self.contents.fill_rect(x,y+25,w1,1,Color.new(0,110,240,255))
  457.   self.contents.fill_rect(x,y+26,w1,1,Color.new(0,110,220,255))
  458.   self.contents.fill_rect(x,y+27,w1,1,Color.new(0,110,200,255))
  459.   self.contents.fill_rect(x,y+28,w1,1,Color.new(0,110,180,255))
  460.   self.contents.fill_rect(x,y+29,w1,1,Color.new(0,110,160,255))
  461.   self.contents.fill_rect(x,y+30,w1,1,Color.new(0,110,140,255))
  462.   end
  463.   ####
  464.   def HP(actor,x,y,w=96)
  465.   self.contents.fill_rect(x-2,y+16,w+4,8,Color.new(255,255,255,255))
  466.   self.contents.fill_rect(x-1,y+17,w+2,6,Color.new(0,0,0,255))
  467.   w1 = w * actor.hp/actor.maxhp
  468.   self.contents.fill_rect(x,y+18,w1,1,Color.new(0,150,0,255))
  469.   self.contents.fill_rect(x,y+19,w1,1,Color.new(0,200,0,255))
  470.   self.contents.fill_rect(x,y+20,w1,1,Color.new(0,150,0,255))
  471.   end
  472.   ##############
  473.   ####
  474.   def SP(actor,x,y,w=96)
  475.   self.contents.fill_rect(x-2,y+16,w+4,8,Color.new(255,255,255,255))
  476.   self.contents.fill_rect(x-1,y+17,w+2,6,Color.new(0,0,0,255))
  477.   w1 = w * actor.sp/actor.maxsp
  478.   self.contents.fill_rect(x,y+18,w1,1,Color.new(0,100,255,255))
  479.   self.contents.fill_rect(x,y+19,w1,1,Color.new(0,150,255,255))
  480.   self.contents.fill_rect(x,y+20,w1,1,Color.new(0,100,255,255))
  481. end
  482. ##########
  483.   #--------------------------------------------------------------------------
  484.   # ● 描绘物品名
  485.   #     item : 物品
  486.   #     x    : 描画目标 X 坐标
  487.   #     y    : 描画目标 Y 坐标
  488.   #--------------------------------------------------------------------------
  489.   def draw_item_name(item, x, y)
  490.     if item == nil
  491.       return
  492.     end
  493.     bitmap = RPG::Cache.icon(item.icon_name)
  494.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  495.     self.contents.font.color = normal_color
  496.     self.contents.draw_text(x + 28, y, 212, 32, item.name)
  497.   end
  498. end
复制代码

我怀疑是在这个地方  各位看看
  1.   #--------------------------------------------------------------------------
  2.   # ● 图形的描绘
  3.   #     actor : 角色
  4.   #     x     : 描画目标 X 坐标
  5.   #     y     : 描画目标 Y 坐标
  6.   #--------------------------------------------------------------------------
  7.   def draw_actor_graphic(actor, x, y)
  8.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  9.     cw = bitmap.width / 4
  10.     ch = bitmap.height / 4
  11.     src_rect = Rect.new(0, 0, cw, ch)
  12.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  13.   end
  14.     def draw_actor_pic(actor,x,y)
  15. bitmap = RPG::Cache.battler(actor.name + "_p" , actor.battler_hue)
  16. self.contents.blt(x,y,bitmap,Rect.new(0,0,bitmap.width,bitmap.height ))
  17. end
  18.   def draw_actor_face(actor,x,y)
  19. bitmap = RPG::Cache.battler(actor.name + "_q" , actor.battler_hue)
  20. self.contents.blt(x,y,bitmap,Rect.new(0,0,bitmap.width,bitmap.height ))
  21. end
复制代码

                                                             『点击图片进入周小瑜的个人空间』

Lv5.捕梦者

梦石
0
星屑
39973
在线时间
5810 小时
注册时间
2006-11-10
帖子
6683
2
发表于 2008-7-11 04:28:35 | 只看该作者
actor.name + "_p"

你把所有人的名字都叫“草稚京”,当然都显示这个头像了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-8-8 18:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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