|
|
@@ -196,26 +196,11 @@ const props = defineProps({
|
|
|
type: [String, Object],
|
|
|
default: ''
|
|
|
},
|
|
|
- // 地图起点
|
|
|
- mapStartPoint: {
|
|
|
- type: [String, Object],
|
|
|
- default: ''
|
|
|
- },
|
|
|
- // 地图终点
|
|
|
- mapEndPoint: {
|
|
|
- type: [String, Object],
|
|
|
- default: ''
|
|
|
- },
|
|
|
// 可行走点
|
|
|
mapWalkablePoints: {
|
|
|
type: [String, Array],
|
|
|
default: ''
|
|
|
},
|
|
|
- // 用户方向
|
|
|
- userDirection: {
|
|
|
- type: Number,
|
|
|
- default: 0
|
|
|
- },
|
|
|
// 用户图片
|
|
|
userImage: {
|
|
|
type: String,
|
|
|
@@ -478,7 +463,7 @@ const countdownStyle = computed(() => {
|
|
|
});
|
|
|
|
|
|
// 监听props变化,当地图数据变化时更新游戏数据
|
|
|
-watch(() => [props.gameId, props.mapBackground, props.mapStartPoint, props.mapEndPoint, props.mapWalkablePoints], async () => {
|
|
|
+watch(() => [props.gameId, props.mapBackground, props.mapWalkablePoints], async () => {
|
|
|
// 获取游戏数据
|
|
|
await fetchGameData();
|
|
|
// 初始化可行走点集合
|
|
|
@@ -591,13 +576,10 @@ const fetchGameData = async () => {
|
|
|
currentGameData.value = {
|
|
|
mapBackground: props.mapBackground,
|
|
|
mapTileSize: props.mapTileSize,
|
|
|
- mapStartPoint: props.mapStartPoint,
|
|
|
- mapEndPoint: props.mapEndPoint,
|
|
|
mapWalkablePoints: props.mapWalkablePoints,
|
|
|
routeList: props.routeList,
|
|
|
- userDirection: props.userDirection,
|
|
|
userImage: props.userImage,
|
|
|
- info: props.info
|
|
|
+ info: props.info,
|
|
|
};
|
|
|
|
|
|
// 直接更新游戏状态
|