add entity events: on_attacked, on_used
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user