{"id":197269,"student_id":12205,"content":"setBackdrop(\"sky.jpg\");\nvar cat = createSprite(\"cat.png\");\ncat.x=320;\ncat.y=420;\ncat.health = 25;\ncat.shiver = function(){\n var count = 10;\n\tvar interval = setInterval(function(){\n if(count%2==0){\n \tcat.x-=2; \n } else {\n \tcat.x+=2; \n }\n count--;\n \tif(count\u003c=0){\n clearInterval(interval);\n \t\tcat.shivering = false;\n }\n },50);\n cat.shivering = true;\n};\ncat.die = function(){\n cat.dead=true;\n var catSoul = createSprite(\"cat.png\");\n catSoul.x=cat.x;\n catSoul.y=cat.y;\n catSoul.opacity = 0.5;\n catSoul.forever(function(){\n this.y-=1;\n });\n};\nsetInterval(function(){\n\tvar snow = createSprite(\"snow.png\");\n snow.x = Math.random()*640;\n snow.y = -20;\n snow.v = 0.3+Math.random()*0.3;\n snow.direction = 180;\n snow.opacity = 0.5+Math.random()*0.5;\n snow.scale = 0.1+Math.random()*0.4;\n snow.forever(function(){\n if(this.touchedCat){\n \n } else if(this.touched(cat)){\n cat.health-=1;\n this.y+=3;\n if(cat.health==0){\n cat.die();\n } else if(!cat.dead \u0026\u0026 !cat.shivering){\n \tcat.shiver();\n }\n \tthis.touchedCat=true;\n } else if(this.y\u003e500){\n \tthis.destroy(); \n } else {\n if (this.distanceTo(cursor)\u003c40){\n this.toward(cursor); \n this.direction-=180; \n this.v = (45-this.distanceTo(cursor))/4;\n }\n if(this.direction\u003e180){\n this.direction-=1;\n } else if (this.direction\u003c180){\n this.direction+=1;\n }\n if(this.v\u003e0.6){this.v-=0.01;}\n \tthis.stepForward(this.v); \n }\n });\n},50);\n","created_at":"2020-10-23T19:33:27.591+08:00","updated_at":"2020-10-23T19:33:27.591+08:00","name":"保護街貓 副本","language":"javascript","screenshot":{"url":null},"parent_id":5723,"plugin":"","description":"用滑鼠將落雪趕走,別讓雪掉到貓貓的身上。\n如果掉了太多貓貓會冷死哦~","note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":45,"hashid":"6rps98ee5","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3384578,"file_name":"snow.png","project_id":197269,"asset_id":16805,"created_at":"2020-10-23T19:33:27.596+08:00","updated_at":"2020-10-23T19:33:27.596+08:00"},{"id":3384579,"file_name":"sky.jpg","project_id":197269,"asset_id":16806,"created_at":"2020-10-23T19:33:27.598+08:00","updated_at":"2020-10-23T19:33:27.598+08:00"},{"id":3384580,"file_name":"cat.png","project_id":197269,"asset_id":16807,"created_at":"2020-10-23T19:33:27.598+08:00","updated_at":"2020-10-23T19:33:27.598+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦