Lua API/System

Материал из CryWiki Russia

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


Конфигурация

Файл

Поверхность

Рендер

Экран

HDR

Вывод 2D

  • DrawLabelImage
  • DrawLabel
  • ScreenToTexture
  • DrawLine
  • Draw2DLine
  • DrawText
  • DrawImage
  • DrawImageColor
  • DrawImageColorCoords
  • DrawImageCoords
  • DrawRectShader
  • DrawTriStrip

Эффекты экрана (Screen Effects)

Время

  • GetCurrTime
  • GetCurrAsyncTime
  • GetFrameTime
  • GetOSTime
  • GetLocalOSTime

Отладка

Консоль

Логи

These logging functions are subject to the log verbosity level.

Статистика

  • DumpMemoryCoverage
  • DumpMemStats
  • DumpMMStats
  • DumpWinHeaps
  • DebugStats
  • GetSystemMem
  • GetVideoMem

Вид

Сущность

Окружение

Ландшафт

Небо

ТУман

Ветер

Вода

  • EnableOceanRendering

Input