mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix multiple bugs, 2
This commit is contained in:
parent
65337f90fc
commit
a1007591e5
@ -6,6 +6,8 @@ import { enumPinSlotType, WiredPinsComponent } from "../components/wired_pins";
|
|||||||
import { Entity } from "../entity";
|
import { Entity } from "../entity";
|
||||||
import { GameSystemWithFilter } from "../game_system_with_filter";
|
import { GameSystemWithFilter } from "../game_system_with_filter";
|
||||||
import { enumLayer } from "../root";
|
import { enumLayer } from "../root";
|
||||||
|
import { STOP_PROPAGATION } from "../../core/signal";
|
||||||
|
import { drawRotatedSprite } from "../../core/draw_utils";
|
||||||
|
|
||||||
export class WiredPinsSystem extends GameSystemWithFilter {
|
export class WiredPinsSystem extends GameSystemWithFilter {
|
||||||
constructor(root) {
|
constructor(root) {
|
||||||
@ -171,12 +173,16 @@ export class WiredPinsSystem extends GameSystemWithFilter {
|
|||||||
|
|
||||||
const worldPos = tile.toWorldSpaceCenterOfTile();
|
const worldPos = tile.toWorldSpaceCenterOfTile();
|
||||||
|
|
||||||
this.pinSprites[slot.type].drawCachedCentered(
|
drawRotatedSprite({
|
||||||
parameters,
|
parameters,
|
||||||
worldPos.x,
|
sprite: this.pinSprites[slot.type],
|
||||||
worldPos.y,
|
x: worldPos.x,
|
||||||
globalConfig.tileSize
|
y: worldPos.y,
|
||||||
);
|
angle: Math.radians(staticComp.rotation),
|
||||||
|
size: globalConfig.tileSize,
|
||||||
|
offsetX: 0,
|
||||||
|
offsetY: 0,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user