51 lines
1.3 KiB
Lua
51 lines
1.3 KiB
Lua
module('platform')
|
|
module('input')
|
|
module('scene')
|
|
module('item')
|
|
|
|
-- Default Input bindings.
|
|
if PLATFORM == "psp" then
|
|
inputBind("up", "up")
|
|
inputBind("down", "down")
|
|
inputBind("left", "left")
|
|
inputBind("right", "right")
|
|
inputBind("circle", "cancel")
|
|
inputBind("cross", "accept")
|
|
inputBind("select", "ragequit")
|
|
inputBind("lstick_up", "up")
|
|
inputBind("lstick_down", "down")
|
|
inputBind("lstick_left", "left")
|
|
inputBind("lstick_right", "right")
|
|
else
|
|
if INPUT_KEYBOARD then
|
|
inputBind("w", "up")
|
|
inputBind("s", "down")
|
|
inputBind("a", "left")
|
|
inputBind("d", "right")
|
|
|
|
inputBind("left", "left")
|
|
inputBind("right", "right")
|
|
inputBind("up", "up")
|
|
inputBind("down", "down")
|
|
|
|
inputBind("enter", "accept")
|
|
inputBind("e", "accept" )
|
|
|
|
inputBind("escape", "cancel")
|
|
inputBind("q", "cancel")
|
|
|
|
inputBind("z", "ragequit")
|
|
end
|
|
end
|
|
|
|
print("Backpack:", BACKPACK)
|
|
print('Has Potion?', inventoryItemExists(BACKPACK, 1))
|
|
inventoryAdd(BACKPACK, 1, 3)
|
|
print('Has Potion?', inventoryItemExists(BACKPACK, 1))
|
|
inventoryRemove(BACKPACK, 1)
|
|
print('Has Potion?', inventoryItemExists(BACKPACK, 1))
|
|
print('Potion Count:', inventoryGetCount(BACKPACK, 1))
|
|
print('Is Backpack Full?', inventoryIsFull(BACKPACK))
|
|
|
|
-- sceneSet('map')
|
|
-- mapLoad('map/testmap/testmap.dmf') |