本帖最后由 芯☆淡茹水 于 2015-2-9 10:40 编辑
1号事件,1号开关。1号事件用暂时消失就无效,其暂时消失标志已与1号开关关联。
#============================================================================== class Game_Event < Game_Character #-------------------------------------------------------------------------- def initialize(map_id, event) super() @map_id = map_id @event = event @id = @event.id @erased = @id == 1 ? $game_switches[1] : false @starting = false @through = true # 初期位置的移动 moveto(@event.x, @event.y) refresh end #-------------------------------------------------------------------------- alias add_update_xdrs update def update add_update_xdrs if @id == 1 if @old_switch != $game_switches[1] @old_switch = @erased = $game_switches[1] refresh end end end end #==============================================================================
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
def initialize(map_id, event)
super()
@map_id = map_id
@event = event
@id = @event.id
@erased = @id == 1 ? $game_switches[1] : false
@starting = false
@through = true
# 初期位置的移动
moveto(@event.x, @event.y)
refresh
end
#--------------------------------------------------------------------------
alias add_update_xdrs update
def update
add_update_xdrs
if @id == 1
if @old_switch != $game_switches[1]
@old_switch = @erased = $game_switches[1]
refresh
end
end
end
end
#==============================================================================
|