/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/lua/lua-515-101-005/main.lua
15 строк
366 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
local function create_entity(config) local entity = { position = config.position or { x = 0, y = 0 }, velocity = config.velocity or { x = 0, y = 0 }, health = config.health or 100, tags = config.tags or {} } return entity end local enemy = create_entity({ position = { x = 100, y = 200 }, health = 150, tags = { "hostile", "ranged" } })