鱼C论坛

 找回密码
 立即注册
楼主: 小甲鱼

[技术交流] 【内测】《零基础入门学习Web开发》| 学习Web开发有前途吗?

  [复制链接]
回帖奖励 3258 鱼币 回复本帖可获得 6 鱼币奖励! 每人限 1 次(中奖概率 80%)
发表于 2019-3-11 10:34:49 | 显示全部楼层
第一次回帖,催更--,着急开发个网页
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-12 23:34:49 | 显示全部楼层
JS几时更新
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-13 16:08:59 From FishC Mobile | 显示全部楼层

回帖奖励 +6 鱼币

小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2019-3-15 16:50:38 | 显示全部楼层

回帖奖励 +6 鱼币

wow I love that
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-15 16:53:01 | 显示全部楼层
看看这个@小甲鱼:
  1. <!doctype html>
  2. <html>
  3.         <head>
  4.                 <meta charset="utf-8">

  5.                 <title>捕鱼达人</title>
  6.         </head>

  7.         <body>
  8.                 <div id="container">
  9.                         <div id="main"  >
  10.                                 <div id="stage" style="margin: 0 auto; width: 800px; height: 480px;  text-align: center; vertical-align: middle" >

  11.                                         <canvas id="canvas"  width="800" height="480">
  12.                                                 不支持画板对象时能看到
  13.                                         </canvas>
  14.                                 </div>
  15.                         </div>
  16.                 </div>
  17.                 <script type="text/javascript">
  18.                    /*
  19.                     
  20.                      
  21.                     
  22.                   
  23.                   
  24.                   
  25.                    */
  26.                         var canvas = document.getElementById("canvas");
  27.                         var ctx = canvas.getContext('2d');

  28.                         var bg = new Image();
  29.                         bg.src = "images/bg.jpg";
  30.                        
  31.                         var allFish=[];
  32.                         var score=0;
  33.                         var money=5;
  34.                         var net=new Net();
  35.                         var p="PAUSE......";
  36.                         var t;
  37.                         var A=1;
  38.                         var O=2;
  39.                         t=A;
  40.                        
  41.                         canvas.onclick=function(){
  42.                                 if(t==A){
  43.                                     money-=3;                                       
  44.                                     for(var i=0;i<allFish.length;i++){
  45.                                         switchNetCatch(i);
  46.                                     }
  47.                                     bynetType(score);
  48.                                 }        
  49.                         }
  50.                         function netCatch(i,n){                               
  51.                                         if((allFish[i].x>(net.x-50)&&allFish[i].x<(net.x+160))
  52.                                         &&(allFish[i].y>(net.y-48)&&allFish[i].y<(net.y+160))
  53.                                         &&Math.random()<n){
  54.                                                 score=score+allFish[i].score;
  55.                                                 remove(i);
  56.                                                 money+=allFish[i].money;
  57.                                 }
  58.                         }
  59.                        
  60.                         function bynetType(score){
  61.                                 if(score>0){
  62.                                         nettype=1;
  63.                                 }else if(score>200){
  64.                                         nettype=2;
  65.                                 }else if(score>400){
  66.                                         nettype=3;
  67.                                 }
  68.                         }
  69.                        
  70.                         function switchNetCatch(i){
  71.                                 var n;
  72.                                 if(allFish[i].p<=5){
  73.                                         n=0.7;
  74.                                         netCatch(i,n);
  75.                                 }else if(allFish[i].p<=9){
  76.                                         n=0.5;
  77.                                         netCatch(i,n);
  78.                                 }else if(allFish[i].p==10){
  79.                                         n=0.1;
  80.                                         netCatch(i,n);
  81.                                 }else{
  82.                                         n=0.35;
  83.                                         netCatch(i,n);
  84.                                 }
  85.                         }
  86.                        
  87.                         canvas.onmouseout = function() {
  88.                                 if(t==A&&money!=0){
  89.                                         t=3;
  90.                                 };
  91.                         };
  92.                        
  93.                         canvas.onmouseover = function() {
  94.                                 if(t==3){
  95.                                         t=A;
  96.                                 };
  97.                         }
  98.                        
  99.                         setInterval(function() {
  100.                                 if(t==A){
  101.                                 w();
  102.                                 ctx.drawImage(bg,0,0);
  103.                                 for(var i=0;i<allFish.length;i++){
  104.                                         allFish[i].paint(ctx);
  105.                                 }
  106.                                 fillText(ctx,"red","SCORE:",score,10,20);
  107.                 fillText(ctx,"red","MONEY:",money,650,20);                                                
  108.                                 for(var i=0;i<allFish.length;i++){
  109.                                         allFish[i].step();
  110.                                         allFish[i].hit(i);
  111.                                 }
  112.                                 fishCount();
  113.                                 net.paint(ctx);
  114.                                 }else if(t==O){
  115.                                 ctx.drawImage(bg,0,0);
  116.                                 for(var i=0;i<allFish.length;i++){
  117.                                         allFish[i].paint(ctx);
  118.                                 }
  119.                                 fillText(ctx,"red","SCORE:",score,10,20);
  120.                                 fillText(ctx,"red","MONEY:",money,650,20);
  121.                                 for(var i=0;i<allFish.length;i++){
  122.                                         allFish[i].step();
  123.                                 }
  124.                                 fishCount();
  125.                                         ctx.font="70px Verdana";
  126.                                     ctx.fillStyle="red";
  127.                                         ctx.fillText("GAME OVER",180,300);
  128.                                         x();
  129.                                         }else{
  130.                                                 ctx.drawImage(bg,0,0);
  131.                         for(var i=0;i<allFish.length;i++){
  132.                                                 allFish[i].paint(ctx);allFish[i].hit(i);
  133.                                         }
  134.                                                 fillText(ctx,"red","SCORE:",score,10,20);
  135.                                         fillText(ctx,"red","MONEY:",money,650,20);
  136.                                         ctx.font="70px Verdana";
  137.                                         ctx.fillStyle="red";
  138.                                             ctx.fillText(p,180,300);
  139.                                         
  140.                                         }                       
  141.                                 fillText(ctx,"red","FISHCOUNT:",allFish.length,10,40);
  142.                         }, 10);
  143.                         function w(){
  144.                                 if(money<1){
  145.                                         t=O;
  146.                                         money=0;
  147.                                 }
  148.                         }
  149.                         function remove(i){
  150.                                 allFish.splice(i,1);
  151.                         }
  152.                                                                                
  153.                         function isActionTime(lastTime, interval) {
  154.                                 if (lastTime == 0) {
  155.                                         return true;
  156.                                 }
  157.                                 var currentTime = new Date().getTime();
  158.                                 return currentTime - lastTime >= interval;
  159.                         }

  160.             function getPointOnCanvas(x, y) {
  161.                                 var bbox = canvas.getBoundingClientRect();
  162.                                 return {
  163.                                         x : x - bbox.left,
  164.                                         y : y - bbox.top
  165.                                 };
  166.                         }

  167.                         canvas.onmousemove = function(e) {
  168.                                         var mpoint = getPointOnCanvas(e.x, e.y);
  169.                                         net.x = mpoint.x - 80;
  170.                                         net.y = mpoint.y - 80;
  171.                         };
  172.                        
  173.                         var Time=0;
  174.                         var interval=800;
  175.                         function fishCount(){
  176.                                 if(!isActionTime(Time, interval)){
  177.                                         return
  178.                                 }
  179.                                 Time = new Date().getTime();
  180.                                 allFish[allFish.length]=new Fish();
  181.                         }                       
  182.                                                
  183.                         function fillText(ctx,color,Text,so,x,y){
  184.                                 ctx.font="20px Verdana";
  185.                                 ctx.fillText(Text+so,x,y);                               
  186.                         }       
  187.                         function Fish(){
  188.                                 this.x=800;
  189.                 this.life=0;
  190.                                 this.y=Math.random()*(480-100);                               
  191.                                 var randomFish=parseInt(Math.random()*11+1);
  192.                                 this.p=randomFish;
  193.                                 if(randomFish != 11){
  194.                                     this.money=randomFish%11;
  195.                                     this.score=randomFish%11;
  196.                                 }else{
  197.                                     this.money=randomFish-1;
  198.                                     this.score=randomFish-1;
  199.                                 }
  200.                                
  201.                                 var fish=[];
  202.                                 for(var i=0;i<10;i++){
  203.                                         var fishImage=new Image();
  204.                                         fishImage.src="images/fish"+randomFish+"_"+i+".png";
  205.                                         fish[i]=fishImage;
  206.                                 };
  207.                                 this.frame=fish[0];
  208.                     var interval = 70;
  209.                         var lastTime = 0;
  210.                         function timeOut() {
  211.                                 var current = new Date().getTime();
  212.                                 var t = current - lastTime;
  213.                                 if (t >= interval) {
  214.                                         lastTime = current;
  215.                                         return false;
  216.                                 }
  217.                                 return true;
  218.                         };
  219.                        
  220.                         var index=0;
  221.                        
  222.                         this.step=function(){                               
  223.                                 if(!timeOut()){
  224.                                     this.x=this.x-2;
  225.                                     this.frame=fish[index%10];
  226.                                     index=index+1;
  227.                             }
  228.                         }
  229.                         this.paint=function(ctx){
  230.                                 ctx.drawImage(this.frame,this.x,this.y);
  231.                         }
  232.                         this.hit=function(i){
  233.                                 if(this.x<-950){
  234.                                         allFish[i].splice(0,1);
  235.                                 }
  236.                         }
  237.                         }
  238.                        
  239.                         function Net(){
  240.                                 var n=new Image();
  241.                                 n.src="images/net.png";
  242.                                 this.x=0;
  243.                                 this.y=0;
  244.                                 this.paint=function(ctx){
  245.                                         ctx.drawImage(n,this.x,this.y);
  246.                                 }
  247.                         }
  248.                        
  249.                 </script>
  250.         </body>
  251. </html>

复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-16 10:52:18 | 显示全部楼层

回帖奖励 +6 鱼币

这个javascript是还没出的意思吗
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-16 19:36:53 | 显示全部楼层

                               
登录/注册后可看大图

支持鱼神!!支持鱼神!!
I love FishC.com
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-16 19:38:24 | 显示全部楼层
python和web都会了(^—^)
以后用python和web编个程序
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-16 19:39:13 | 显示全部楼层
哇马一记!
FishC.png
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-17 09:01:49 | 显示全部楼层
回复
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2019-3-18 19:08:43 | 显示全部楼层
666
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2019-3-26 16:27:54 | 显示全部楼层
小甲鱼, web的啥时候更啊, 等了好久啦
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-27 18:51:49 | 显示全部楼层

回帖奖励 +6 鱼币

嘻嘻,哔哩哔哩网站自带播放器播放,贼舒畅!
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-3-31 14:32:44 | 显示全部楼层

回帖奖励 +6 鱼币

更到多少集了?我看到25了
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-4-1 11:44:20 | 显示全部楼层

回帖奖励 +6 鱼币

直接a站看的,也很清晰,讲的不错。
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-4-4 18:11:03 | 显示全部楼层

回帖奖励 +6 鱼币

个为什么更新的这么慢啊 课后作业也没更新 55555
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-4-6 02:34:55 | 显示全部楼层

回帖奖励 +6 鱼币

正在学习中
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-4-6 08:35:11 | 显示全部楼层

回帖奖励 +6 鱼币

小甲鱼还更新嘛??
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-4-12 15:39:06 | 显示全部楼层
确实更新, 更新,更。。。新。。。的好慢啊
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-5-2 13:00:06 | 显示全部楼层

回帖奖励 +6 鱼币

围观
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-22 15:09

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表