Require cb_ prefix for plans
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
makeclass('login')
|
||||
|
||||
function login.interface(actor, place)
|
||||
gui.menu_item("becomeplayer", "Become a Player")
|
||||
gui.menu_item("p123", "Print 1, 2, 3")
|
||||
gui.menu_item("cb_becomeplayer", "Become a Player")
|
||||
gui.menu_item("cb_p123", "Print 1, 2, 3")
|
||||
end
|
||||
|
||||
function login.becomeplayer(actor, place, dialog)
|
||||
function login.cb_becomeplayer(actor, place, dialog)
|
||||
tangible.setclass(actor, player)
|
||||
end
|
||||
|
||||
function login.p123(actor, place, dialog)
|
||||
function login.cb_p123(actor, place, dialog)
|
||||
print(1)
|
||||
wait(1)
|
||||
print(2)
|
||||
|
||||
@@ -5,10 +5,10 @@ function player.interface(actor, place)
|
||||
-- print("place=", place)
|
||||
-- print("t.actor=", tangible.actor())
|
||||
-- print("t.place=", tangible.place())
|
||||
gui.menu_item("north", "Go North")
|
||||
gui.menu_item("south", "Go South")
|
||||
gui.menu_item("east", "Go East")
|
||||
gui.menu_item("west", "Go West")
|
||||
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()
|
||||
@@ -16,36 +16,27 @@ function player:printanimstate()
|
||||
print("Resulting state: ", graphic, plane, x, y, z, facing)
|
||||
end
|
||||
|
||||
function player.north(actor, place, dialog)
|
||||
function player.cb_north(actor, place, dialog)
|
||||
print("Moving north")
|
||||
tangible.animate(place, {action="walk", dy=1})
|
||||
actor:printanimstate()
|
||||
end
|
||||
|
||||
function player.south(actor, place, dialog)
|
||||
function player.cb_south(actor, place, dialog)
|
||||
print("Moving south")
|
||||
tangible.animate(place, {action="walk", dy=-1})
|
||||
actor:printanimstate()
|
||||
end
|
||||
|
||||
function player.east(actor, place, dialog)
|
||||
function player.cb_east(actor, place, dialog)
|
||||
print("Moving east")
|
||||
tangible.animate(place, {action="walk", dx=1})
|
||||
actor:printanimstate()
|
||||
end
|
||||
|
||||
function player.west(actor, place, dialog)
|
||||
function player.cb_west(actor, place, dialog)
|
||||
print("Moving west")
|
||||
tangible.animate(place, {action="walk", dx=-1})
|
||||
actor:printanimstate()
|
||||
-- print("actor=", actor)
|
||||
-- print("place=", place)
|
||||
-- print("t.actor=", tangible.actor())
|
||||
-- print("t.place=", tangible.place())
|
||||
-- wait(1)
|
||||
-- print("actor=", actor)
|
||||
-- print("place=", place)
|
||||
-- print("t.actor=", tangible.actor())
|
||||
-- print("t.place=", tangible.place())
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user