:3
This commit is contained in:
parent
491112768c
commit
68ec37f994
66 changed files with 6591 additions and 10096 deletions
|
@ -67,9 +67,11 @@ function greedystep(target)
|
|||
return true
|
||||
end
|
||||
greedystep = require("pathfinding2").greedystep
|
||||
function to(target)
|
||||
function to(target, func)
|
||||
func = func or function() end
|
||||
print(tostring(target))
|
||||
while greedystep(target) do
|
||||
func()
|
||||
end
|
||||
end
|
||||
function returnhome()
|
||||
|
@ -89,11 +91,12 @@ function returnhome()
|
|||
_G.facing = facing
|
||||
_G.position = position
|
||||
end
|
||||
function lookat(target)
|
||||
function lookat(target, func)
|
||||
print("lookat"..target:tostring())
|
||||
while (position+facing).x ~= target.x
|
||||
or (position+facing).z ~= target.z do
|
||||
greedystep(target)
|
||||
if func then func() end
|
||||
end
|
||||
print("temp")
|
||||
temp = target.y-position.y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue