查看: 2364|回复: 16

行走图改成头像

  [复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-28
回帖
51
发表于 2008-5-28 21:02:33 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-5-28 21:04:00 | 显示全部楼层
66加强菜单的提取:

  1. #==============================================================================
  2. # ■ Window_MenuStatus
  3. #------------------------------------------------------------------------------
  4. #  显示菜单画面和同伴状态的窗口。
  5. #==============================================================================

  6. class Window_MenuStatus < Window_Selectable
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化目标
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 480, 480)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     refresh
  14.     self.active = false
  15.     self.index = -1
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     @item_max = $game_party.actors.size
  23.     for i in 0...$game_party.actors.size
  24.       x = 108
  25.       y = i * 116
  26.       actor = $game_party.actors[i]
  27.       testname = actor.battler_name+"_f.png"
  28.       if $加密 == true
  29.         bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  30.         src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
  31.         self.contents.blt(0, y, bitmap, src_rect)
  32.         draw_actor_name(actor, x, y)
  33.         draw_actor_class(actor, x + 200, y)
  34.         draw_actor_level(actor, x, y + 32)
  35.         draw_actor_state(actor, x + 90, y + 32)
  36.         draw_actor_exp(actor, x, y + 64,180)
  37.         draw_actor_hp(actor, x + 200, y + 32)
  38.         draw_actor_sp(actor, x + 200, y + 64)
  39.       else         
  40.         if FileTest.exist?("Graphics/battlers/#{testname}")
  41.           bitmap=Bitmap.new("Graphics/battlers/#{testname}")
  42.           src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
  43.           self.contents.blt(0, y, bitmap, src_rect)
  44.         else
  45.           draw_actor_graphic(actor, x - 60, y + 80)
  46.         end
  47.         draw_actor_name(actor, x, y)
  48.         draw_actor_class(actor, x + 200, y)
  49.         draw_actor_level(actor, x, y + 32)
  50.         draw_actor_state(actor, x + 90, y + 32)
  51.         draw_actor_exp(actor, x, y + 64,180)
  52.         draw_actor_hp(actor, x + 200, y + 32)
  53.         draw_actor_sp(actor, x + 200, y + 64)
  54.       end
  55.     end
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 刷新光标矩形
  59.   #--------------------------------------------------------------------------
  60.   def update_cursor_rect
  61.     if @index < 0
  62.       self.cursor_rect.empty
  63.     else
  64.       self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
  65.     end
  66.   end
  67. end
复制代码


头像文件命名 :  角色名字_f.png
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~

《天空之城 —— 破碎的命运》
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-28
回帖
51
 楼主| 发表于 2008-5-28 21:05:15 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-5-28 21:08:14 | 显示全部楼层
把 文件取名 为:角色_f.png 即可。

《天空之城 —— 破碎的命运》
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-24
回帖
333
发表于 2008-5-28 21:11:24 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-28
回帖
51
 楼主| 发表于 2008-5-28 21:11:51 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

梦石
0
星屑
50
在线时间
129 小时
注册时间
2007-12-15
回帖
1478
发表于 2008-5-28 21:12:18 | 显示全部楼层
楼主的id真特殊.
Orz!
回复

使用道具 举报

神隐的主犯

梦石
0
星屑
553
在线时间
271 小时
注册时间
2008-2-22
回帖
7534

贵宾

发表于 2008-5-28 21:12:28 | 显示全部楼层
Graphics/battlers/
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-24
回帖
333
发表于 2008-5-28 21:15:19 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-28
回帖
51
 楼主| 发表于 2008-5-28 21:16:12 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部