赞 | 5 |
VIP | 71 |
好人卡 | 22 |
积分 | 6 |
经验 | 32145 |
最后登录 | 2013-8-9 |
在线时间 | 184 小时 |
Lv2.观梦者 天仙
- 梦石
- 0
- 星屑
- 625
- 在线时间
- 184 小时
- 注册时间
- 2008-4-15
- 帖子
- 5023
|
事件里使用脚本: $scene = Scene_Actors.new 调用- class Window_Actors < Window_Selectable
- def initialize
- super(0, 0, 136, 416)
- @index = 0
- @item_max = 1
- @message_window = Window_Message.new
- refresh
- end
- def refresh
- @actor_ids = []
- for i in 1...$data_actors.size
- @actor_ids.push(i) unless $game_party.members.include?($game_actors[i])
- end
- self.height = WLH * @actor_ids.size + 32
- create_contents
- self.height = 416 if self.height > 416
- @item_max = @actor_ids.size
- for i in 0...@actor_ids.size
- y = WLH * i
- self.contents.draw_text(4, y, 108, WLH, $data_actors[@actor_ids[i]].name)
- end
- end
- def update
- @message_window.update
- if Input.trigger?(Input::C)
- if $game_party.members.size < 4
- Sound.play_decision
- $game_party.add_actor(@actor_ids[@index])
- @actor_ids.delete_at(@index)
- refresh
- else
- Sound.play_buzzer
- $game_message.texts.push("\\c[10]队伍已满")
- end
- elsif Input.trigger?(Input::B)
- $scene = Scene_Map.new
- end
- super
- end
- def actor
- return @actor_ids[index]
- end
- def dispose
- super
- @message_window.dispose
- end
- end
- class Scene_Actors < Scene_Base
- def start
- @window_actors = Window_Actors.new
- create_menu_background
- @window_actors.active = true
- end
- def update
- super
- update_menu_background
- @window_actors.update
- end
- def terminate
- dispose_menu_background
- @window_actors.dispose
- end
- end
复制代码 |
|