mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add entity events: on_attacked, on_used
This commit is contained in:
parent
a36ffaacd9
commit
50050dbe40
6 changed files with 44 additions and 0 deletions
|
|
@ -111,3 +111,7 @@ function on_update()
|
|||
body:set_vel(dir)
|
||||
end
|
||||
end
|
||||
|
||||
function on_attacked(attacker, pid)
|
||||
body:set_vel({0, 10, 0})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue