Forked from: hoge1e4's Tonyu 2 Runner View Diff (487) Meta Clicker hoge1e4 Follow 2014-10-07 14:38:43 License: MIT License Fork1 Fav3 View1931 Play Stop Reload Fullscreen Smart Phone Fork tree Readme JavaScript 2 lines HTML 487 lines CSS 10 lines 去年流行ったあのゲームに似ているようでちょっと違うゲームです クリックしてお金を増やします. 自動的にクリックしてくれるカーソルも買えます. (ただし,お金が足りないのに買うとゲームオーバーになります) Meta Clicker timbre.js Tonyu 2 Module jQuery v2.0.3 // forked from hoge1e4's "Tonyu 2 Runner" http://jsdo.it/hoge1e4/y7Jo // JavaScriptタブは空にしてください. <div id='splash' style='position:relative'> <!--ここに,ロード中に表示する内容を記述できます--> </div> <!-- このプログラムをTonyuの開発環境で編集するには, http://tonyuedit.appspot.com/html/build/importFromJsdoit.html を開きます. --> <script language='text/tonyu' type='text/tonyu' data-filename='Time.tonyu'>t=0; size=20; new TextShade{parent:this}; while(true) { t++; text="Time: "+floor(t/30); update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Button.tonyu'>includes ColMod; zOrder=0; padding=10; bwidth=$screenWidth*0.8; x=$screenWidth/2; clicked=0; count=0; new ButtonFlash{b:this}; r=getCrashRect(); while (true) { /*if (clicked>0) { clicked++; if (clicked>25) clicked=0; }*/ waitInputDevice(); mouseClicked=getkey(1)==1; touched=!ptouch && $touches[0].touched ; ptouch=$touches[0].touched; if (!clickedInThisFrame && (mouseClicked || touched) && $mouseX>r.x-r.width/2 && $mouseX<r.x+r.width/2 && $mouseY>r.y-r.height/2 && $mouseY<r.y+r.height/2) { clickedBy=mouseClicked ?"mouse":"touch"; doClick({x:$mouseX,y:$mouseY,count:1}); } // update(); } \id() { if (!_id) _id=rnd()+""; return _id; } \doClick(t) { clickedInThisFrame=true; clicked=1; if (onClick) onClick.apply(this,[t]); } \draw(c) { c.fillStyle=color(brighter(col,clicked==0?0:0.5-clicked/50)); //"rgb("+(clicked ? 255-clicked*10: 0)+",200,0)"; var affordable=$mon.value>=cost; if (!affordable) c.fillStyle="gray"; r=getCrashRect(); /* c.fillRect(x-bwidth/2,y-padding, bwidth,height+padding*2); */ c.strokeStyle="black"; c.fillRect(r.x-r.width/2, r.y-r.height/2, r.width, r.height); c.strokeRect(r.x-r.width/2, r.y-r.height/2, r.width, r.height); fillStyle=(clicked>0?"black":"white"); super.draw(c); c.fillText(count, r.x+r.width/2-70, r.y); if (!affordable) { c.fillStyle="red"; c.font="40px monospace"; c.fillText("X",r.x-r.width/2,r.y-r.height/2); } } \getCrashRect() { return {x,y:y-padding+height, width:bwidth+padding*2,height:height+padding*2}; }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Main.tonyu'>includes ColMod; $Screen.setBGColor(color(0,120,230)); while(true) { new BG; $mon=new Money{x:60,y:20}; $ti=null; pitch=50; y=60; pr=new Button{text:"+$1",name:"+$1",cost:0,y, col:{r:0,g:200,b:0}, onClick: \(t) { if (!$ti) { $ti=new Time{x:200, y:20}; new Graph; } new Point{x:t.x,y:t.y,value:t.count}; } }; $hs=new HiScore; y+=pitch; $clr=false; pr=genButton(pr, 5, y,{r:180,g:180,b:0}); y+=pitch; //new ClearChecker{pr}; pr=genButton(pr, 50, y,{r:200,g:0,b:0}); y+=pitch; //pr=genButton(pr, 50, y); //y+=pitch; pr=genButton(pr, 100, y,{r:0,g:0,b:255}); y+=pitch; pr=genButton(pr, 5000, y,{r:0,g:200,b:100}); y+=pitch; pr=genButton(pr, 100000, y,{r:0,g:150,b:200}); y+=pitch; pr=genButton(pr, 1000000, y,{r:200,g:0,b:100}); y+=pitch; pr=genButton(pr, 10000000, y,{r:0,g:50,b:100}); new ClearChecker{pr}; y+=pitch; new Merger; while(!$mon.gov) { update(); if ($clr) { new Actor{x:$screenWidth/2,y:$screenHeight/2,text:"Clear", size:40}; $hs.regist($mon.value, floor($ti.t/30)); break; } } all(Cursor).die(); updateEx(30); all(Cursor).die(); updateEx(30); all().die(); } \genButton(prev,cost, y,col) { var b; b=new Button{ text:prev.name+" Clicker: $"+cost, y,name:"$"+cost,cost,col, onClick: \(t) { new Point{x:t.x,y:t.y,value:-cost*t.count}; newCur(t.x,t.y,prev,t.count,col); b.count+=t.count; } }; return b; } \newCur(x,y,t,count,col) { var len=all(Cursor).length; var spd=0.1; cc=floor(count/5); if (len>20) {cc=floor(count/3);spd=0.2;} if (len>30) {cc=floor(count/2);spd=0.3;} if (len>50) {cc=count;spd=0.5;} if (cc<1) cc=1; cc=count; while (count>0) { if (count<cc) cc=count; new Cursor{x,y,t,count:cc,spd,col}; count-=cc; } }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Point.tonyu'>$mon.value+=value; zOrder=-1; for (i=0; i<20 ;i++ ){ text=(value>0?"+"+value:value); y-=2; update(); } die();</script> <script language='text/tonyu' type='text/tonyu' data-filename='Money.tonyu'>value=0; size=20; zOrder=0; new TextShade{parent:this}; while (true) { if (value<0) { text="Game Over"; gov=true; break; } else { text="$"+value; } update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Cursor.tonyu'>includes ColMod; r=t.getCrashRect(); tx=r.x-r.width/2+2+rnd(r.width-4); ty=r.y-r.height/2+2+rnd(r.height-4); zOrder=-100; if (!count) count=1; while(dist(tx-x,ty-y)>=3) { x+=(tx-x)*spd; y+=(ty-y)*spd; update(); } while(true) { dc(); /*cs=all(Cursor); // print(rnd()<cs.length/30); if (cs.length>1) { mc=cs[rnd(cs.length)]; if (mc.t===t && mc.count && dist(mc)<10+cs.length) { merge(mc,cs.length/50); } }*/ if (mc) merge(mc,0.5); update(); } \dc() { if(rnd()<0.03 ) { //$mon.value+=count-1; t.doClick(this); } } \merge(mc,spd) { if (spd>1) spd=1; while(dist(mc)>3) { x+=(mc.x-x)*spd; y+=(mc.y-y)*spd; dc(); update(); } if (!isDead() && !mc.isDead()) { mc.die(); count+=mc.count; } } \inRect() { return x>r.x-r.width/2 && x<r.x+r.width/2 && y>r.y-r.height/2 && y<r.y+r.height/2; } \draw(cv) { cv.fillStyle=color(brighter(col,0.5)); cv.strokeStyle="black"; cv.beginPath(); cv.moveTo(x,y); cv.lineTo(x+10,y); cv.lineTo(x+7,y+3); cv.lineTo(x+7+5,y+3+5); cv.lineTo(x+3+5,y+7+5); cv.lineTo(x+3,y+7); cv.lineTo(x,y+10); cv.closePath(); cv.fill(); cv.stroke(); /* cv.moveTo(x,y+10); cv.lineTo(x,y); cv.lineTo(x+10,y); cv.stroke(); cv.beginPath(); cv.moveTo(x,y); cv.lineTo(x+20,y+20); cv.stroke(); */ if (count>1) { cv.strokeText(count, x+16,y+1); cv.fillText(count, x+15,y); } }</script> <script language='text/tonyu' type='text/tonyu' data-filename='ButtonFlash.tonyu'>while(true) { if (b.clicked>0) { b.clicked++; if (b.clicked>25) b.clicked=0; } b.clickedInThisFrame=false; update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='ColMod.tonyu'>\color(r,g,b,a) { if (typeof r=="object") { return color(r.r,r.g,r.b,r.a); } if (a) { return "rgba("+[r,g,b,a].join(",")+")"; } return "rgb("+[r,g,b].join(",")+")"; } \brighter(c,rate) { var res={}; //rate=1-rate; if (typeof c.r=="number") res.r=floor(c.r+(255-c.r)*rate); if (typeof c.g=="number") res.g=floor(c.g+(255-c.g)*rate); if (typeof c.b=="number") res.b=floor(c.b+(255-c.b)*rate); return res; }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Merger.tonyu'>while (true) { cs=all(Cursor); if (cs.length>20) { tbl={}; for (c in cs) { id=c.t.id(); if (tbl[id]) { c.mc=tbl[id]; delete tbl[id]; } else tbl[id]=c; } } update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Graph.tonyu'>panel=new Panel(); panel.setPanel($screenWidth,$screenHeight); panel.zOrder=-1000; panel.x=$screenWidth/2; panel.y=$screenHeight/2; ctx=panel.buf[0].getContext("2d"); monLine=new GraphLine; time=0; tScale=$screenWidth; vScale=$Math.log(10); plotsI=0; cnt=0; redraw(); while (true) { ctx.strokeStyle="white"; plots=monLine.plots; if (plotsI<plots.length-1) { plotsI++; if (plotsI>=1) { ctx.beginPath(); p1=plot2scr(plots[plotsI]); p2=plot2scr(plots[plotsI-1]); ctx.moveTo(p1.x,p1.y); ctx.lineTo(p2.x,p2.y); ctx.stroke(); if (p1.x>=$screenWidth) resizeTime(); if (p1.y<=0) resizeValue(); } } cnt++; if (cnt % 8==0) update(); } \plot2scr(p) { var v=p.value; if (v<1) v=1; return {x: p.time/tScale*$screenWidth, y:$screenHeight-$Math.log(v)/vScale*$screenHeight}; } \resizeValue() { vScale*=2; redraw(); } \resizeTime() { tScale*=2; waitTime*=2; monLine.resizeTime(); redraw(); } \redraw() { plotsI=0; panel.clearRect(0,0,$screenWidth,$screenHeight); panel.setFillStyle("yellow"); for (var i=10; i<100000000000 ; i*=10) { var y=plot2scr{value:i}.y; if (y<0) break; panel.fillRect(0,y,$screenWidth,1); panel.fillText(i,0,y+10,10); } /*ctx.strokeStyle="white"; ctx.beginPath(); p1=plot2scr(plots[0]); ctx.moveTo(p1.x,p1.y); for (var i=1 ; i<plots.length; i++) { p1=plot2scr(plots[i]); ctx.lineTo(p1.x,p1.y); } ctx.stroke();*/ }</script> <script language='text/tonyu' type='text/tonyu' data-filename='GraphLine.tonyu'>\onAppear() { plots=[]; time=0; waitTime=1; } while (true) { plots.push{time, value:$mon.value}; //if (plots.length>capacity) resizeTime(); time+=waitTime; updateEx(waitTime); } \resizeTime() { var np=[]; for (var i,plot in plots) { if (i%2==0) { np.push(plot); } } plots=np; waitTime+=2; } </script> <script language='text/tonyu' type='text/tonyu' data-filename='ClearChecker.tonyu'>$clr=false; x=350;y=25; text=""; new TextShade{parent:this}; while(true) { if (pr.count>0) { break; } update(); } for (i=60;i>0;i--) { text=i+"sec to clear"; updateEx(30); } text="Clear"; $clr=true; </script> <script language='text/tonyu' type='text/tonyu' data-filename='BG.tonyu'>includes ColMod; pa=new Panel{x:$screenWidth/2, y: $screenHeight/2 }; pa.setPanel($screenWidth, $screenHeight); pa.zOrder=1000; for (i=0 ; i<$screenHeight ; i++) { pa.setFillStyle(color(floor(i/2),150,255)); pa.fillRect(0,i*2,$screenWidth,1); pa.setFillStyle(color(floor(i/2),200,255)); pa.fillRect(0,i*2+1,$screenWidth,1); } </script> <script language='text/tonyu' type='text/tonyu' data-filename='TextShade.tonyu'>fillStyle="black"; while (true) { x=parent.x+1; y=parent.y+1; zOrder=parent.zOrder+1; size=parent.size; text=parent.text; update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='HiScore.tonyu'>d=load(); if (!d) d={}; zOrder=0; new TextShade{parent:this}; x=$screenWidth/2;y=$screenHeight-20; size=15; while (true) { if (d.score && d.time) { text="Hiscore: $"+d.score+" Fastest Clear: "+d.time+"sec."; } else { text=""; } update(); } \regist(score, time) { if (!d.score || score>d.score) { d.score=score; } if (!d.time || time<d.time) { d.time=time; } save(); } \load() { return file("hiscore.json").obj(); } \save() { return file("hiscore.json").obj(d); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='options.json' data-wrap='80'>{"compiler":{"defaultSuperClass":"Actor","commentLastPos":true,"diagnose":false}\ ,"run":{"mainClass":"Main","bootClass":"Boot"},"kernelEditable":false} </script> <script language='text/tonyu' type='text/tonyu' data-filename='.desktop' data-wrap='80'>{"runMenuOrd":["Main","BG","Button","Time","Point","Money","Cursor","ButtonFlash\ ","ColMod","Merger","Graph","GraphLine","ClearChecker"]} </script> Meta Clicker * { margin: 0; padding: 0; border: 0; } body { background: #ddf; font: 30px sans-serif; } 去年流行ったあのゲームに似ているようでちょっと違うゲームです クリックしてお金を増やします. 自動的にクリックしてくれるカーソルも買えます. (ただし,お金が足りないのに買うとゲームオーバーになります) // forked from hoge1e4's "Tonyu 2 Runner" http://jsdo.it/hoge1e4/y7Jo // JavaScriptタブは空にしてください. <div id='splash' style='position:relative'> <!--ここに,ロード中に表示する内容を記述できます--> </div> <!-- このプログラムをTonyuの開発環境で編集するには, http://tonyuedit.appspot.com/html/build/importFromJsdoit.html を開きます. --> <script language='text/tonyu' type='text/tonyu' data-filename='Time.tonyu'>t=0; size=20; new TextShade{parent:this}; while(true) { t++; text="Time: "+floor(t/30); update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Button.tonyu'>includes ColMod; zOrder=0; padding=10; bwidth=$screenWidth*0.8; x=$screenWidth/2; clicked=0; count=0; new ButtonFlash{b:this}; r=getCrashRect(); while (true) { /*if (clicked>0) { clicked++; if (clicked>25) clicked=0; }*/ waitInputDevice(); mouseClicked=getkey(1)==1; touched=!ptouch && $touches[0].touched ; ptouch=$touches[0].touched; if (!clickedInThisFrame && (mouseClicked || touched) && $mouseX>r.x-r.width/2 && $mouseX<r.x+r.width/2 && $mouseY>r.y-r.height/2 && $mouseY<r.y+r.height/2) { clickedBy=mouseClicked ?"mouse":"touch"; doClick({x:$mouseX,y:$mouseY,count:1}); } // update(); } \id() { if (!_id) _id=rnd()+""; return _id; } \doClick(t) { clickedInThisFrame=true; clicked=1; if (onClick) onClick.apply(this,[t]); } \draw(c) { c.fillStyle=color(brighter(col,clicked==0?0:0.5-clicked/50)); //"rgb("+(clicked ? 255-clicked*10: 0)+",200,0)"; var affordable=$mon.value>=cost; if (!affordable) c.fillStyle="gray"; r=getCrashRect(); /* c.fillRect(x-bwidth/2,y-padding, bwidth,height+padding*2); */ c.strokeStyle="black"; c.fillRect(r.x-r.width/2, r.y-r.height/2, r.width, r.height); c.strokeRect(r.x-r.width/2, r.y-r.height/2, r.width, r.height); fillStyle=(clicked>0?"black":"white"); super.draw(c); c.fillText(count, r.x+r.width/2-70, r.y); if (!affordable) { c.fillStyle="red"; c.font="40px monospace"; c.fillText("X",r.x-r.width/2,r.y-r.height/2); } } \getCrashRect() { return {x,y:y-padding+height, width:bwidth+padding*2,height:height+padding*2}; }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Main.tonyu'>includes ColMod; $Screen.setBGColor(color(0,120,230)); while(true) { new BG; $mon=new Money{x:60,y:20}; $ti=null; pitch=50; y=60; pr=new Button{text:"+$1",name:"+$1",cost:0,y, col:{r:0,g:200,b:0}, onClick: \(t) { if (!$ti) { $ti=new Time{x:200, y:20}; new Graph; } new Point{x:t.x,y:t.y,value:t.count}; } }; $hs=new HiScore; y+=pitch; $clr=false; pr=genButton(pr, 5, y,{r:180,g:180,b:0}); y+=pitch; //new ClearChecker{pr}; pr=genButton(pr, 50, y,{r:200,g:0,b:0}); y+=pitch; //pr=genButton(pr, 50, y); //y+=pitch; pr=genButton(pr, 100, y,{r:0,g:0,b:255}); y+=pitch; pr=genButton(pr, 5000, y,{r:0,g:200,b:100}); y+=pitch; pr=genButton(pr, 100000, y,{r:0,g:150,b:200}); y+=pitch; pr=genButton(pr, 1000000, y,{r:200,g:0,b:100}); y+=pitch; pr=genButton(pr, 10000000, y,{r:0,g:50,b:100}); new ClearChecker{pr}; y+=pitch; new Merger; while(!$mon.gov) { update(); if ($clr) { new Actor{x:$screenWidth/2,y:$screenHeight/2,text:"Clear", size:40}; $hs.regist($mon.value, floor($ti.t/30)); break; } } all(Cursor).die(); updateEx(30); all(Cursor).die(); updateEx(30); all().die(); } \genButton(prev,cost, y,col) { var b; b=new Button{ text:prev.name+" Clicker: $"+cost, y,name:"$"+cost,cost,col, onClick: \(t) { new Point{x:t.x,y:t.y,value:-cost*t.count}; newCur(t.x,t.y,prev,t.count,col); b.count+=t.count; } }; return b; } \newCur(x,y,t,count,col) { var len=all(Cursor).length; var spd=0.1; cc=floor(count/5); if (len>20) {cc=floor(count/3);spd=0.2;} if (len>30) {cc=floor(count/2);spd=0.3;} if (len>50) {cc=count;spd=0.5;} if (cc<1) cc=1; cc=count; while (count>0) { if (count<cc) cc=count; new Cursor{x,y,t,count:cc,spd,col}; count-=cc; } }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Point.tonyu'>$mon.value+=value; zOrder=-1; for (i=0; i<20 ;i++ ){ text=(value>0?"+"+value:value); y-=2; update(); } die();</script> <script language='text/tonyu' type='text/tonyu' data-filename='Money.tonyu'>value=0; size=20; zOrder=0; new TextShade{parent:this}; while (true) { if (value<0) { text="Game Over"; gov=true; break; } else { text="$"+value; } update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Cursor.tonyu'>includes ColMod; r=t.getCrashRect(); tx=r.x-r.width/2+2+rnd(r.width-4); ty=r.y-r.height/2+2+rnd(r.height-4); zOrder=-100; if (!count) count=1; while(dist(tx-x,ty-y)>=3) { x+=(tx-x)*spd; y+=(ty-y)*spd; update(); } while(true) { dc(); /*cs=all(Cursor); // print(rnd()<cs.length/30); if (cs.length>1) { mc=cs[rnd(cs.length)]; if (mc.t===t && mc.count && dist(mc)<10+cs.length) { merge(mc,cs.length/50); } }*/ if (mc) merge(mc,0.5); update(); } \dc() { if(rnd()<0.03 ) { //$mon.value+=count-1; t.doClick(this); } } \merge(mc,spd) { if (spd>1) spd=1; while(dist(mc)>3) { x+=(mc.x-x)*spd; y+=(mc.y-y)*spd; dc(); update(); } if (!isDead() && !mc.isDead()) { mc.die(); count+=mc.count; } } \inRect() { return x>r.x-r.width/2 && x<r.x+r.width/2 && y>r.y-r.height/2 && y<r.y+r.height/2; } \draw(cv) { cv.fillStyle=color(brighter(col,0.5)); cv.strokeStyle="black"; cv.beginPath(); cv.moveTo(x,y); cv.lineTo(x+10,y); cv.lineTo(x+7,y+3); cv.lineTo(x+7+5,y+3+5); cv.lineTo(x+3+5,y+7+5); cv.lineTo(x+3,y+7); cv.lineTo(x,y+10); cv.closePath(); cv.fill(); cv.stroke(); /* cv.moveTo(x,y+10); cv.lineTo(x,y); cv.lineTo(x+10,y); cv.stroke(); cv.beginPath(); cv.moveTo(x,y); cv.lineTo(x+20,y+20); cv.stroke(); */ if (count>1) { cv.strokeText(count, x+16,y+1); cv.fillText(count, x+15,y); } }</script> <script language='text/tonyu' type='text/tonyu' data-filename='ButtonFlash.tonyu'>while(true) { if (b.clicked>0) { b.clicked++; if (b.clicked>25) b.clicked=0; } b.clickedInThisFrame=false; update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='ColMod.tonyu'>\color(r,g,b,a) { if (typeof r=="object") { return color(r.r,r.g,r.b,r.a); } if (a) { return "rgba("+[r,g,b,a].join(",")+")"; } return "rgb("+[r,g,b].join(",")+")"; } \brighter(c,rate) { var res={}; //rate=1-rate; if (typeof c.r=="number") res.r=floor(c.r+(255-c.r)*rate); if (typeof c.g=="number") res.g=floor(c.g+(255-c.g)*rate); if (typeof c.b=="number") res.b=floor(c.b+(255-c.b)*rate); return res; }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Merger.tonyu'>while (true) { cs=all(Cursor); if (cs.length>20) { tbl={}; for (c in cs) { id=c.t.id(); if (tbl[id]) { c.mc=tbl[id]; delete tbl[id]; } else tbl[id]=c; } } update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='Graph.tonyu'>panel=new Panel(); panel.setPanel($screenWidth,$screenHeight); panel.zOrder=-1000; panel.x=$screenWidth/2; panel.y=$screenHeight/2; ctx=panel.buf[0].getContext("2d"); monLine=new GraphLine; time=0; tScale=$screenWidth; vScale=$Math.log(10); plotsI=0; cnt=0; redraw(); while (true) { ctx.strokeStyle="white"; plots=monLine.plots; if (plotsI<plots.length-1) { plotsI++; if (plotsI>=1) { ctx.beginPath(); p1=plot2scr(plots[plotsI]); p2=plot2scr(plots[plotsI-1]); ctx.moveTo(p1.x,p1.y); ctx.lineTo(p2.x,p2.y); ctx.stroke(); if (p1.x>=$screenWidth) resizeTime(); if (p1.y<=0) resizeValue(); } } cnt++; if (cnt % 8==0) update(); } \plot2scr(p) { var v=p.value; if (v<1) v=1; return {x: p.time/tScale*$screenWidth, y:$screenHeight-$Math.log(v)/vScale*$screenHeight}; } \resizeValue() { vScale*=2; redraw(); } \resizeTime() { tScale*=2; waitTime*=2; monLine.resizeTime(); redraw(); } \redraw() { plotsI=0; panel.clearRect(0,0,$screenWidth,$screenHeight); panel.setFillStyle("yellow"); for (var i=10; i<100000000000 ; i*=10) { var y=plot2scr{value:i}.y; if (y<0) break; panel.fillRect(0,y,$screenWidth,1); panel.fillText(i,0,y+10,10); } /*ctx.strokeStyle="white"; ctx.beginPath(); p1=plot2scr(plots[0]); ctx.moveTo(p1.x,p1.y); for (var i=1 ; i<plots.length; i++) { p1=plot2scr(plots[i]); ctx.lineTo(p1.x,p1.y); } ctx.stroke();*/ }</script> <script language='text/tonyu' type='text/tonyu' data-filename='GraphLine.tonyu'>\onAppear() { plots=[]; time=0; waitTime=1; } while (true) { plots.push{time, value:$mon.value}; //if (plots.length>capacity) resizeTime(); time+=waitTime; updateEx(waitTime); } \resizeTime() { var np=[]; for (var i,plot in plots) { if (i%2==0) { np.push(plot); } } plots=np; waitTime+=2; } </script> <script language='text/tonyu' type='text/tonyu' data-filename='ClearChecker.tonyu'>$clr=false; x=350;y=25; text=""; new TextShade{parent:this}; while(true) { if (pr.count>0) { break; } update(); } for (i=60;i>0;i--) { text=i+"sec to clear"; updateEx(30); } text="Clear"; $clr=true; </script> <script language='text/tonyu' type='text/tonyu' data-filename='BG.tonyu'>includes ColMod; pa=new Panel{x:$screenWidth/2, y: $screenHeight/2 }; pa.setPanel($screenWidth, $screenHeight); pa.zOrder=1000; for (i=0 ; i<$screenHeight ; i++) { pa.setFillStyle(color(floor(i/2),150,255)); pa.fillRect(0,i*2,$screenWidth,1); pa.setFillStyle(color(floor(i/2),200,255)); pa.fillRect(0,i*2+1,$screenWidth,1); } </script> <script language='text/tonyu' type='text/tonyu' data-filename='TextShade.tonyu'>fillStyle="black"; while (true) { x=parent.x+1; y=parent.y+1; zOrder=parent.zOrder+1; size=parent.size; text=parent.text; update(); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='HiScore.tonyu'>d=load(); if (!d) d={}; zOrder=0; new TextShade{parent:this}; x=$screenWidth/2;y=$screenHeight-20; size=15; while (true) { if (d.score && d.time) { text="Hiscore: $"+d.score+" Fastest Clear: "+d.time+"sec."; } else { text=""; } update(); } \regist(score, time) { if (!d.score || score>d.score) { d.score=score; } if (!d.time || time<d.time) { d.time=time; } save(); } \load() { return file("hiscore.json").obj(); } \save() { return file("hiscore.json").obj(d); }</script> <script language='text/tonyu' type='text/tonyu' data-filename='options.json' data-wrap='80'>{"compiler":{"defaultSuperClass":"Actor","commentLastPos":true,"diagnose":false}\ ,"run":{"mainClass":"Main","bootClass":"Boot"},"kernelEditable":false} </script> <script language='text/tonyu' type='text/tonyu' data-filename='.desktop' data-wrap='80'>{"runMenuOrd":["Main","BG","Button","Time","Point","Money","Cursor","ButtonFlash\ ","ColMod","Merger","Graph","GraphLine","ClearChecker"]} </script> * { margin: 0; padding: 0; border: 0; } body { background: #ddf; font: 30px sans-serif; } use an iframe compat browser, deer Play on jsdo.it games Author Share ブログに埋め込む QR Tag Download Complete! Description What kind of game? 去年流行ったあのゲームに似ているようでちょっと違うゲームです クリックしてお金を増やします. 自動的にクリックしてくれるカーソルも買えます. (ただし,お金が足りないのに買うとゲームオーバーになります) Control Device Smartphone Controllerjsdo.it WebSocket Controller» Mouse Keyboard Touch Device Fullscreen Activated Inactivated jsdo.it games から削除する Submit Author hoge1e4 URLhttp://tonyu.jp/ ゲーム開発用 AltJSの Tonyu System 2 を開発しています。 Tweet Default Panel Auto play Screenshot Readme JavaScript HTML CSS Size Width: px Height: px code <script type="text/javascript" src="http://jsdo.it/blogparts/gnkE/js"></script> game library&test tonyu Discussion Questions on this code? Tags game library&test tonyu Favorite by Kakushi uru-uni1032 greentec Forked sort by latest page views favorite forked forked: Meta Clicker totallymike 00 545 3/488/10 game library&test tonyu