Skip to content

Commit 1ec871c

Browse files
committed
last
1 parent 25eae32 commit 1ec871c

21 files changed

+629
-112
lines changed

docs/en/manuals/script.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ Script components allows you to create game logic using the [Lua programming lan
1010

1111
## Script types
1212

13-
There are three types of Lua script in Defold, each has different Defold libraries available.
13+
Скрипты игровых объектов
14+
: Расширение _.script_. Эти скрипты добавляются к игровым объектам точно так же, как и любой другой [компонент](/manuals/components), и Defold будет выполнять Lua-код как часть функций жизненного цикла движка. Скрипты игровых объектов обычно используются для управления игровыми объектами и логикой, объединяющей игру воедино: загрузкой уровней, игровыми правилами и так далее. Скрипты имеют доступ к функциям [GO](/ref/go) и ко всем библиотечным функциям Defold, за исключением [GUI](/ref/gui) и [Render](/ref/render).
1415

15-
Game Object scripts
16-
: Extension _.script_. These scripts are added to game objects exactly like any other [component](/manuals/components) and Defold will execute the Lua code as part of the engine lifecycle functions. Game Object scripts are usually used to control game objects and the logic that binds the game together with level loading, game rules and so forth. Game Object scripts have access to the [GO](/ref/go) functions and all Defold library functions except the [GUI](/ref/gui) and [Render](/ref/render) functions.
16+
Скрипты GUI
17+
: Расширение _.gui_script_. Выполняются компонентами GUI и обычно содержат логику, необходимую для отображения элементов GUI, таких как интерфейс, меню и т.п. Defold выполняет Lua-код как часть функций жизненного цикла движка. Скрипты GUI имеют доступ к функциям [GUI](/ref/gui) и ко всем библиотечным функциям Defold, за исключением [GO](/ref/go) и [Render](/ref/render).
1718

18-
19-
GUI scripts
20-
: Extension _.gui_script_. Run by GUI components and usually containing the logic required to display GUI elements like heads up displays, menus etc. Defold will execute the Lua code as part of the engine lifecycle functions. GUI scripts have access to the [GUI](/ref/gui) functions and all Defold library functions except the [GO](/ref/go) and [Render](/ref/render) functions.
21-
22-
23-
Render scripts
24-
: Extension _.render_script_. Run by the rendering pipeline and containing the logic required to render all app/game graphics each frame. The render script has a special place in the lifecycle of your game. Details can be found in the [Application lifecycle documentation](/manuals/application-lifecycle). Render scripts have access to the [Render](/ref/render) functions and all Defold library functions except the [GO](/ref/go) and [GUI](/ref/gui) functions.
19+
Скрипты рендера
20+
: Расширение _.render_script_. Выполняются в рамках пайплайна рендеринга и содержат логику, необходимую для отрисовки всей графики приложения/игры в каждом кадре. Скрипт рендера занимает особое место в жизненном цикле вашей игры. Подробнее см. в [документации по жизненному циклу приложения](/manuals/application-lifecycle). Скрипты рендера имеют доступ к функциям [Render](/ref/render) и ко всем библиотечным функциям Defold, за исключением [GO](/ref/go) и [GUI](/ref/gui).
2521

2622

2723
## Script execution, callbacks and self
@@ -64,11 +60,11 @@ end
6460
```
6561

6662
#### `fixed_update(self, dt)`
67-
Frame-rate independent update. `dt` contains the delta time since the last update. This function is called when `engine.fixed_update_frequency` is enabled (!= 0). Useful when you wish to manipulate physics objects at regular intervals to achieve a stable physics simulation when `physics.use_fixed_timestep` is enabled in *game.project*.
63+
: Обновление, не зависящее от частоты кадров. `dt` содержит дельту времени с момента последнего обновления. Эта функция вызывается, когда включен параметр `engine.fixed_update_frequency` (!= 0). Полезна, когда вы хотите управлять физическими объектами с регулярными интервалами для достижения стабильной симуляции физики при включенном параметре `physics.use_fixed_timestep` в *game.project*.
6864

6965
```lua
7066
function fixed_update(self, dt)
71-
msg.post("#co", "apply_force", {force = vmath.vector3(1, 0, 0), position = go.get_world_position()})
67+
msg.post("#co", "apply_force", {force = vmath.vector3(1, 0, 0), position = go.get_world_position()})
7268
end
7369
```
7470

docs/en/manuals/shader.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ Shaders in Defold support including source code from files within the project th
281281
#include "../root-level-snippet.glsl"
282282
```
283283

284-
::: sidenote
285-
Shader includes are available starting from version 1.4.2
286-
:::
287-
288284
There are some caveats to how includes are picked up:
289285

290286
- Files must be project relative, meaning that you can only include files that are located within the project. Any absolute path must be specified with a leading `/`

docs/en/manuals/sprite.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ The attributes specified in the material will show up as regular properties in t
8181

8282
![sprite-attributes](../images/graphics/sprite-attributes.png)
8383

84-
::: sidenote
85-
Custom attributes are available starting from Defold 1.4.8!
86-
:::
87-
8884
## Project configuration
8985

9086
The *game.project* file has a few [project settings](/manuals/project-settings#sprite) related to sprites.

docs/en/manuals/writing-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Defold uses Lua 5.1 and LuaJIT (depending on target platform) and you need to fo
1313

1414
## Using other languages that transpile to Lua
1515

16-
Starting from version 1.8.1, Defold supports the use of transpilers that emit Lua code. With transpiler extension installed, you can use alternative languages — such as [Teal](https://github.com/defold/extension-teal) — to write statically-checked Lua. It is a preview feature that has limitations: current transpiler support does not expose the information about modules and functions defined in the Defold Lua runtime. It means that using Defold APIs like `go.animate` will require you to write external definitions yourself.
16+
Defold supports the use of transpilers that emit Lua code. With transpiler extension installed, you can use alternative languages — such as [Teal](https://github.com/defold/extension-teal) — to write statically-checked Lua. It is a preview feature that has limitations: current transpiler support does not expose the information about modules and functions defined in the Defold Lua runtime. It means that using Defold APIs like `go.animate` will require you to write external definitions yourself.
1717

1818
## Writing native code
1919

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)