Project1
标题: 下面这两段脚本能合并在一起么? [打印本页]
作者: 幻耶 时间: 2011-10-12 14:38
标题: 下面这两段脚本能合并在一起么?
- def initialize(viewport, battler = nil)
- super(viewport)
- @battler = battler
- @battler_visible = false
- @flash_shake_switch = true
- end
复制代码- alias hzhj_old_initialize initialize
- def initialize(*args)
- hzhj_old_initialize(*args)
- if not @battler.nil?
- self.x = @battler.screen_x
- self.y = @battler.screen_y
- self.z = @battler.screen_y
- @hzhj_play_jump = true
- end
- @hzhj_x = self.x
- @hzhj_y = self.y
- end
复制代码