mirror of
https://github.com/motajs/template.git
synced 2026-11-25 07:24:30 +08:00
refactor: data-common/common
This commit is contained in:
1 parent
9fb04e3129
commit
1fb92c3976
12 files changed
+51
-233
No files matched your search
@@ -15,7 +15,6 @@ import {
|
||||
} from './types';
|
||||
import { Hookable, HookController, ITileLocator, logger } from '@motajs/common';
|
||||
import {
|
||||
degradeFace,
|
||||
FaceDirection,
|
||||
IDataCommon,
|
||||
IRoleFaceBinder,
|
||||
@@ -525,14 +524,7 @@ export class MapLayer
|
||||
|
||||
@shouldReplay('Setting map layer block direction should be replayed.')
|
||||
setDynamicDirection(tile: IDynamicTile, direction: FaceDirection): number {
|
||||
const numBefore = tile.num();
|
||||
tile.setFaceDirection(direction);
|
||||
if (tile.num() !== numBefore) return tile.num();
|
||||
const degraded = degradeFace(direction);
|
||||
if (degraded !== direction) {
|
||||
tile.setFaceDirection(degraded);
|
||||
}
|
||||
return tile.num();
|
||||
return tile.setFaceDirection(direction);
|
||||
}
|
||||
|
||||
@shouldReplay('Updating dynamic tile position should be replayed.')
|
||||
|
||||
Reference in new issue
Block a user