Skip to content

Commit

Permalink
Initialize opacity at 255 for tilemaps (#7182)
Browse files Browse the repository at this point in the history
Don't show in changelog
  • Loading branch information
AlexandreSi authored Nov 21, 2024
1 parent 6ed0e8e commit 5f01ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Extensions/TileMap/simpletilemapruntimeobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace gdjs {
*/
private static readonly workingPoint: FloatPoint = [0, 0];

_opacity: float;
_opacity: float = 255;
_atlasImage: string;
_tileMapManager: gdjs.TileMap.TileMapRuntimeManager;
_renderer: gdjs.TileMapRuntimeObjectPixiRenderer;
Expand Down Expand Up @@ -71,7 +71,7 @@ namespace gdjs {
tileHeight: this._tileSize,
dimX: 1,
dimY: 1,
layers: [{ id: 0, alpha: this._opacity, tiles: [] }],
layers: [{ id: 0, alpha: this._opacity / 255, tiles: [] }],
};
this._initialTilesWithHitBox = (objectData.content
.tilesWithHitBox as string)
Expand Down

0 comments on commit 5f01ce8

Please sign in to comment.