Project1

标题: 如果获取鼠标在地图上的坐标 [打印本页]

作者: ppspssss    时间: 2018-2-11 21:40
标题: 如果获取鼠标在地图上的坐标
mx,my = Mouse.get_mouse_pos  这个只能获取鼠标的畫面坐标,而不是在地图上的坐标, 而我想获取地圖上的坐标用來做ARPG因此請教
作者: 张咚咚    时间: 2018-2-11 22:57
本帖最后由 张咚咚 于 2018-2-11 22:58 编辑

mx,my = Mouse.get_mouse_pos
mx = $game_map.display_x / 128 + 1 + mx / 32 + 1
my = $game_map.display_y / 128 + my / 32 + 1
p mx,my




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1