mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-09-25 17:31:47 +08:00
fix: 寻路路径在大地图下错位
This commit is contained in:
parent
721edefaba
commit
4c6343227f
@ -5,7 +5,8 @@ import {
|
||||
IActionEvent,
|
||||
MotaOffscreenCanvas2D,
|
||||
Sprite,
|
||||
onTick
|
||||
onTick,
|
||||
transformCanvas
|
||||
} from '@motajs/render';
|
||||
import { WeatherController } from '../weather';
|
||||
import {
|
||||
@ -211,7 +212,9 @@ const MainScene = defineComponent(() => {
|
||||
|
||||
const renderMapMisc = (canvas: MotaOffscreenCanvas2D) => {
|
||||
const step = core.status.stepPostfix;
|
||||
if (!step) return;
|
||||
const camera = map.value?.camera;
|
||||
if (!step || !camera) return;
|
||||
transformCanvas(canvas, camera);
|
||||
const ctx = canvas.ctx;
|
||||
ctx.fillStyle = '#fff';
|
||||
step.forEach(({ x, y, direction }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user