This commit is contained in:
2022-02-01 10:48:48 -05:00
parent e087db2680
commit 157c5fbbdf
3 changed files with 3 additions and 44 deletions

View File

@@ -1,42 +0,0 @@
makeclass('player')
function player.interface(actor, place)
-- print("actor=", actor)
-- print("place=", place)
-- print("t.actor=", tangible.actor())
-- print("t.place=", tangible.place())
gui.menu_item("cb_north", "Go North")
gui.menu_item("cb_south", "Go South")
gui.menu_item("cb_east", "Go East")
gui.menu_item("cb_west", "Go West")
end
function player:printanimstate()
local graphic,plane,x,y,z,facing = tangible.animstate(self)
print("Resulting state: ", graphic, plane, x, y, z, facing)
end
function player.cb_north(actor, place, dialog)
print("Moving north")
tangible.animate(place, {action="walk", dy=1})
actor:printanimstate()
end
function player.cb_south(actor, place, dialog)
print("Moving south")
tangible.animate(place, {action="walk", dy=-1})
actor:printanimstate()
end
function player.cb_east(actor, place, dialog)
print("Moving east")
tangible.animate(place, {action="walk", dx=1})
actor:printanimstate()
end
function player.cb_west(actor, place, dialog)
print("Moving west")
tangible.animate(place, {action="walk", dx=-1})
actor:printanimstate()
end