2012-07-15 13:49:28 +02:00
|
|
|
PlayerMount = {}
|
|
|
|
|
|
|
|
function PlayerMount.init()
|
2012-07-19 20:54:24 +02:00
|
|
|
if g_game.getFeature(GamePlayerMount) then
|
|
|
|
g_keyboard.bindKeyDown('Ctrl+R', PlayerMount.toggleMount, gameRootPanel)
|
|
|
|
end
|
2012-07-15 13:49:28 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function PlayerMount.terminate()
|
2012-07-19 20:54:24 +02:00
|
|
|
if g_game.getFeature(GamePlayerMount) then
|
|
|
|
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
|
|
|
|
end
|
2012-07-15 13:49:28 +02:00
|
|
|
|
|
|
|
PlayerMount = nil
|
|
|
|
end
|
|
|
|
|
|
|
|
function PlayerMount.toggleMount()
|
2012-07-16 01:08:27 +02:00
|
|
|
g_game.mount(not g_game.isMounted())
|
2012-07-15 13:49:28 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function PlayerMount.dismount()
|
|
|
|
g_game.mount(false)
|
2012-07-15 16:28:15 +02:00
|
|
|
end
|