indexing description: "[ TRIGGER is an abtract class representing all the things that can trigger an event (ITEM, AREA and TIMER). Actions are specified on triggers so the engine knows what to do if an event occurs an a certain trigger. This class is part of the XAE Extended Adventure Engine Project. ]" author: "Adrian Rabenseifner, radrian@student.ethz.ch" date: "$Date$" revision: "$Revision$" deferred class TRIGGER feature -- Access init_action_list is -- init action list do create action_list.make end add_action(action: ACTION) is -- add action to action list do action_list.extend(action); end -- only used by engine process_event(e: EVENT; g: GAME) is -- process event local context: CONTEXT do -- create context create context.make(g.registry, g.repository, g.trash, e.context) -- debug output -- io.put_string("process event") -- io.put_new_line -- loop thru action list from action_list.start --print ("Actions for this item: " + action_list.count.out + "%N") until action_list.after loop -- call perform on actions that fulfill conditions if action_list.item.performable(context) then action_list.item.perform(e, g) --print ("Action performed%N%N") else --print ("Action NOT performed%N%N") end action_list.forth end end feature {NONE} -- Implementation action_list: LINKED_LIST[ACTION] end -- class TRIGGER