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

Project1

 找回密码
 注册会员
搜索

请问这两个脚本怎样兼容

查看数: 2250 | 评论数: 3 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2012-7-26 21:39

正文摘要:

这个是只能卖或只能买的脚本 class Game_System   attr :shop_type,true   alias db initialize   def initialize     @shop_type = 0     db   end ...

回复

活着的小C 发表于 2012-8-1 03:20:40
不愧是小雨 膜拜ing
z121310 发表于 2012-7-27 16:25:12
七夕小雨 发表于 2012-7-27 15:26
ShopCommand有部分被重定义了啊-。-

可以将第二个

谢了,不过BUG我已查出,只要修改坐标即可。
七夕小雨 发表于 2012-7-26 21:39:25
ShopCommand有部分被重定义了啊-。-

可以将第二个
ShopCommand 的draw_item改为第一个脚本的绘制方法
  1. def draw_item(index)
  2.     if $game_system.shop_type == 1 and index == 0
  3.       self.contents.font.color = disabled_color
  4.     end
  5.     if $game_system.shop_type == 2 and index == 1
  6.       self.contents.font.color = disabled_color
  7.     end
  8.     x = 4 + index * 160
  9.     self.contents.draw_text(x, 0, 128, 32, @commands[index])
  10.     self.contents.font.color = normal_color
  11.   end
  12. end
复制代码
-。-试试看吧~~应该是比较初级的脚本不兼容问题


‘‘──七夕小雨于2012-7-27 15:26补充以下内容:

ShopCommand有部分被重定义了啊-。-

可以将第二个
ShopCommand 的draw_item改为第一个脚本的绘制方法
  1. def draw_item(index)
  2.     if $game_system.shop_type == 1 and index == 0
  3.       self.contents.font.color = disabled_color
  4.     end
  5.     if $game_system.shop_type == 2 and index == 1
  6.       self.contents.font.color = disabled_color
  7.     end
  8.     x = 4 + index * 160
  9.     self.contents.draw_text(x, 0, 128, 32, @commands[index])
  10.     self.contents.font.color = normal_color
  11.   end
  12. end
复制代码
-。-试试看吧~~应该是比较初级的脚本不兼容问题
’’
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-5-6 14:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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