Lua API/System
Материал из CryWiki Russia
(Различия между версиями)
Alex626 (Обсуждение | вклад) (Новая страница: «=== Overview === These Lua functions are in the '''System''' table. For example, the '''Log''' function would be invoked like this: System.Log("logging this messa...») |
Alex626 (Обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
- | === | + | === Обзор === |
- | + | Эти функции Lua находятся в таблице '''System'''. Например, функция '''Log''' может быть вызвана вот так: | |
- | System.Log(" | + | System.Log("hello world!"); |
- | <br | + | |
- | + | <br> | |
- | * [[ | + | |
- | * [[ | + | === Конфигурация === |
- | * [[ | + | |
- | * GetCPUQuality | + | *[[Lua API/System/IsEditor|IsEditor]] |
- | * GetGPUQuality | + | *[[Lua API/System/IsMultiplayer|IsMultiplayer]] |
- | * IsPS20Supported | + | *[[Lua API/System/IsDevModeEnable|IsDevModeEnable]] |
- | * LoadLocalizationXml | + | *GetCPUQuality |
- | * SaveConfiguration | + | *GetGPUQuality |
- | * [[ | + | *IsPS20Supported |
- | * [[ | + | *LoadLocalizationXml |
- | * SetBudget | + | *SaveConfiguration |
- | * [[ | + | *[[Lua API/System/Quit|Quit]] |
- | * [[ | + | *[[Lua API/System/QuitInNSeconds|QuitInNSeconds]] |
- | * ApplyForceToEnvironment | + | *SetBudget |
- | * GetOutdoorAmbientColor | + | *[[Lua API/System/ViewDistanceGet|ViewDistanceGet]] |
- | * ActivatePortal | + | *[[Lua API/System/ViewDistanceSet|ViewDistanceSet]] |
- | * IsPointIndoors | + | *ApplyForceToEnvironment |
- | * CheckHeapValid | + | *GetOutdoorAmbientColor |
- | * GetConfigSpec | + | *ActivatePortal |
- | * SetScissor | + | *IsPointIndoors |
- | * LoadFont | + | *CheckHeapValid |
- | + | *GetConfigSpec | |
- | * [[ | + | *SetScissor |
- | + | *LoadFont | |
- | * [[ | + | |
- | * [[ | + | === Файл === |
- | + | ||
- | + | *[[Lua API/System/ScanDirectory|ScanDirectory]] | |
- | * ProjectToScreen | + | |
- | * EnumDisplayFormats | + | === Поверхность === |
- | * EnumAAFormats | + | |
- | * [[ | + | *[[Lua API/System/GetSurfaceTypeIdByName|GetSurfaceTypeIdByName]] |
- | * [[ | + | *[[Lua API/System/GetSurfaceTypeNameById|GetSurfaceTypeNameById]] |
- | * GetFrameID | + | |
- | + | === Рендер === | |
- | * GetHDRDynamicMultiplier | + | |
- | * [[ | + | ==== Экран ==== |
- | * [[ | + | |
- | + | *ProjectToScreen | |
- | * DrawLabelImage | + | *EnumDisplayFormats |
- | * DrawLabel | + | *EnumAAFormats |
- | * ScreenToTexture | + | *[[Lua API/System/SetGammaDelta|SetGammaDelta]] |
- | * DrawLine | + | *[[Lua API/System/SetSystemShaderRenderFlags|SetSystemShaderRenderFlags]] |
- | * Draw2DLine | + | *GetFrameID |
- | * DrawText | + | |
- | * DrawImage | + | ==== HDR ==== |
- | * DrawImageColor | + | |
- | * DrawImageColorCoords | + | *GetHDRDynamicMultiplier |
- | * DrawImageCoords | + | *[[Lua API/System/SetHDRDynamicMultiplier|SetHDRDynamicMultiplier]] |
- | * DrawRectShader | + | *[[Lua API/System/IsHDRSupported|IsHDRSupported]] |
- | * DrawTriStrip | + | |
- | + | ==== Вывод 2D<br> ==== | |
- | * [[ | + | |
- | * GetPostProcessFXParam | + | *DrawLabelImage |
- | * SetScreenFx | + | *DrawLabel |
- | * GetScreenFx | + | *ScreenToTexture |
- | + | *DrawLine | |
- | * GetCurrTime | + | *Draw2DLine |
- | * GetCurrAsyncTime | + | *DrawText |
- | * GetFrameTime | + | *DrawImage |
- | * GetOSTime | + | *DrawImageColor |
- | * GetLocalOSTime | + | *DrawImageColorCoords |
- | + | *DrawImageCoords | |
- | * [[ | + | *DrawRectShader |
- | * [[ | + | *DrawTriStrip |
- | + | ||
- | * [[ | + | ==== Эффекты экрана (Screen Effects)<br> ==== |
- | * [[ | + | |
- | * [[ | + | *[[Lua API/System/SetPostProcessFXParam|SetPostProcessFXParam]] |
- | * [[ | + | *GetPostProcessFXParam |
- | * [[ | + | *SetScreenFx |
- | * [[ | + | *GetScreenFx |
- | + | ||
- | These logging functions are subject to the log verbosity level. | + | === Время === |
- | <br | + | |
- | * [[ | + | *GetCurrTime |
- | * [[ | + | *GetCurrAsyncTime |
- | * [[ | + | *GetFrameTime |
- | * [[ | + | *GetOSTime |
- | * Error | + | *GetLocalOSTime |
- | * [[ | + | |
- | + | === Отладка === | |
- | * DumpMemoryCoverage | + | |
- | * DumpMemStats | + | *[[Lua API/System/ShowDebugger|ShowDebugger]] |
- | * DumpMMStats | + | *[[Lua API/System/Break|Break]] |
- | * DumpWinHeaps | + | |
- | * DebugStats | + | === Консоль === |
- | * GetSystemMem | + | |
- | * GetVideoMem | + | *[[Lua API/System/SetCVar|SetCVar]] |
- | + | *[[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]] |
- | * [[ | + | |
- | * [[ | + | === Логи === |
- | + | ||
- | * [[ | + | These logging functions are subject to the log verbosity level. <br> |
- | * [[ | + | |
- | * [[ | + | *[[Lua API/System/LogToConsole|LogToConsole]] |
- | * [[ | + | *[[Lua API/System/LogAlways|LogAlways]] |
- | * [[ | + | *[[Lua API/System/Log|Log]] |
- | * GetPhysicalEntitiesInBox | + | *[[Lua API/System/Warning|Warning]] |
- | * GetPhysicalEntitiesInBoxByClass | + | *Error |
- | * [[ | + | *[[Lua API/System/ClearConsole|ClearConsole]] |
- | * [[ | + | |
- | * [[ | + | === Статистика === |
- | * [[ | + | |
- | * [[ | + | *DumpMemoryCoverage |
- | * [[ | + | *DumpMemStats |
- | + | *DumpMMStats | |
- | + | *DumpWinHeaps | |
- | * [[ | + | *DebugStats |
- | * [[ | + | *GetSystemMem |
- | + | *GetVideoMem | |
- | * [[ | + | |
- | * [[ | + | === Вид === |
- | * [[ | + | |
- | * GetSkyColor | + | *[[Lua API/System/SetViewCameraFov|SetViewCameraFov]] |
- | * [[ | + | *[[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]] | |
- | * [[ | + | |
- | * [[ | + | === Сущность === |
- | + | ||
- | * EnableOceanRendering | + | *[[Lua API/System/GetEntity|GetEntity]] |
- | + | *[[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]] | ||
+ | |||
+ | === Окружение === | ||
+ | |||
+ | ==== Ландшафт ==== | ||
+ | |||
+ | *[[Lua API/System/GetTerrainElevation|GetTerrainElevation]] | ||
+ | *[[Lua API/System/IsValidMapPos|IsValidMapPos]] | ||
+ | |||
+ | ==== Небо ==== | ||
+ | |||
+ | *[[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]] | ||
+ | |||
+ | ==== ТУман ==== | ||
+ | |||
+ | *[[Lua API/System/SetVolumetricFogModifiers|SetVolumetricFogModifiers]] | ||
+ | |||
+ | ==== Ветер ==== | ||
+ | |||
+ | *[[Lua API/System/SetWind|SetWind]] | ||
+ | *[[Lua API/System/GetWind|GetWind]] | ||
+ | |||
+ | ==== Вода ==== | ||
+ | |||
+ | *EnableOceanRendering | ||
+ | |||
+ | === Input === | ||
+ | |||
+ | *[[Lua API/System/ClearKeyState|ClearKeyState]] |
Версия 12:46, 12 мая 2011
Содержание |
Обзор
Эти функции Lua находятся в таблице System. Например, функция Log может быть вызвана вот так:
System.Log("hello world!");
Конфигурация
- IsEditor
- IsMultiplayer
- IsDevModeEnable
- GetCPUQuality
- GetGPUQuality
- IsPS20Supported
- LoadLocalizationXml
- SaveConfiguration
- Quit
- QuitInNSeconds
- SetBudget
- ViewDistanceGet
- ViewDistanceSet
- ApplyForceToEnvironment
- GetOutdoorAmbientColor
- ActivatePortal
- IsPointIndoors
- CheckHeapValid
- GetConfigSpec
- SetScissor
- LoadFont
Файл
Поверхность
Рендер
Экран
- ProjectToScreen
- EnumDisplayFormats
- EnumAAFormats
- SetGammaDelta
- SetSystemShaderRenderFlags
- GetFrameID
HDR
- GetHDRDynamicMultiplier
- SetHDRDynamicMultiplier
- IsHDRSupported
Вывод 2D
- DrawLabelImage
- DrawLabel
- ScreenToTexture
- DrawLine
- Draw2DLine
- DrawText
- DrawImage
- DrawImageColor
- DrawImageColorCoords
- DrawImageCoords
- DrawRectShader
- DrawTriStrip
Эффекты экрана (Screen Effects)
- SetPostProcessFXParam
- GetPostProcessFXParam
- SetScreenFx
- GetScreenFx
Время
- GetCurrTime
- GetCurrAsyncTime
- GetFrameTime
- GetOSTime
- GetLocalOSTime
Отладка
Консоль
Логи
These logging functions are subject to the log verbosity level.
Статистика
- DumpMemoryCoverage
- DumpMemStats
- DumpMMStats
- DumpWinHeaps
- DebugStats
- GetSystemMem
- GetVideoMem
Вид
- SetViewCameraFov
- GetViewCameraFov
- GetViewCameraPos
- GetViewCameraDir
- GetViewCameraAngles
- IsPointVisible
Сущность
- GetEntity
- GetEntityClass
- GetEntities
- GetEntitiesInSphere
- GetEntitiesInSphereByClass
- GetPhysicalEntitiesInBox
- GetPhysicalEntitiesInBoxByClass
- GetEntitiesByClass
- GetNearestEntityByClass
- GetEntityByName
- GetEntityIdByName
- RemoveEntity
- SpawnEntity
Окружение
Ландшафт
Небо
- SetSunColor
- GetSunColor
- SetSkyColor
- GetSkyColor
- SetSkyHighlight
- GetSkyHighlight
ТУман
Ветер
Вода
- EnableOceanRendering