Initial import

This commit is contained in:
2014-04-23 21:59:50 -07:00
commit 2eff2aa3b9
141 changed files with 20827 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
#==============================================================================
# ** Game_CommonEvent
#------------------------------------------------------------------------------
# This class handles common events. It includes functionality for execution of
# parallel process events. It's used within the Game_Map class ($game_map).
#==============================================================================
class Game_CommonEvent
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(common_event_id)
@event = $data_common_events[common_event_id]
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if active?
@interpreter ||= Game_Interpreter.new
else
@interpreter = nil
end
end
#--------------------------------------------------------------------------
# * Determine if Active State
#--------------------------------------------------------------------------
def active?
@event.parallel? && $game_switches[@event.switch_id]
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if @interpreter
@interpreter.setup(@event.list) unless @interpreter.running?
@interpreter.update
end
end
end