h
This commit is contained in:
parent
e00bfd8879
commit
f941200504
70 changed files with 1856 additions and 429 deletions
|
|
@ -415,10 +415,11 @@ class AntActor {
|
|||
return this.kind === "queen" ? "ant_queen" : this.workerSpriteId();
|
||||
}
|
||||
|
||||
draw(ctx, time = 0, lighting = null) {
|
||||
draw(ctx, ...args) {
|
||||
if (this.dead) return;
|
||||
const id = this.spriteId();
|
||||
const img = getRenderableImage(id, id);
|
||||
const lighting = args.find(value => value && typeof value === "object") || null;
|
||||
const lightState = lighting || getLightingState(this.world);
|
||||
ctx.save();
|
||||
const shadow = projectedShadowParams(lightState, this.kind === "queen" ? 0.78 : 0.26);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue