赞 | 0 |
VIP | 133 |
好人卡 | 5 |
积分 | 1 |
经验 | 15036 |
最后登录 | 2017-9-12 |
在线时间 | 190 小时 |
Lv1.梦旅人 彩色的银子
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 190 小时
- 注册时间
- 2006-6-13
- 帖子
- 1361
|
-______-拿出来后大概就素酱紫``
- class Game_Event < Game_Character
- attr_reader :variablesID
- alias :ini :initialize
- def initialize(map_id, event)
- ini(map_id, event)
- @variablesID = @event.name[","].nil? ? 0 : @event.name.split(/,/)[1].to_i
- end
- end
- class Game_Player
- def variablesID
- return 0
- end
- end
- class Sprite_Character < RPG::Sprite
- alias :ini :initialize
- alias :oldupdate :update
- alias :olddispose :dispose
- def initialize(viewport, character = nil)
- @character = character
- @variables = Sprite.new(viewport)
- @variables.z = 999
- ini(viewport, character)
- @oldstr = ""
- end
- def dispose
- olddispose
- @variables.dispose
- end
- def update
- oldupdate
- if @oldstr != $game_variables[@character.variablesID].to_s
- @variables.bitmap = Bitmap.new(@cw, 16) if @variables.bitmap.nil?
- @variables.bitmap.clear
- @variables.bitmap.font.size = 16
- if @character.variablesID != 0
- @variables.bitmap.draw_text(@variables.bitmap.rect, \
- $game_variables[@character.variablesID].to_s,1)
- end
- @oldstr = $game_variables[@character.variablesID].to_s
- end
- @variables.x = self.x
- @variables.y = self.y - 16
- @variables.ox = self.ox
- @variables.oy = self.oy
- end
-
- end
复制代码 |
|