赞 | 1 |
VIP | 255 |
好人卡 | 52 |
积分 | 1 |
经验 | 77416 |
最后登录 | 2016-1-18 |
在线时间 | 1269 小时 |
Lv1.梦旅人 薄凉看客
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1269 小时
- 注册时间
- 2010-6-20
- 帖子
- 1316
|
本帖最后由 恋′挂机 于 2013-10-5 19:23 编辑
@xxxx1 = "123"
改为@xxxx1 = "123"- class Game_Temp
- attr_accessor :xxxx1
- attr_accessor :xxxx2
- attr_accessor :xxxx3
- alias initialize_old initialize
- def initialize
- [url=home.php?mod=space&uid=349002]@xxxx1[/url] = "123"
- @xxxx2 = "234"
- @xxxx3 = "345"
- initialize_old
- end
- end
- array = [$game_temp.xxxx1, $game_temp.xxxx2, $game_temp.xxxx3]
- p array # => ["123", "234", "345"]
- $game_temp.xxxx1 = "000"
- $game_temp.xxxx2 = "111"
- $game_temp.xxxx3 = "222"
- array = [$game_temp.xxxx1, $game_temp.xxxx2, $game_temp.xxxx3]
- p array # => ["000", "111", "222"]
- # 场景中
- # (命令窗口)字符123,234,345
- class Game_Temp
- attr_accessor :xxxx1
- attr_accessor :xxxx2
- attr_accessor :xxxx3
- alias initialize_old initialize
- def initialize
- @xxxx1 = "123"
- @xxxx2 = "234"
- @xxxx3 = "345"
- initialize_old
- end
- end
- class Xxxx
- def main
- array = [$game_temp.xxxx1, $game_temp.xxxx2, $game_temp.xxxx3]
- @command = Window_Command.new(160, array)
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @command.dispose
- end
- def update
- @command.update
- if @command.active
- update_command
- return
- end
- end
- end
- # -------
- $game_temp.xxxx1 = "000"
- $game_temp.xxxx2 = "111"
- $game_temp.xxxx3 = "222"
- # 再次 $scene = xxx
- $scene = Xxxx.new
- # (命令窗口)字符000,111,222
复制代码 |
评分
-
查看全部评分
|