Skip to content

Commit 9991c68

Browse files
committed
Update script.md
1 parent b005aa0 commit 9991c68

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/en/manuals/script.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Defold executes Lua scripts as part of the engine lifecycle and exposes the life
3232
`self` is a userdata object that acts like a Lua table but you can't iterate over it with `pairs()` or `ipairs()` and you can't print it using `pprint()`.
3333
:::
3434

35-
#### `init(self)`
35+
##### init(self)
3636
Called when the component is initialized.
3737

3838
```lua
@@ -43,7 +43,7 @@ function init(self)
4343
end
4444
```
4545

46-
#### `final(self)`
46+
##### final(self)
4747
Called when the component is deleted. This is useful for cleaning up purposes, for instance if you have spawned game objects that should be deleted when the component is deleted.
4848

4949
```lua
@@ -54,7 +54,7 @@ function final(self)
5454
end
5555
```
5656

57-
#### `update(self, dt)`
57+
##### update(self, dt)
5858
Called once each frame. `dt` contains the delta time since the last frame.
5959

6060
```lua
@@ -63,7 +63,7 @@ function update(self, dt)
6363
end
6464
```
6565

66-
#### `fixed_update(self, dt)`
66+
##### fixed_update(self, dt)
6767
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*.
6868

6969
```lua
@@ -72,7 +72,7 @@ function fixed_update(self, dt)
7272
end
7373
```
7474

75-
#### `on_message(self, message_id, message, sender)`
75+
##### on_message(self, message_id, message, sender)
7676
When messages are sent to the script component through [`msg.post()`](/ref/msg#msg.post) the engine calls this function of the receiver component. Learn [more about message passing](/manuals/message-passing).
7777

7878
```lua
@@ -83,7 +83,7 @@ function on_message(self, message_id, message, sender)
8383
end
8484
```
8585

86-
#### `on_input(self, action_id, action)`
86+
##### on_input(self, action_id, action)
8787
If this component has acquired input focus (see [`acquire_input_focus`](/ref/go/#acquire_input_focus)) the engine calls this function when input is registered. Learn [more about input handling](/manuals/input).
8888

8989
```lua
@@ -94,7 +94,7 @@ function on_input(self, action_id, action)
9494
end
9595
```
9696

97-
#### `on_reload(self)`
97+
##### on_reload(self)
9898
This function is called when the script is reloaded through the hot reload editor function (<kbd>Edit ▸ Reload Resource</kbd>). It is very useful for debugging, testing and tweaking purposes. Learn [more about hot-reload](/manuals/hot-reload).
9999

100100
```lua

0 commit comments

Comments
 (0)