学习目标: 热血合击LUA寻路 996游戏引擎 function mygotoPos(posx,posy) -- auto move 自动移动 myprint("mygotoPos End+++++++++++++++++++++") local PlayerProperty = global.Facade:retrieveProxy( global.ProxyTable.PlayerProperty ) local job = PlayerProperty:GetRoleJob() local mapProxy = global.Facade:retrieveProxy(global.ProxyTable.Map) local mapID = mapProxy:GetMapID() local movePos = { mapID = mapID, x = posx, y = posy, type = global.MMO.INPUT_MOVE_TYPE_OTHER, range = 1 or 2, robot = true, } global.Facade:sendNotification(global.NoticeTable.InputMove, movePos) myprint("mygotoPos End+++++++++++++++++++++") end mygotoPos(300,202) --测试成功
|