Skip to content

Commit

Permalink
Update tilemap.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Oct 20, 2024
1 parent 5eb3040 commit 422aec1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions cocos/tiledmap/assembler/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ let _accessor: StaticVBAccessor = null!;
* 可通过 `UI.simple` 获取该组装器。
*/
class Simple implements IAssembler {
updateUVs (comp: TiledLayer): void {
}

private ensureAccessor (): void {
if (!_accessor) {
const device = director.root!.device;
Expand Down
7 changes: 4 additions & 3 deletions cocos/tiledmap/tiled-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1463,9 +1463,10 @@ export class TiledLayer extends UIRenderer {

protected _flushAssembler (): void {
const assembler = TiledLayer.Assembler.getAssembler(this);
if (this._assembler !== assembler) {
this._assembler = assembler;
this._assembler.createData(this);
let curAssembler = this._assembler;
if (curAssembler !== assembler) {
curAssembler = assembler;
curAssembler.createData!(this);
}
if (this._tiledDataArray.length === 0) {
this.markForUpdateRenderData();
Expand Down

0 comments on commit 422aec1

Please sign in to comment.