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

Project1

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

[已经过期] 求修改这个出错的窗口类脚本,让它不会出错

[复制链接]

Lv1.梦旅人

矿工

梦石
0
星屑
134
在线时间
898 小时
注册时间
2012-10-5
帖子
1535
跳转到指定楼层
1
发表于 2013-9-28 15:42:18 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
思路就是这样的:
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Window_SquareBattleActorMessge
  3. #------------------------------------------------------------------------------
  4. #  显示角色信息的类,归到窗口类为了方便。
  5. #==============================================================================
  6.  
  7. class Window_SquareBattleActorMessge < Window_Base
  8.   #--------------------------------------------------------------------------
  9.   # ● 初始化窗口
  10.   #--------------------------------------------------------------------------
  11.   def initialize
  12.     super(0, 480 - 32, 160, 32)
  13.     self.contents = Bitmap.new(width - 32, height - 32)
  14.     self.opacity = 0
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     # 角色の绘制
  23.     if $game_party.actors.size != 0
  24.       @x1 = 16
  25.       @x2 = 176
  26.       @x3 = 332
  27.       @x4 = 496
  28.       @ay = 0
  29.       # 一号角色
  30.       if $game_party.actors.include?($game_actors[1])
  31.         draw_actor_head(1, @x1, @ay)
  32.         @a1hp = 1.000000 / $game_actors[1].maxhp * $game_actors[1].hp
  33.         @a1hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  34.         @a1hpzao.x = @x1 + 64
  35.         @a1hpzao.y = @ay + 16
  36.         @a1hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
  37.         @a1hptiao.x = @a1xuetiao.x + 1
  38.         @a1hptiao.y = @a1xuetiao.y + 1
  39.         @a1hptiao.zoom_x = @a1hp
  40.         @a1sp = 1.000000 / $game_actors[1].maxsp * $game_actors[1].sp
  41.         @a1spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  42.         @a1spzao.x = @x1 + 64
  43.         @a1spzao.y = @ay + 32
  44.         @a1sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
  45.         @a1sptiao.x = @a1xuetiao.x + 1
  46.         @a1sptiao.y = @a1xuetiao.y + 1
  47.         @a1sptiao.zoom_x = @a1sp
  48.         @a1mor = 1.000000 / 100 * $game_actors[1].mor
  49.         @a1morzao = Bitmap.new("Graphics/Pictures/mor槽")
  50.         @a1morzao.x = @x1 + 64
  51.         @a1morzao.y = @ay + 48
  52.         @a1mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
  53.         @a1mortiao.x = @a1xuetiao.x + 1
  54.         @a1mortiao.y = @a1xuetiao.y + 1
  55.         @a1mortiao.zoom_x = @a1mor
  56.       end
  57.       # 二号角色
  58.       if $game_party.actors.include?($game_actors[2])
  59.         if $game_party.actors.include?($game_actors[1])
  60.           draw_actor_head(2, @x2, @ay)
  61.         else
  62.           draw_actor_head(2, @x1, @ay)
  63.         end
  64.         @a2hp = 1.000000 / $game_actors[2].maxhp * $game_actors[2].hp
  65.         @a2hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  66.         if $game_party.actors.include?($game_actors[1])
  67.           @a2hpzao.x = @x2 + 64
  68.         else
  69.           @a2hptiao.x = @x1 + 64
  70.         end
  71.         @a2hpzao.y = @ay + 16
  72.         @a2hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
  73.         @a2hptiao.x = @a1xuetiao.x + 1
  74.         @a2hptiao.y = @a1xuetiao.y + 1
  75.         @a2hptiao.zoom_x = @a1hp
  76.         @a2sp = 1.000000 / $game_actors[2].maxsp * $game_actors[2].sp
  77.         @a2spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  78.         if $game_party.actors.include?($game_actors[1])
  79.           @a2spzao.x = @x2 + 64
  80.         else
  81.           @a2spzao.x = @x1 + 64
  82.         end
  83.         @a2spzao.y = @ay + 32
  84.         @a2sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
  85.         @a2sptiao.x = @a1xuetiao.x + 1
  86.         @a2sptiao.y = @a1xuetiao.y + 1
  87.         @a2sptiao.zoom_x = @a1sp
  88.         @a2mor = 1.000000 / 100 * $game_actors[2].mor
  89.         @a2morzao = Bitmap.new("Graphics/Pictures/mor槽")
  90.         if $game_party.actors.include?($game_actors[1])
  91.           @a2morzao.x = @x2 + 64
  92.         else
  93.           @a2morzao.x = @x1 + 64
  94.         end
  95.         @a2morzao.y = @ay + 48
  96.         @a2mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
  97.         @a2mortiao.x = @a1xuetiao.x + 1
  98.         @a2mortiao.y = @a1xuetiao.y + 1
  99.         @a2mortiao.zoom_x = @a1mor
  100.       end
  101.       # 三号角色
  102.       if $game_party.actors.include?($game_actors[3])
  103.         if $game_party.actors.include?($game_actors[1])
  104.           if $game_party.actors.include?($game_actors[2])
  105.             draw_actor_head(3, @x3, @ay)
  106.           else
  107.             draw_actor_head(3, @x2, @ay)
  108.           end
  109.         elsif $game_party.actors.include?($game_actors[2])
  110.           draw_actor_head(3, @x2, @ay)
  111.         else
  112.           draw_actor_head(3, @x1, @ay)
  113.         end
  114.         @a3hp = 1.000000 / $game_actors[3].maxhp * $game_actors[3].hp
  115.         @a3hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  116.         @a3hpzao.y = @ay + 16
  117.         @a3hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
  118.         @a3hptiao.x = @a1xuetiao.x + 1
  119.         @a3hptiao.y = @a1xuetiao.y + 1
  120.         @a3hptiao.zoom_x = @a1hp
  121.         @a3sp = 1.000000 / $game_actors[3].maxsp * $game_actors[3].sp
  122.         @a3spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  123.         @a3spzao.y = @ay + 32
  124.         @a3sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
  125.         @a3sptiao.x = @a1xuetiao.x + 1
  126.         @a3sptiao.y = @a1xuetiao.y + 1
  127.         @a3sptiao.zoom_x = @a1sp
  128.         @a3mor = 1.000000 / 100 * $game_actors[3].mor
  129.         @a3morzao = Bitmap.new("Graphics/Pictures/mor槽")
  130.         @a3morzao.y = @ay + 48
  131.         @a3mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
  132.         @a3mortiao.x = @a1xuetiao.x + 1
  133.         @a3mortiao.y = @a1xuetiao.y + 1
  134.         @a3mortiao.zoom_x = @a1mor
  135.         if $game_party.actors.include?($game_actors[1])
  136.           if $game_party.actors.include?($game_actors[2])
  137.             @a3hpzao.x = @x3 + 64
  138.             @a3spzao.x = @x3 + 64
  139.             @a3morzao.x = @x3 + 64
  140.           else
  141.             @a3hpzao.x = @x2 + 64
  142.             @a3spzao.x = @x2 + 64
  143.             @a3morzao.x = @x2 + 64
  144.           end
  145.         elsif $game_party.actors.include?($game_actors[2])
  146.           @a3hpzao.x = @x2 + 64
  147.           @a3spzao.x = @x2 + 64
  148.           @a3morzao.x = @x2 + 64
  149.         else
  150.           @a3hpzao.x = @x1 + 64
  151.           @a3spzao.x = @x1 + 64
  152.           @a3morzao.x = @x1 + 64
  153.         end
  154.       end
  155.       # 四号角色
  156.       if $game_party.actors.include?($game_actors[4])
  157.         if $game_party.actors.include?($game_actors[1])
  158.           if $game_party.actors.include?($game_actors[2])
  159.             if $game_party.actors.include?($game_actors[3])
  160.               draw_actor_head(4, @x4, @ay)
  161.             else
  162.               draw_actor_head(4, @x3, @ay)
  163.             end
  164.           elsif $game_party.actors.include?($game_actors[3])
  165.             draw_actor_head(4, @x3, @ay)
  166.           else
  167.             draw_actor_head(4, @x2, @ay)
  168.           end
  169.         elsif $game_party.actors.include?($game_actors[2])
  170.           if $game_party.actors.include?($game_actors[3])
  171.             draw_actor_head(4, @x3, @ay)
  172.           else
  173.             draw_actor_head(4, @x2, @ay)
  174.           end
  175.         elsif $game_party.actors.include?($game_actors[3])
  176.           draw_actor_head(4, @x2, @ay)
  177.         else
  178.           draw_actor_head(4, @x1, @ay)
  179.         end
  180.         @a4hp = 1.000000 / $game_actors[4].maxhp * $game_actors[4].hp
  181.         @a4hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  182.         @a4hpzao.y = @ay + 16
  183.         @a4hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
  184.         @a4hptiao.x = @a1xuetiao.x + 1
  185.         @a4hptiao.y = @a1xuetiao.y + 1
  186.         @a4hptiao.zoom_x = @a1hp
  187.         @a4sp = 1.000000 / $game_actors[4].maxsp * $game_actors[4].sp
  188.         @a4spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
  189.         @a4spzao.y = @ay + 32
  190.         @a4sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
  191.         @a4sptiao.x = @a1xuetiao.x + 1
  192.         @a4sptiao.y = @a1xuetiao.y + 1
  193.         @a4sptiao.zoom_x = @a1sp
  194.         @a4mor = 1.000000 / 100 * $game_actors[4].mor
  195.         @a4morzao = Bitmap.new("Graphics/Pictures/mor槽")
  196.         @a4morzao.y = @ay + 48
  197.         @a4mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
  198.         @a4mortiao.x = @a1xuetiao.x + 1
  199.         @a4mortiao.y = @a1xuetiao.y + 1
  200.         @a4mortiao.zoom_x = @a1mor
  201.         if $game_party.actors.include?($game_actors[1])
  202.           if $game_party.actors.include?($game_actors[2])
  203.             if $game_party.actors.include?($game_actors[3])
  204.               @a4hpzao.x = @x4 + 64
  205.               @a4spzao.x = @x4 + 64
  206.               @a4morzao.x = @x4 + 64
  207.             else
  208.               @a4hpzao.x = @x3 + 64
  209.               @a4spzao.x = @x3 + 64
  210.               @a4morzao.x = @x3 + 64
  211.             end
  212.           elsif $game_party.actors.include?($game_actors[3])
  213.             @a4hpzao.x = @x3 + 64
  214.             @a4spzao.x = @x3 + 64
  215.             @a4morzao.x = @x3 + 64
  216.           else
  217.             @a4hpzao.x = @x2 + 64
  218.             @a4spzao.x = @x2 + 64
  219.             @a4morzao.x = @x2 + 64
  220.           end
  221.         elsif $game_party.actors.include?($game_actors[2])
  222.           if $game_party.actors.include?($game_actors[3])
  223.             @a4hpzao.x = @x3 + 64
  224.             @a4spzao.x = @x3 + 64
  225.             @a4morzao.x = @x3 + 64
  226.           else
  227.             @a4hpzao.x = @x2 + 64
  228.             @a4spzao.x = @x2 + 64
  229.             @a4morzao.x = @x2 + 64
  230.           end
  231.         elsif $game_party.actors.include?($game_actors[3])
  232.           @a4hpzao.x = @x2 + 64
  233.           @a4spzao.x = @x2 + 64
  234.           @a4morzao.x = @x2 + 64
  235.         else
  236.           @a4hpzao.x = @x1 + 64
  237.           @a4spzao.x = @x1 + 64
  238.           @a4morzao.x = @x1 + 64
  239.         end
  240.       end
  241.     end
  242.   end
  243.   #--------------------------------------------------------------------------
  244.   # ● 刷新画面
  245.   #--------------------------------------------------------------------------
  246.   def update
  247.     super
  248.     if @a1hptiao != 1.000000 / $game_actors[1].maxhp * $game_actors[1].hp or @a2hptiao != 1.000000 / $game_actors[2].maxhp * $game_actors[2].hp or @a3hptiao != 1.000000 / $game_actors[3].maxhp * $game_actors[3].hp or @a4hptiao != 1.000000 / $game_actors[4].maxhp * $game_actors[4].hp or @a1sptiao != 1.000000 / $game_actors[1].maxsp * $game_actors[1].sp or @a2sptiao != 1.000000 / $game_actors[2].maxsp * $game_actors[2].sp or @a3sptiao != 1.000000 / $game_actors[3].maxsp * $game_actors[3].sp or @a4sptiao != 1.000000 / $game_actors[4].maxsp * $game_actors[4].sp or @a1mortiao != 1.000000 / 100 * $game_actors[1].mor or @a2mortiao != 1.000000 / 100 * $game_actors[2].mor or @a3mortiao != 1.000000 / 100 * $game_actors[3].mor or @a4mortiao != 1.000000 / 100 * $game_actors[4].mor
  249.       refresh
  250.     end
  251.   end
  252. end
总是出错,还不显示.
MOR我已经定义了,ZTBS用的。
draw_actor_head方法:
RUBY 代码复制
  1. #--------------------------------------------------------------------------
  2.   # ● 头像的描绘
  3.   #     actor : 角色
  4.   #     x     : 描画目标 X 坐标
  5.   #     y     : 描画目标 Y 坐标
  6.   #--------------------------------------------------------------------------
  7.   def draw_actor_head(actor, x, y)
  8.     bitmap = RPG::Cache.picture(actor.character_name + "_h", actor.character_hue)
  9.     src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  10.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  11.   end

素材库:
素材库.zip (67.83 KB, 下载次数: 32)
呃,发糖贴好冷清呀!

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

14
发表于 2013-10-4 16:11:24 | 只看该作者
876加几 发表于 2013-10-4 14:41
修改了Scene_Status跟着遭殃。
就是在地图上显示角色的头像、HP条、SP条、CP条。 ...

那就复制一个来改···
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv1.梦旅人

矿工

梦石
0
星屑
134
在线时间
898 小时
注册时间
2012-10-5
帖子
1535
13
 楼主| 发表于 2013-10-4 14:41:14 | 只看该作者
chd114 发表于 2013-10-4 14:36
直接把默认的Window_Staus修改了不就可以用了···

修改了Scene_Status跟着遭殃。
就是在地图上显示角色的头像、HP条、SP条、CP条。
呃,发糖贴好冷清呀!
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

12
发表于 2013-10-4 14:36:50 | 只看该作者
直接把默认的Window_Staus修改了不就可以用了···
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复 支持 反对

使用道具 举报

Lv1.梦旅人

矿工

梦石
0
星屑
134
在线时间
898 小时
注册时间
2012-10-5
帖子
1535
11
 楼主| 发表于 2013-10-3 20:16:37 | 只看该作者
恋′挂机 发表于 2013-10-3 20:13
Y坐标过大,如果调小还是不显示,就是
draw_actor_head
carol3_draw_hp_bar

修改Y后,刷新还总是出错……
draw_actor_head在菜单里正确,到这里就不对了……
那些全都是正确的……

点评

@恋′挂机 制作进度很多了,传不上去……我的是RGSS102J的……单脚本就有217KB大小……  发表于 2013-10-3 20:24
给个工程吧  发表于 2013-10-3 20:17
呃,发糖贴好冷清呀!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

薄凉看客

梦石
0
星屑
50
在线时间
1269 小时
注册时间
2010-6-20
帖子
1316
10
发表于 2013-10-3 20:13:11 | 只看该作者
Y坐标过大,如果调小还是不显示,就是
draw_actor_head
carol3_draw_hp_bar
carol3_draw_sp_bar
carol3_draw_cp_bar
的问题了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

矿工

梦石
0
星屑
134
在线时间
898 小时
注册时间
2012-10-5
帖子
1535
9
 楼主| 发表于 2013-10-3 20:08:12 | 只看该作者
恋′挂机 发表于 2013-9-30 18:12
用你的其实也可以,很麻烦
(先要除错,又要一个一个
判断非常是麻烦)
  1. #==============================================================================
  2. # ■ Window_SquareBattleActorMessge
  3. #------------------------------------------------------------------------------
  4. #  显示角色信息的类,归到窗口类为了方便。
  5. #==============================================================================

  6. class Window_SquareBattleActorMessge < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化窗口
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 416, 160, 64)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     self.opacity = 0
  14.     refresh
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ● 刷新
  18.   #--------------------------------------------------------------------------
  19.   def refresh
  20.     self.contents.clear
  21.     # 角色の绘制
  22.     for i in 0...$game_party.actors.size
  23.       x = 160 * i
  24.       y = 16
  25.       actor = $game_party.actors[i]
  26.       draw_actor_head(actor, x, y)
  27.       carol3_draw_hp_bar(actor, x + 64, y)
  28.       carol3_draw_sp_bar(actor, x + 64, y + 16)
  29.       carol3_draw_cp_bar(actor, x + 64, y + 32)
  30.     end
  31.   end
  32. end
复制代码
还是不行,不能显示
呃,发糖贴好冷清呀!
回复 支持 反对

使用道具 举报

Lv3.寻梦者

○赛

梦石
0
星屑
1249
在线时间
1276 小时
注册时间
2013-1-22
帖子
2246

贵宾

8
发表于 2013-10-2 10:55:24 | 只看该作者
额额啊啊。。。。
LZ可不可以用普通代码框发,我电脑复制不了你的代码框.....
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

梦石
0
星屑
9532
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

7
发表于 2013-9-30 19:05:28 | 只看该作者
首先先吐槽一下楼主的代码,基本上可以丢掉重写了,思路根本不对,尤其是分别刻画角色的各种属性,一个个穷举,不但代码复杂,而且很容易出错。建议楼主多研究一下RGSS的代码结构,否则由于理解不深刻,代码根本不能运行。
比如说13行创建bitmap对象,楼主用height-32代表高度,但是height的含义是窗口的高度,你在前面定义窗口高度也是32,那么bitmap的高度是32-32=0,RGSS不能创造大小为0的位图,因此导致失败。
再比如说31行draw_actor_head(1,x,y),你定义draw_actor_head的第一个参数是Game_Actor类型,代入的参数却是Fixnum类的1,这样的错误希望楼主注意。
还有就是混淆bitmap类和sprite类的概念,bitmap类没有定义x坐标这样一个属性,所以bitmap.x(bitmap是Bitmap类的一个实例)这样的指令是非法的,而sprite类却有x坐标这一个属性。所以对x坐标进行访问的是Sprite类而不是Bitmap类。
说了这么多,可能有点不太中听,不过希望楼主能认真理解这些代码的含义,这样才能写出自己想要的脚本。


下面是我自己弄的一个脚本,功能跟你的差不多,就是在地图上显示人物的各种信息。
那个CP是RTBS的东西,我没那个系统,但是楼主依然能看看是不是这个效果。

另外,楼主想用图片来描绘HP和SP,但是楼主提供的图片和RGSS能创建的实心矩形没有丝毫差别,所以我没有用楼主的“各种槽”图片,因为在系统能够创建一模一样的。

下面是代码
  1. #==============================================================================
  2. # ■ Window_SquareBattleActorMessge
  3. #------------------------------------------------------------------------------
  4. #  显示角色信息的类,归到窗口类为了方便。
  5. #==============================================================================
  6. class Window_MapStatus < Window_Base  
  7. #--------------------------------------------------------------------------  
  8. # ● 初始化窗口  
  9. #--------------------------------------------------------------------------
  10. def initialize   
  11.   super(0, 480 - 64, 640, 64)   
  12.   self.contents = Bitmap.new(width - 32, height - 32)   
  13.   refresh  
  14. end  
  15. #--------------------------------------------------------------------------  
  16. # ● 刷新  
  17. #--------------------------------------------------------------------------  
  18. def refresh
  19.   self.contents.clear
  20.   for i in 0...$game_party.actors.size
  21.     x = i * 152
  22.     y = 0
  23.     actor = $game_party.actors[i]
  24.     draw_actor_head(actor,x, y)
  25.     draw_actor_hp_bar(actor,x + 40, y)
  26.     draw_actor_sp_bar(actor,x + 40, y + 11)
  27.     draw_actor_cp_bar(actor,x + 40, y + 22)
  28.   end
  29. end
  30. end

  31. class Window_Base < Window
  32.   def draw_actor_hp_bar(actor, x, y, w = 96)
  33.     self.contents.fill_rect(x, y, w, 10, Color.new(255,255,255,255))
  34.     self.contents.fill_rect(x+1, y+1, w-2, 8, Color.new(0,0,0,255))
  35.     w1 = (w-2) * actor.hp / actor.maxhp
  36.     self.contents.fill_rect(x+1, y+1, w1, 8, Color.new(255,0,0,255))
  37.   end
  38.   def draw_actor_sp_bar(actor, x, y, w = 96)
  39.     self.contents.fill_rect(x, y, w, 10, Color.new(255,255,255,255))
  40.     self.contents.fill_rect(x+1, y+1, w-2, 8, Color.new(0,0,0,255))
  41.     w1 = (w-2) * actor.sp / actor.maxsp
  42.     self.contents.fill_rect(x+1, y+1, w1, 8, Color.new(0,0,255,255))
  43.   end
  44.   def draw_actor_cp_bar(actor, x, y, w = 96)
  45.     self.contents.fill_rect(x, y, w, 10, Color.new(255,255,255,255))
  46.     self.contents.fill_rect(x+1, y+1, w-2, 8, Color.new(0,0,0,255))
  47.     w1 = (w-2) * actor.mor / 100
  48.     self.contents.fill_rect(x+1, y+1, w1, 8, Color.new(0,255,0,255))
  49.   end
  50.   #--------------------------------------------------------------------------  
  51.   # ● 头像的描绘  
  52.   #     actor : 角色  
  53.   #     x     : 描画目标 X 坐标  
  54.   #     y     : 描画目标 Y 坐标  
  55.   #--------------------------------------------------------------------------  
  56.   def draw_actor_head(actor, x, y)   
  57.     bitmap = RPG::Cache.picture(actor.character_name + "_h")   
  58.     src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)   
  59.     self.contents.blt(x + 4, y , bitmap, src_rect)  
  60.   end
  61. end

  62. class Scene_Map
  63.   alias old_main main
  64.   def main
  65.     @status_window = Window_MapStatus.new
  66.     old_main
  67.     @status_window.dispose
  68.   end
  69.   alias old_update update
  70.   def update
  71.     @status_window.update
  72.     @status_window.refresh
  73.     old_update
  74.   end
  75. end
复制代码

评分

参与人数 2星屑 +65 收起 理由
myownroc + 60 塞糖
无脑之人 + 5 节操满满

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-30 05:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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