Lua API/System
Материал из CryWiki Russia
(Различия между версиями)
Alex626 (Обсуждение | вклад) |
DCamer (Обсуждение | вклад) |
||
(1 промежуточная версия не показана) | |||
Строка 5: | Строка 5: | ||
System.Log("hello world!"); | System.Log("hello world!"); | ||
- | <br | + | <br> |
- | + | ||
- | * [[ | + | === Configuration (конфигурация)<br> === |
- | * [[ | + | |
- | * [[ | + | *[[Lua API/System/IsEditor|IsEditor]] |
- | * GetCPUQuality | + | *[[Lua API/System/IsMultiplayer|IsMultiplayer]] |
- | * GetGPUQuality | + | *[[Lua API/System/IsDevModeEnable|IsDevModeEnable]] |
- | * IsPS20Supported | + | *GetCPUQuality |
- | * LoadLocalizationXml | + | *GetGPUQuality |
- | * SaveConfiguration | + | *IsPS20Supported |
- | * [[ | + | *LoadLocalizationXml |
- | * [[ | + | *SaveConfiguration |
- | * SetBudget | + | *[[Lua API/System/Quit|Quit]] |
- | * [[ | + | *[[Lua API/System/QuitInNSeconds|QuitInNSeconds]] |
- | * [[ | + | *SetBudget |
- | * ApplyForceToEnvironment | + | *[[Lua API/System/ViewDistanceGet|ViewDistanceGet]] |
- | * GetOutdoorAmbientColor | + | *[[Lua API/System/ViewDistanceSet|ViewDistanceSet]] |
- | * ActivatePortal | + | *ApplyForceToEnvironment |
- | * IsPointIndoors | + | *GetOutdoorAmbientColor |
- | * CheckHeapValid | + | *ActivatePortal |
- | * GetConfigSpec | + | *IsPointIndoors |
- | * SetScissor | + | *CheckHeapValid |
- | * LoadFont | + | *GetConfigSpec |
- | < | + | *SetScissor |
- | * [[ | + | *LoadFont |
- | + | ||
- | * [[ | + | === Файлы<br> === |
- | * [[ | + | |
- | < | + | *[[Lua API/System/ScanDirectory|ScanDirectory]] |
- | + | ||
- | * ProjectToScreen | + | === Surface (поверхности)<br> === |
- | * EnumDisplayFormats | + | |
- | * EnumAAFormats | + | *[[Lua API/System/GetSurfaceTypeIdByName|GetSurfaceTypeIdByName]] |
- | * [[ | + | *[[Lua API/System/GetSurfaceTypeNameById|GetSurfaceTypeNameById]] |
- | * [[ | + | |
- | * GetFrameID | + | === Рендерер<br> === |
- | + | ||
- | * GetHDRDynamicMultiplier | + | ==== Screen (экран)<br> ==== |
- | * [[ | + | |
- | * [[ | + | *ProjectToScreen |
- | + | *EnumDisplayFormats | |
- | * DrawLabelImage | + | *EnumAAFormats |
- | * DrawLabel | + | *[[Lua API/System/SetGammaDelta|SetGammaDelta]] |
- | * ScreenToTexture | + | *[[Lua API/System/SetSystemShaderRenderFlags|SetSystemShaderRenderFlags]] |
- | * DrawLine | + | *GetFrameID |
- | * Draw2DLine | + | |
- | * DrawText | + | ==== HDR ==== |
- | * DrawImage | + | |
- | * DrawImageColor | + | *GetHDRDynamicMultiplier |
- | * DrawImageColorCoords | + | *[[Lua API/System/SetHDRDynamicMultiplier|SetHDRDynamicMultiplier]] |
- | * DrawImageCoords | + | *[[Lua API/System/IsHDRSupported|IsHDRSupported]] |
- | * DrawRectShader | + | |
- | * DrawTriStrip | + | ==== 2D Drawing (вывод 2D)<br> ==== |
- | + | ||
- | * [[ | + | *DrawLabelImage |
- | * GetPostProcessFXParam | + | *DrawLabel |
- | * SetScreenFx | + | *ScreenToTexture |
- | * GetScreenFx | + | *DrawLine |
- | + | *Draw2DLine | |
- | * GetCurrTime | + | *DrawText |
- | * GetCurrAsyncTime | + | *DrawImage |
- | * GetFrameTime | + | *DrawImageColor |
- | * GetOSTime | + | *DrawImageColorCoords |
- | * GetLocalOSTime | + | *DrawImageCoords |
- | < | + | *DrawRectShader |
- | * [[ | + | *DrawTriStrip |
- | * [[ | + | |
- | + | ==== Screen Effects (эффекты экрана) ==== | |
- | * [[ | + | |
- | * [[ | + | *[[Lua API/System/SetPostProcessFXParam|SetPostProcessFXParam]] |
- | * [[ | + | *GetPostProcessFXParam |
- | * [[ | + | *SetScreenFx |
- | * [[ | + | *GetScreenFx |
- | * [[ | + | |
- | + | === Time (время)<br> === | |
- | + | ||
- | <br | + | *GetCurrTime |
- | * [[ | + | *GetCurrAsyncTime |
- | * [[ | + | *GetFrameTime |
- | * [[ | + | *GetOSTime |
- | * [[ | + | *GetLocalOSTime |
- | * Error | + | |
- | * [[ | + | === Отладка<br> === |
- | + | ||
- | * DumpMemoryCoverage | + | *[[Lua API/System/ShowDebugger|ShowDebugger]] |
- | * DumpMemStats | + | *[[Lua API/System/Break|Break]] |
- | * DumpMMStats | + | |
- | * DumpWinHeaps | + | === Консоль === |
- | * DebugStats | + | |
- | * GetSystemMem | + | *[[Lua API/System/SetCVar|SetCVar]] |
- | * GetVideoMem | + | *[[Lua API/System/GetCVar|GetCVar]] |
- | + | *[[Lua API/System/AddCCommand|AddCCommand]] | |
- | * [[ | + | *[[Lua API/System/ExecuteCommand|ExecuteCommand]] |
- | * [[ | + | *[[Lua API/System/ShowConsole|ShowConsole]] |
- | * [[ | + | *[[Lua API/System/SetConsoleImage|SetConsoleImage]] |
- | * [[ | + | |
- | * [[ | + | === Log (логи)<br> === |
- | * [[ | + | |
- | + | Эту функции вывода зависят от уровня детализайии логов (log_verbosity). <br> | |
- | * [[ | + | |
- | * [[ | + | *[[Lua API/System/LogToConsole|LogToConsole]] |
- | * [[ | + | *[[Lua API/System/LogAlways|LogAlways]] |
- | * [[ | + | *[[Lua API/System/Log|Log]] |
- | * [[ | + | *[[Lua API/System/Warning|Warning]] |
- | * GetPhysicalEntitiesInBox | + | *Error |
- | * GetPhysicalEntitiesInBoxByClass | + | *[[Lua API/System/ClearConsole|ClearConsole]] |
- | * [[ | + | |
- | * [[ | + | === Статистика === |
- | * [[ | + | |
- | * [[ | + | *DumpMemoryCoverage |
- | * [[ | + | *DumpMemStats |
- | * [[ | + | *DumpMMStats |
- | + | *DumpWinHeaps | |
- | + | *DebugStats | |
- | * [[ | + | *GetSystemMem |
- | * [[ | + | *GetVideoMem |
- | + | ||
- | * [[ | + | === Вид === |
- | * [[ | + | |
- | * [[ | + | *[[Lua API/System/SetViewCameraFov|SetViewCameraFov]] |
- | * GetSkyColor | + | *[[Lua API/System/GetViewCameraFov|GetViewCameraFov]] |
- | * [[ | + | *[[Lua API/System/GetViewCameraPos|GetViewCameraPos]] |
- | * [[ | + | *[[Lua API/System/GetViewCameraDir|GetViewCameraDir]] |
- | + | *[[Lua API/System/GetViewCameraAngles|GetViewCameraAngles]] | |
- | * [[ | + | *[[Lua API/System/IsPointVisible|IsPointVisible]] |
- | + | ||
- | * [[ | + | === Entity (сущности)<br> === |
- | * [[ | + | |
- | + | *[[Lua API/System/GetEntity|GetEntity]] | |
- | * EnableOceanRendering | + | *[[Lua API/System/GetEntityClass|GetEntityClass]] |
- | + | *[[Lua API/System/GetEntities|GetEntities]] | |
- | * [[ | + | *[[Lua API/System/GetEntitiesInSphere|GetEntitiesInSphere]] |
+ | *[[Lua API/System/GetEntitiesInSphereByClass|GetEntitiesInSphereByClass]] | ||
+ | *GetPhysicalEntitiesInBox | ||
+ | *GetPhysicalEntitiesInBoxByClass | ||
+ | *[[Lua API/System/GetEntitiesByClass|GetEntitiesByClass]] | ||
+ | *[[Lua API/System/GetNearestEntityByClass|GetNearestEntityByClass]] | ||
+ | *[[Lua API/System/GetEntityByName|GetEntityByName]] | ||
+ | *[[Lua API/System/GetEntityIdByName|GetEntityIdByName]] | ||
+ | *[[Lua API/System/RemoveEntity|RemoveEntity]] | ||
+ | *[[Lua API/System/SpawnEntity|SpawnEntity]] | ||
+ | |||
+ | === Окружение === | ||
+ | |||
+ | ==== Terrain (ландшафт)<br> ==== | ||
+ | |||
+ | *[[Lua API/System/GetTerrainElevation|GetTerrainElevation]] | ||
+ | *[[Lua API/System/IsValidMapPos|IsValidMapPos]] | ||
+ | |||
+ | ==== Sky (небо)<br> ==== | ||
+ | |||
+ | *[[Lua API/System/SetSunColor|SetSunColor]] | ||
+ | *[[Lua API/System/GetSunColor|GetSunColor]] | ||
+ | *[[Lua API/System/SetSkyColor|SetSkyColor]] | ||
+ | *GetSkyColor | ||
+ | *[[Lua API/System/SetSkyHighlight|SetSkyHighlight]] | ||
+ | *[[Lua API/System/GetSkyHighlight|GetSkyHighlight]] | ||
+ | |||
+ | ==== Fog (туман)<br> ==== | ||
+ | |||
+ | *[[Lua API/System/SetVolumetricFogModifiers|SetVolumetricFogModifiers]] | ||
+ | |||
+ | ==== Wind (ветер)<br> ==== | ||
+ | |||
+ | *[[Lua API/System/SetWind|SetWind]] | ||
+ | *[[Lua API/System/GetWind|GetWind]] | ||
+ | |||
+ | ==== Water (вода)<br> ==== | ||
+ | |||
+ | *EnableOceanRendering | ||
+ | |||
+ | === Ввод === | ||
+ | |||
+ | *[[Lua API/System/ClearKeyState|ClearKeyState]]<noinclude>[[Категория:Lua API]]</noinclude> |
Текущая версия на 19:56, 11 июня 2011
Содержание |
Обзор
Эти функции Lua находятся в таблице System. Например, функция Log может быть вызвана вот так:
System.Log("hello world!");
Configuration (конфигурация)
- IsEditor
- IsMultiplayer
- IsDevModeEnable
- GetCPUQuality
- GetGPUQuality
- IsPS20Supported
- LoadLocalizationXml
- SaveConfiguration
- Quit
- QuitInNSeconds
- SetBudget
- ViewDistanceGet
- ViewDistanceSet
- ApplyForceToEnvironment
- GetOutdoorAmbientColor
- ActivatePortal
- IsPointIndoors
- CheckHeapValid
- GetConfigSpec
- SetScissor
- LoadFont
Файлы
Surface (поверхности)
Рендерер
Screen (экран)
- ProjectToScreen
- EnumDisplayFormats
- EnumAAFormats
- SetGammaDelta
- SetSystemShaderRenderFlags
- GetFrameID
HDR
- GetHDRDynamicMultiplier
- SetHDRDynamicMultiplier
- IsHDRSupported
2D Drawing (вывод 2D)
- DrawLabelImage
- DrawLabel
- ScreenToTexture
- DrawLine
- Draw2DLine
- DrawText
- DrawImage
- DrawImageColor
- DrawImageColorCoords
- DrawImageCoords
- DrawRectShader
- DrawTriStrip
Screen Effects (эффекты экрана)
- SetPostProcessFXParam
- GetPostProcessFXParam
- SetScreenFx
- GetScreenFx
Time (время)
- GetCurrTime
- GetCurrAsyncTime
- GetFrameTime
- GetOSTime
- GetLocalOSTime
Отладка
Консоль
Log (логи)
Эту функции вывода зависят от уровня детализайии логов (log_verbosity).
Статистика
- DumpMemoryCoverage
- DumpMemStats
- DumpMMStats
- DumpWinHeaps
- DebugStats
- GetSystemMem
- GetVideoMem
Вид
- SetViewCameraFov
- GetViewCameraFov
- GetViewCameraPos
- GetViewCameraDir
- GetViewCameraAngles
- IsPointVisible
Entity (сущности)
- GetEntity
- GetEntityClass
- GetEntities
- GetEntitiesInSphere
- GetEntitiesInSphereByClass
- GetPhysicalEntitiesInBox
- GetPhysicalEntitiesInBoxByClass
- GetEntitiesByClass
- GetNearestEntityByClass
- GetEntityByName
- GetEntityIdByName
- RemoveEntity
- SpawnEntity
Окружение
Terrain (ландшафт)
Sky (небо)
- SetSunColor
- GetSunColor
- SetSkyColor
- GetSkyColor
- SetSkyHighlight
- GetSkyHighlight
Fog (туман)
Wind (ветер)
Water (вода)
- EnableOceanRendering