Add gravity field manipulation to Lua api, move gravity processing to after the particle update (Means a delay of 1 frame, but we get the ability to manipulate the field with Lua)

This commit is contained in:
Simon Robertshaw
2011-06-01 12:16:33 +01:00
parent 2c8c4bc567
commit 3d600c6955
4 changed files with 82 additions and 13 deletions

View File

@@ -10,5 +10,9 @@ function do_step()
end
tpt.drawtext(numberthing, 50, "Oh my god, this is amazing", 255, 255, 255, 255)
tpt.drawtext(mousex, mousey, "Oh my god, this is amazing", 255, 255, 255, 255)
return true
tpt.reset_velocity(10, 10, 20, 20)
tpt.reset_gravity_field(10, 10, 20, 20)
tpt.set_pressure(10, 10, 20, 20)
tpt.set_gravity(75, 45, 1, 1, 8)
return false
end