mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
update doc/*/entity-properties.md
This commit is contained in:
parent
559057c2c1
commit
df9ea32848
2 changed files with 32 additions and 0 deletions
|
|
@ -20,6 +20,22 @@ Example:
|
|||
]
|
||||
```
|
||||
|
||||
You can pass values in ARGS from the entity configuration.
|
||||
They will be passed both when creating a new entity and when loading a saved one.
|
||||
The `args` list is used for this:
|
||||
|
||||
```json
|
||||
"components": [
|
||||
{
|
||||
"name": "base:drop",
|
||||
"args": {
|
||||
"item": "base:stone.item",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The components code should be in `scripts/components`.
|
||||
|
||||
## Physics
|
||||
|
|
|
|||
|
|
@ -20,6 +20,22 @@
|
|||
]
|
||||
```
|
||||
|
||||
Из конфигурации сущности можно передавать значения в ARGS.
|
||||
Они будут передаваться как при создании новой сущности, так и при загрузке сохранённой.
|
||||
Для этого используется список `args`:
|
||||
|
||||
```json
|
||||
"components": [
|
||||
{
|
||||
"name": "base:drop",
|
||||
"args": {
|
||||
"item": "base:stone.item",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Код компонентов должен находиться в `scripts/components`.
|
||||
|
||||
## Физика
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue