赞 | 7 |
VIP | 20 |
好人卡 | 0 |
积分 | 16 |
经验 | 11472 |
最后登录 | 2024-7-10 |
在线时间 | 526 小时 |
Lv3.寻梦者 宛若
- 梦石
- 0
- 星屑
- 1568
- 在线时间
- 526 小时
- 注册时间
- 2007-8-19
- 帖子
- 1493
|
- class Game_System
- attr :shop_type,true
- alias db initialize
- def initialize
- @shop_type = 0
- db
- end
- end
- class Window_ShopCommand
- def draw_item(index)
- if $game_system.shop_type == 1 and index == 0
- self.contents.font.color = disabled_color
- end
- if $game_system.shop_type == 2 and index == 1
- self.contents.font.color = disabled_color
- end
- x = 4 + index * 160
- self.contents.draw_text(x, 0, 128, 32, @commands[index])
- self.contents.font.color = normal_color
- end
- end
- class Scene_Shop
- alias daiboy_update_command update_command
- def update_command
- if Input.trigger?(Input::C)
- # 命令窗口光标位置分支
- case @command_window.index
- when 0 # 购买
- $game_system.se_play($data_system.buzzer_se) if $game_system.shop_type == 1
- return if $game_system.shop_type == 1
- when 1 # 卖出
- $game_system.se_play($data_system.buzzer_se) if $game_system.shop_type == 2
- return if $game_system.shop_type == 2
- end
- end
- daiboy_update_command
- end
- end
复制代码 使用商店处理之前插入脚本 $game_system.shop_type = X
X = 0 买卖均可
X = 1 仅卖
X = 2 仅买 |
评分
-
查看全部评分
|