New animation step constructor

This commit is contained in:
2021-02-25 16:32:48 -05:00
parent 1814f39e1a
commit 9076666b2b
4 changed files with 145 additions and 23 deletions

View File

@@ -10,25 +10,24 @@ end
function player.action.north(actor, place, dialog)
print("Moving north")
x,y,z = tangible.xyz(place);
tangible.walkto(place, x, y+1, z);
tangible.animate(place, {action="walk", dy=1})
end
function player.action.south(actor, place, dialog)
print("Moving south")
x,y,z = tangible.xyz(place);
tangible.walkto(place, x, y-1, z);
tangible.animate(place, {action="walk", dy=-1})
end
function player.action.east(actor, place, dialog)
print("Moving east")
x,y,z = tangible.xyz(place);
tangible.walkto(place, x+1, y, z);
tangible.animate(place, {action="walk", dx=1})
end
function player.action.west(actor, place, dialog)
print("Moving west")
x,y,z = tangible.xyz(place)
tangible.walkto(place, x-1, y, z);
wait(0)
print("Moving west again")
tangible.animate(place, {action="walk", dx=-1})
end