Commit 9ef03c8e authored by Hubert Denkmair's avatar Hubert Denkmair
Browse files

make stage non-transparent for performance reasons?

parent 7cdf3048
......@@ -24,7 +24,7 @@ function GameVisualization(assets, snakeMoveStrategy, container)
[ 0xFF0000, 0xFF0000, 0xFF0000, 0xFF0000, 0xFF0000, 0xFF0000, 0xFF0000, 0xFF0000, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, ],
];
this.app = new PIXI.Application({'transparent':true});
this.app = new PIXI.Application({'transparent':false});
this.app.stage.interactiveChildren = false;
this.txHead = PIXI.Texture.fromImage(assets['head.png']);
......
......@@ -190,6 +190,6 @@ Snake.prototype.AnimateEat = function()
let factor = (dist-food.speed) / dist;
food.x = x + dx*factor;
food.y = y + dy*factor;
food.speed *= 1.2;
food.speed *= 1.3;
}
};
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment