20243197 #12

Closed
20243197 wants to merge 30 commits from 20243197/20243197:20243197 into 20243197
2 changed files with 28 additions and 8 deletions
Showing only changes of commit 9064e7d866 - Show all commits

View File

@ -23,7 +23,7 @@ User Contol: ASDW
### Elements ### Elements
| Objects | Image | Instructions | | Objects | Image | Instructions |
| :------ | :---: | :----------- | | :------ | :---: | :----------- |
| Baba | ![(character)](assets/Baba.webp) | initial main caracter. Moves with ASDW | | Baba | <img src="assets/Baba.webp" width="40px"> | initial main caracter. Moves with ASDW |
| Rock | ![rock](assets/Rock.webp) | | | Rock | ![rock](assets/Rock.webp) | |
| Flag | ![Flag](assets/Flag.webp) | | | Flag | ![Flag](assets/Flag.webp) | |

32
main.js
View File

@ -12,14 +12,14 @@ let tileMap = [
' ', ' ',
'wtwwwwwwwwwwwwww', 'wtwwwwwwwwwwwwww',
'wt ttttttt ttttw', 'wt ttttttt ttttw',
'wt$imttttttihttw', 'wt$imttttt(ihttw',
'wtt tt ttttisttw',
'wtttttttttt tttw',
'wtt tt ttttttttw', 'wtt tt ttttttttw',
'wttttttttt)isttw',
'wt ttrtttttttttw',
'wt ttwtttt ttttw', 'wt ttwtttt ttttw',
'wttt rtt llt ttw', 'wttt rtt llt rtw',
'wtt tttt ll ttfw', 'wtt tttt ll rfrw',
'w tttaa ttwt ttw', 'w tttaa ttwt rtw',
'wttt aatt wttttw', 'wttt aatt wttttw',
'wttttttttttttttw', 'wttttttttttttttw',
'wt*i@ttttt^i#ttw', 'wt*i@ttttt^i#ttw',
@ -66,6 +66,8 @@ function preload(){
hot_img = loadImage("/assets/Hot.webp"); hot_img = loadImage("/assets/Hot.webp");
sink_img = loadImage("/assets/Sink.webp"); sink_img = loadImage("/assets/Sink.webp");
water_text_img = loadImage("/assets/Text_WATER.webp");
lava_text_img = loadImage("/assets/Text_LAVA.webp");
stopText_img = loadImage("/assets/Stop.webp"); stopText_img = loadImage("/assets/Stop.webp");
baba_text_img = loadImage("/assets/Text_BABA.webp"); baba_text_img = loadImage("/assets/Text_BABA.webp");
flag_text_img = loadImage("/assets/Text_FLAG.webp"); flag_text_img = loadImage("/assets/Text_FLAG.webp");
@ -151,6 +153,20 @@ function setup(){
rock_text.tile = '$'; rock_text.tile = '$';
rock_text.scale = tileSize/rock_text_img.width; rock_text.scale = tileSize/rock_text_img.width;
// lava_text
let lava_text = new Group();
lava_text.img = lava_text_img;
lava_text.collider = 'dyinamic';
lava_text.tile = '(';
lava_text.scale = tileSize/lava_text_img.width;
// water_text
let water_text = new Group();
water_text.img = water_text_img;
water_text.collider = 'dyinamic';
water_text.tile = ')';
water_text.scale = tileSize/water_text_img.width;
// you // you
let you = new Group(); let you = new Group();
you.img = you_img; you.img = you_img;
@ -292,6 +308,10 @@ function isOpen(x,y){
} }
} }
function movingSprite(sprite, dx, dy){
}
function win(){ function win(){
isWin = true; isWin = true;
baba.remove(); baba.remove();