Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function brush(){
- if(brushOn){
- for(var t=0;t<4;t++){
- for(var u=0;u<4;u++){
- OWOP.world.setPixel(t+Math.floor(OWOP.mouse.tileX/4)*4,u+Math.floor(OWOP.mouse.tileY/4)*4,OWOP.player.selectedColor)
- }
- }
- }
- };
- brushOn=false;
- setInterval(brush);
- OWOP.tools.addToolObject(new OWOP.tools.class("Brush", OWOP.cursors.brush, OWOP.fx.player.RECT_SELECT_ALIGNED(4), false, function(tool) {
- tool.setEvent("mousedown", () => {
- brushOn=true
- });
- tool.setEvent("mouseup", () => {
- brushOn=false
- });
- }));
Add Comment
Please, Sign In to add comment