20243197 #12

Closed
20243197 wants to merge 30 commits from 20243197/20243197:20243197 into 20243197
2 changed files with 19 additions and 17 deletions
Showing only changes of commit 27566ab9cf - Show all commits

View File

@ -84,3 +84,5 @@ User Contol: ASDW
| :--: | :-------------- | | :--: | :-------------- |
| 2025.04.14 | Updated the Markdown, initial creation of the project | | 2025.04.14 | Updated the Markdown, initial creation of the project |
| 2025.04.15 | Create the folders and js files. Create the HTML, CSS for the projects. | | 2025.04.15 | Create the folders and js files. Create the HTML, CSS for the projects. |
| 2025.04.19 | Put sprites, make initial stage. |
| 2025.04.20 | Done with initial stage, but no move rock. |

34
main.js
View File

@ -10,20 +10,20 @@ let is_img;
// Map // Map
let tileMap = [ let tileMap = [
' ', ' ',
'wtwwwwwwwwwwwwww', 'w,wwwwwwwwwwwwww',
'wt ttttttt ttttw', 'w,,,,,,,,,,,,,,w',
'wt$imttttt(ihttw', 'w,$im,,,,,(ih,,w',
'wtt tt ttttttttw', 'w,,,,,,,,,,,,,,w',
'wttttttttt)isttw', 'w,,,,,,,,,)is,,w',
'wt ttrtttttttttw', 'w,,,,r,,,,,,,,,w',
'wt ttwtttt ttttw', 'w,,,,w,,,,,,,,,w',
'wttt rtt llt rtw', 'w,,,,r,,,ll,,r,w',
'wtt tttt ll rfrw', 'w,,,,,,,,ll,rfrw',
'w tttaa ttwt rtw', 'w,,,,aa,,,w,,r,w',
'wttt aatt wttttw', 'w,,,,aa,,,w,,,,w',
'wttttttttttttttw', 'w,,,,,,,,,,,,,,w',
'wt*i@ttttt^i#ttw', 'w,*i@,,,,,^i#,,w',
'wt%istttt tttttw', 'w,%is,,,,,,,,,,w',
'wwwwwwwwwwwwwwww', 'wwwwwwwwwwwwwwww',
]; ];
@ -87,7 +87,7 @@ function setup(){
let tile = new Group(); let tile = new Group();
tile.img = tile_img; tile.img = tile_img;
tile.collider = 'none'; tile.collider = 'none';
tile.tile = "t"; tile.tile = ",";
tile.scale = tileSize/tile_img.width; tile.scale = tileSize/tile_img.width;
// Flag // Flag
@ -311,7 +311,7 @@ function isOpen(x,y){
} }
let tile = tileMap[j][i]; let tile = tileMap[j][i];
if (tile == ' ' || tile == 't'){ if (tile == ' ' || tile == ','){
return true; return true;
} else if (tile == 'a'|| tile=='l'){ } else if (tile == 'a'|| tile=='l'){
gameOver(); gameOver();
@ -326,7 +326,7 @@ function isOpen(x,y){
} }
function movingSprite(sprite, dx, dy){ function movingSprite(sprite, dx, dy){
} }
function win(){ function win(){