internal GWS( Cartridge cart, Character player, IPlatformHelper platformHelper, LuaDataFactory dataFactory) { this._dataFactory = dataFactory; this._cartridgeEntity = cart; this._cartridge = (LuaDataContainer)cart.DataContainer; this._player = (LuaDataContainer)player.DataContainer; this._platformHelper = platformHelper; ZonePoint pos = player.ObjectLocation; this._latitude = pos.Latitude; this._longitude = pos.Longitude; this._altitude = pos.Latitude; }
internal WIGInternalImpl(Engine engine, LuaDataFactory dataFactory) { this._engine = engine; this._dataFactory = dataFactory; this._mathHelper = new GeoMathHelper(dataFactory); LuaDataContainer wiginternal = dataFactory.CreateContainerAt("WIGInternal"); // WIGInternal Lua hooks: UI-related events AddMethodToTable(wiginternal, "LogMessage"); AddMethodToTable(wiginternal, "MessageBox"); AddMethodToTable(wiginternal, "GetInput"); AddMethodToTable(wiginternal, "NotifyOS"); AddMethodToTable(wiginternal, "ShowScreen"); AddMethodToTable(wiginternal, "ShowStatusText"); // WIGInternal Lua hooks: gameplay-related events AddMethodToTable(wiginternal, "AttributeChangedEvent"); AddMethodToTable(wiginternal, "CartridgeEvent"); AddMethodToTable(wiginternal, "CommandChangedEvent"); AddMethodToTable(wiginternal, "InventoryEvent"); AddMethodToTable(wiginternal, "MediaEvent"); AddMethodToTable(wiginternal, "TimerEvent"); AddMethodToTable(wiginternal, "ZoneStateChangedEvent"); // WIGInternal Lua hooks: internal functions AddMethodToTable(wiginternal, "IsPointInZone", "IsPointInZoneLua"); AddMethodToTable(wiginternal, "VectorToZone", "VectorToZoneLua"); AddMethodToTable(wiginternal, "VectorToSegment", "VectorToSegmentLua"); AddMethodToTable(wiginternal, "VectorToPoint", "VectorToPointLua"); AddMethodToTable(wiginternal, "TranslatePoint", "TranslatePointLua"); // Marks package WIGInternal as loaded dataFactory.SetContainerAt("package.loaded.WIGInternal", wiginternal); dataFactory.SetContainerAt("package.preload.WIGInternal", wiginternal); // Loads the Wherigo LUA engine. dataFactory.LoadAndRunEngine(); }
internal WIGInternalImpl(Engine engine, LuaDataFactory dataFactory) { this._engine = engine; this._dataFactory = dataFactory; this._mathHelper = new GeoMathHelper(dataFactory); LuaDataContainer wiginternal = dataFactory.CreateContainerAt("WIGInternal"); // WIGInternal Lua hooks: UI-related events AddMethodToTable(wiginternal, "LogMessage"); AddMethodToTable(wiginternal, "MessageBox"); AddMethodToTable(wiginternal, "GetInput"); AddMethodToTable(wiginternal, "NotifyOS"); AddMethodToTable(wiginternal, "ShowScreen"); AddMethodToTable(wiginternal, "ShowStatusText"); // WIGInternal Lua hooks: gameplay-related events AddMethodToTable(wiginternal, "AttributeChangedEvent"); AddMethodToTable(wiginternal, "CartridgeEvent"); AddMethodToTable(wiginternal, "CommandChangedEvent"); AddMethodToTable(wiginternal, "InventoryEvent"); AddMethodToTable(wiginternal, "MediaEvent"); AddMethodToTable(wiginternal, "TimerEvent"); AddMethodToTable(wiginternal, "ZoneStateChangedEvent"); // WIGInternal Lua hooks: internal functions AddMethodToTable(wiginternal, "IsPointInZone", "IsPointInZoneLua"); AddMethodToTable(wiginternal, "VectorToZone", "VectorToZoneLua"); AddMethodToTable(wiginternal, "VectorToSegment", "VectorToSegmentLua"); AddMethodToTable(wiginternal, "VectorToPoint", "VectorToPointLua"); AddMethodToTable(wiginternal, "TranslatePoint", "TranslatePointLua"); // Marks package WIGInternal as loaded dataFactory.SetContainerAt("package.loaded.WIGInternal", wiginternal); dataFactory.SetContainerAt("package.preload.WIGInternal", wiginternal); // Loads the Wherigo LUA engine. dataFactory.LoadAndRunEngine(); }
internal GWS( Cartridge cart, Character player, IPlatformHelper platformHelper, LuaDataFactory dataFactory) { this._dataFactory = dataFactory; this._cartridgeEntity = cart; this._cartridge = (LuaDataContainer)cart.DataContainer; this._player = (LuaDataContainer)player.DataContainer; this._platformHelper = platformHelper; ZonePoint pos = player.ObjectLocation; this._latitude = pos.Latitude; this._longitude = pos.Longitude; this._altitude = pos.Latitude; }