lua/wrappers/game/lua_map_region.cpp
/**
	 * Adds an event listener to this map region.
	 * <pre>
	 * local region = am.map_region.new(1, 1, 1)
	 * region:on("region_entered", function(event)
	 *     am.debug.log("entered: " .. event:game_object)
	 * end)
	 * region:on("region_exited", function(event)
	 *     am.debug.log("exited: " .. event:game_object)
	 * end)
	 * </pre>
	 *
	 * @param string event_name The event type or name to trigger on
	 * @param function listener The function to call when the event is fired.
	 * @param table [nil] content An option context for the listener to be
	 * called with.
	 * @returns boolean True if the event was added successfully.
	 */
Adds an event listener to this map region.

@param string event_name The event type or name to trigger on
@param function listener The function to call when the event is fired.
@param table [nil] content An option context for the listener to be
called with.
@returns boolean True if the event was added successfully.
Adds an event listener to this map region . @param string event_name The event type or name to trigger on @param function listener The function to call when the event is fired . @param table [ nil ] content An option context for the listener to be called with . @returns boolean True if the event was added successfully .
int MapRegion_add_event_listener(lua_State *lua)
	{
		MapRegion *region = castUData<MapRegion>(lua, 1);
		if (region)
		{
			if (lua_isstr(lua, 2) && lua_isfunction(lua, 3))
			{
				lua_pushboolean(lua, am::lua::ui::addEventListener(lua, region));
				return 1;
			}
			return LuaState::expectedArgs(lua, "on", "string event_name, function listener");
		}
		return LuaState::expectedContext(lua, "on", "am.map_region");
	}
int MapRegion_add_event_listener ( lua_State * lua ) { MapRegion * region = castUData < MapRegion > ( lua , 1 ) ; if ( region ) { if ( lua_isstr ( lua , 2 ) && lua_isfunction ( lua , 3 ) ) { lua_pushboolean ( lua , am :: lua :: ui :: addEventListener ( lua , region ) ) ; return 1 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Adds an event listener to this map region.
Adds an event listener to this map region .