Lua API/System

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

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

Файлы

Surface (поверхности)

Рендерер

Screen (экран)

HDR

2D Drawing (вывод 2D)

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

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

Time (время)

  • GetCurrTime
  • GetCurrAsyncTime
  • GetFrameTime
  • GetOSTime
  • GetLocalOSTime

Отладка

Консоль

Log (логи)

Эту функции вывода зависят от уровня детализайии логов (log_verbosity).

Статистика

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

Вид

Entity (сущности)

Окружение

Terrain (ландшафт)

Sky (небо)

Fog (туман)

Wind (ветер)

Water (вода)

  • EnableOceanRendering

Ввод