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

Project1

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

[已经过期] 求助。这个阴影脚本该如何使用

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
274 小时
注册时间
2014-2-22
帖子
335
跳转到指定楼层
1
发表于 2014-10-12 22:54:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  1. #======================================================================
  2. # 脚本来自www.66rpg.com,使用请保留此信息
  3. # 作者:SailCat;升级:柳柳;最后升级日期:2006年4月30日
  4. #======================================================================
  5. class Bitmap
  6.   unless $OK
  7.     alias sailcat_draw_text draw_text
  8.     def draw_text(p1, p2, p3 = 0, p4 = 3, p5 = nil, p6 = 0, p7 = 3, p8 = nil)
  9.       case p1
  10.       when Numeric
  11.         x = p1
  12.         y = p2
  13.         width = p3
  14.         height = p4
  15.         text = p5
  16.         align = p6
  17.         shadow_direction = p7
  18.         shadow_color = p8
  19.         if shadow_color.nil?
  20.           shadow_color = Color.new(0, 0, 0, self.font.color.alpha * 0.99)
  21.         end
  22.       when Rect
  23.         x = p1.x
  24.         y = p1.y
  25.         width = p1.width
  26.         height = p1.height
  27.         text = p2
  28.         align = p3
  29.         shadow_direction = p4
  30.         shadow_color = p5
  31.         if shadow_color.nil?
  32.           shadow_color = Color.new(0, 0, 0, self.font.color.alpha * 0.99)
  33.         end
  34.       end
  35.       color_temp = self.font.color.clone
  36.       if shadow_direction != 0
  37.         self.font.color = shadow_color
  38.         case shadow_direction
  39.         when 1
  40.          sailcat_draw_text(x-1, y+1, width, height, text, align)
  41.         when 3
  42.          sailcat_draw_text(x+1, y+1, width, height, text, align)
  43.         when 7
  44.          sailcat_draw_text(x-1, y-1, width, height, text, align)
  45.         when 9
  46.          sailcat_draw_text(x+1, y-1, width, height, text, align)
  47.         end
  48.         self.font.color = color_temp
  49.       end
  50.       $OK = true
  51.       sailcat_draw_text(x, y, width, height, text, align)
  52.     end
  53.   end
  54. end
复制代码

Lv2.观梦者

故九江太守

梦石
0
星屑
453
在线时间
2135 小时
注册时间
2012-12-5
帖子
4445
2
发表于 2014-10-13 12:50:30 | 只看该作者
main前面插入

点评

我测试可以,你全局搜索一下class Bitmap  发表于 2014-10-13 21:13
就是插入MAIN前没用我才来问的啊。。。  发表于 2014-10-13 18:41
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-4-19 10:50

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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