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,
|
IActionEvent,
|
||||||
MotaOffscreenCanvas2D,
|
MotaOffscreenCanvas2D,
|
||||||
Sprite,
|
Sprite,
|
||||||
onTick
|
onTick,
|
||||||
|
transformCanvas
|
||||||
} from '@motajs/render';
|
} from '@motajs/render';
|
||||||
import { WeatherController } from '../weather';
|
import { WeatherController } from '../weather';
|
||||||
import {
|
import {
|
||||||
@ -211,7 +212,9 @@ const MainScene = defineComponent(() => {
|
|||||||
|
|
||||||
const renderMapMisc = (canvas: MotaOffscreenCanvas2D) => {
|
const renderMapMisc = (canvas: MotaOffscreenCanvas2D) => {
|
||||||
const step = core.status.stepPostfix;
|
const step = core.status.stepPostfix;
|
||||||
if (!step) return;
|
const camera = map.value?.camera;
|
||||||
|
if (!step || !camera) return;
|
||||||
|
transformCanvas(canvas, camera);
|
||||||
const ctx = canvas.ctx;
|
const ctx = canvas.ctx;
|
||||||
ctx.fillStyle = '#fff';
|
ctx.fillStyle = '#fff';
|
||||||
step.forEach(({ x, y, direction }) => {
|
step.forEach(({ x, y, direction }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user